summaryrefslogtreecommitdiffstats
path: root/src/control/Bridge.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-03 17:28:54 +0200
committeraap <aap@papnet.eu>2020-05-03 17:28:54 +0200
commit67467f15d1dd8e545acc47c5e24beb74e4ca78b3 (patch)
treeab03d72bf34fe94b0e0acdfbb5d49ca3316937fa /src/control/Bridge.cpp
parentimplemented most of vice city path system (diff)
downloadre3-67467f15d1dd8e545acc47c5e24beb74e4ca78b3.tar
re3-67467f15d1dd8e545acc47c5e24beb74e4ca78b3.tar.gz
re3-67467f15d1dd8e545acc47c5e24beb74e4ca78b3.tar.bz2
re3-67467f15d1dd8e545acc47c5e24beb74e4ca78b3.tar.lz
re3-67467f15d1dd8e545acc47c5e24beb74e4ca78b3.tar.xz
re3-67467f15d1dd8e545acc47c5e24beb74e4ca78b3.tar.zst
re3-67467f15d1dd8e545acc47c5e24beb74e4ca78b3.zip
Diffstat (limited to '')
-rw-r--r--src/control/Bridge.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/control/Bridge.cpp b/src/control/Bridge.cpp
index 98c74bbe..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,12 +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() { return State != STATE_LIFT_PART_IS_DOWN; }
+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;
@@ -135,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
}