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.cpp3
-rw-r--r--src/script_system.cpp3
-rw-r--r--src/sprite.h1
3 files changed, 5 insertions, 2 deletions
diff --git a/src/character_system.cpp b/src/character_system.cpp index a24bdcc..87407af 100644 --- a/src/character_system.cpp +++ b/src/character_system.cpp
@@ -237,7 +237,8 @@ void CharacterSystem::beginCrouch(int spriteId) {
237 stopRunning(spriteId); 237 stopRunning(spriteId);
238 } else { 238 } else {
239 if (sprite.characterMedium == CharacterMedium::Ladder || 239 if (sprite.characterMedium == CharacterMedium::Ladder ||
240 sprite.characterMedium == CharacterMedium::Water) { 240 sprite.characterMedium == CharacterMedium::Water ||
241 sprite.cantCrouch) {
241 return; 242 return;
242 } 243 }
243 244
diff --git a/src/script_system.cpp b/src/script_system.cpp index 31b8bee..92e6afe 100644 --- a/src/script_system.cpp +++ b/src/script_system.cpp
@@ -39,7 +39,8 @@ ScriptSystem::ScriptSystem(Game& game) : game_(game) {
39 }, 39 },
40 "persistent", &Sprite::persistent, 40 "persistent", &Sprite::persistent,
41 "paused", &Sprite::paused, 41 "paused", &Sprite::paused,
42 "clipping", &Sprite::clipping); 42 "clipping", &Sprite::clipping,
43 "cantCrouch", &Sprite::cantCrouch);
43 44
44 engine_.new_usertype<MessageSystem>( 45 engine_.new_usertype<MessageSystem>(
45 "message", 46 "message",
diff --git a/src/sprite.h b/src/sprite.h index 32a082c..657a692 100644 --- a/src/sprite.h +++ b/src/sprite.h
@@ -91,6 +91,7 @@ public:
91 StepType stepType = StepType::none; 91 StepType stepType = StepType::none;
92 int runningSfxChannel = -1; 92 int runningSfxChannel = -1;
93 bool clipping = false; 93 bool clipping = false;
94 bool cantCrouch = false; // Use this to prevent running
94 95
95 // Input 96 // Input
96 bool controllable = false; 97 bool controllable = false;