diff options
author | Filip Gawin <filip.gawin@zoho.com> | 2020-02-25 20:01:56 +0100 |
---|---|---|
committer | Filip Gawin <filip.gawin@zoho.com> | 2020-03-22 17:30:54 +0100 |
commit | 8f01eab5ab97c498fd308c091ad9c555b2f67b56 (patch) | |
tree | c7b9b88d8b77ab3559be411dbbfeda98e3294c7b /src/control/Bridge.cpp | |
parent | Implement ProcessGarages + small cleanup (diff) | |
download | re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.tar re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.tar.gz re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.tar.bz2 re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.tar.lz re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.tar.xz re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.tar.zst re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.zip |
Diffstat (limited to 'src/control/Bridge.cpp')
-rw-r--r-- | src/control/Bridge.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/control/Bridge.cpp b/src/control/Bridge.cpp index dacb7aab..31214207 100644 --- a/src/control/Bridge.cpp +++ b/src/control/Bridge.cpp @@ -24,7 +24,7 @@ uint32& CBridge::TimeOfBridgeBecomingOperational = *(uint32*)0x8F2BC0; void CBridge::Init() { FindBridgeEntities(); - OldLift = -1.0; + OldLift = -1.0f; if (pLiftPart && pWeight) { DefaultZLiftPart = pLiftPart->GetPosition().z; @@ -60,32 +60,32 @@ void CBridge::Update() if (timeElapsed < 10000) { State = STATE_LIFT_PART_MOVING_DOWN; - liftHeight = 25.0 - timeElapsed / 10000.0 * 25.0; + liftHeight = 25.0 - timeElapsed / 10000.0 * 25.0f; } else if (timeElapsed < 40000) { - liftHeight = 0.0; + liftHeight = 0.0f; State = STATE_LIFT_PART_IS_DOWN; } else if (timeElapsed < 50000) { - liftHeight = 0.0; + liftHeight = 0.0f; State = STATE_LIFT_PART_ABOUT_TO_MOVE_UP; } else if (timeElapsed < 60000) { State = STATE_LIFT_PART_MOVING_UP; - liftHeight = (timeElapsed - 50000) / 10000.0 * 25.0; + liftHeight = (timeElapsed - 50000) / 10000.0 * 25.0f; } else { - liftHeight = 25.0; + liftHeight = 25.0f; State = STATE_LIFT_PART_IS_UP; } } else { - liftHeight = 25.0; + liftHeight = 25.0f; TimeOfBridgeBecomingOperational = 0; State = STATE_BRIDGE_LOCKED; } |