diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-05-05 17:34:46 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-05-05 17:34:46 +0200 |
commit | 22e8b0e419ad811c977c67ea2f2c06d53ea3be5e (patch) | |
tree | 655dc6cff470ac28d19678c392a0aebb49cea937 /src/control/Bridge.cpp | |
parent | Merge branch 'master' into miami (diff) | |
download | re3-22e8b0e419ad811c977c67ea2f2c06d53ea3be5e.tar re3-22e8b0e419ad811c977c67ea2f2c06d53ea3be5e.tar.gz re3-22e8b0e419ad811c977c67ea2f2c06d53ea3be5e.tar.bz2 re3-22e8b0e419ad811c977c67ea2f2c06d53ea3be5e.tar.lz re3-22e8b0e419ad811c977c67ea2f2c06d53ea3be5e.tar.xz re3-22e8b0e419ad811c977c67ea2f2c06d53ea3be5e.tar.zst re3-22e8b0e419ad811c977c67ea2f2c06d53ea3be5e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/control/Bridge.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/control/Bridge.cpp b/src/control/Bridge.cpp index e873062b..1e63cf30 100644 --- a/src/control/Bridge.cpp +++ b/src/control/Bridge.cpp @@ -23,6 +23,7 @@ uint32 CBridge::TimeOfBridgeBecomingOperational; void CBridge::Init() { +#ifdef GTA_BRIDGE FindBridgeEntities(); OldLift = -1.0f; if (pLiftPart && pWeight) @@ -35,10 +36,12 @@ void CBridge::Init() ThePaths.SetLinksBridgeLights(-330.0, -230.0, -700.0, -588.0, true); } +#endif } void CBridge::Update() { +#ifdef GTA_BRIDGE if (!pLiftPart || !pWeight) return; @@ -113,15 +116,21 @@ void CBridge::Update() ThePaths.SetLinksBridgeLights(-330.0, -230.0, -700.0, -588.0, true); else if (State == STATE_LIFT_PART_IS_DOWN && OldState == STATE_LIFT_PART_MOVING_DOWN) ThePaths.SetLinksBridgeLights(-330.0, -230.0, -700.0, -588.0, false); +#endif } bool CBridge::ShouldLightsBeFlashing() { +#ifdef GTA_BRIDGE return State != STATE_LIFT_PART_IS_DOWN; +#else + return false; +#endif } void CBridge::FindBridgeEntities() { +#ifdef GTA_BRIDGE pWeight = nil; pLiftRoad = nil; pLiftPart = nil; @@ -138,12 +147,17 @@ void CBridge::FindBridgeEntities() pWeight = entry; } } +#endif } bool CBridge::ThisIsABridgeObjectMovingUp(int index) { +#ifdef GTA_BRIDGE if (index != MI_BRIDGEROADSEGMENT && index != MI_BRIDGELIFT) return false; return State == STATE_LIFT_PART_ABOUT_TO_MOVE_UP || State == STATE_LIFT_PART_MOVING_UP; +#else + return false; +#endif } |