summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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}