summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-02-24 11:26:51 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2021-02-24 16:00:53 -0500
commitbf086faf9cf792ca79f1646230cf0c5b9f05ac24 (patch)
tree5810049170cdb57b4c66ea67009227544de83a1e
parent5faac69bb14dc1d064b108c5109ab1a53200549f (diff)
downloadtanetane-bf086faf9cf792ca79f1646230cf0c5b9f05ac24.tar.gz
tanetane-bf086faf9cf792ca79f1646230cf0c5b9f05ac24.tar.bz2
tanetane-bf086faf9cf792ca79f1646230cf0c5b9f05ac24.zip
Made it so you can use shift to stop running on a ladder
-rw-r--r--src/character_system.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/character_system.cpp b/src/character_system.cpp index 5a3b774..d5aaf81 100644 --- a/src/character_system.cpp +++ b/src/character_system.cpp
@@ -215,13 +215,13 @@ void CharacterSystem::tick(double dt) {
215void CharacterSystem::beginCrouch(int spriteId) { 215void CharacterSystem::beginCrouch(int spriteId) {
216 Sprite& sprite = game_.getSprite(spriteId); 216 Sprite& sprite = game_.getSprite(spriteId);
217 217
218 if (sprite.characterMedium == CharacterMedium::Ladder) {
219 return;
220 }
221
222 if (sprite.characterState == CharacterState::Running) { 218 if (sprite.characterState == CharacterState::Running) {
223 stopRunning(spriteId); 219 stopRunning(spriteId);
224 } else { 220 } else {
221 if (sprite.characterMedium == CharacterMedium::Ladder) {
222 return;
223 }
224
225 setPartyState(spriteId, CharacterState::Crouching); 225 setPartyState(spriteId, CharacterState::Crouching);
226 } 226 }
227} 227}