summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-01-23 02:09:15 +0100
committerSergeanur <s.anureev@yandex.ua>2021-01-23 02:09:15 +0100
commitb35b0c598d183e2ba73c73ad82a03f833556dc27 (patch)
tree862c9346d07c9d30e72ce61f76abae308b45cefd /src/control
parentLCS model indices (diff)
downloadre3-b35b0c598d183e2ba73c73ad82a03f833556dc27.tar
re3-b35b0c598d183e2ba73c73ad82a03f833556dc27.tar.gz
re3-b35b0c598d183e2ba73c73ad82a03f833556dc27.tar.bz2
re3-b35b0c598d183e2ba73c73ad82a03f833556dc27.tar.lz
re3-b35b0c598d183e2ba73c73ad82a03f833556dc27.tar.xz
re3-b35b0c598d183e2ba73c73ad82a03f833556dc27.tar.zst
re3-b35b0c598d183e2ba73c73ad82a03f833556dc27.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/Bridge.cpp20
-rw-r--r--src/control/Bridge.h1
2 files changed, 21 insertions, 0 deletions
diff --git a/src/control/Bridge.cpp b/src/control/Bridge.cpp
index 1e63cf30..e7c76a9c 100644
--- a/src/control/Bridge.cpp
+++ b/src/control/Bridge.cpp
@@ -161,3 +161,23 @@ bool CBridge::ThisIsABridgeObjectMovingUp(int index)
return false;
#endif
}
+
+void CBridge::ForceBridgeState(uint8 state)
+{
+#ifdef GTA_BRIDGE
+ State = state;
+ switch (state)
+ {
+ case STATE_BRIDGE_LOCKED:
+ case STATE_LIFT_PART_MOVING_DOWN:
+ case STATE_LIFT_PART_ABOUT_TO_MOVE_UP:
+ ThePaths.SetLinksBridgeLights(-330.0f, -230.0f, -700.0f, -588.0f, true);
+ break;
+ case STATE_BRIDGE_ALWAYS_UNLOCKED:
+ ThePaths.SetLinksBridgeLights(-330.0f, -230.0f, -700.0f, -588.0f, false);
+ break;
+ default:
+ break;
+ }
+#endif
+} \ No newline at end of file
diff --git a/src/control/Bridge.h b/src/control/Bridge.h
index dd781a9a..e639d4c1 100644
--- a/src/control/Bridge.h
+++ b/src/control/Bridge.h
@@ -26,4 +26,5 @@ public:
static bool ShouldLightsBeFlashing();
static void FindBridgeEntities();
static bool ThisIsABridgeObjectMovingUp(int);
+ static void ForceBridgeState(uint8 state);
};