summaryrefslogtreecommitdiffstats
path: root/src/control/TrafficLights.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-01-24 11:42:45 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2021-01-24 11:42:45 +0100
commitee89c485fcce7f3b9a189f7a80b3a1b2933f79bd (patch)
treeba8ccf97a2fd5aff3180f7ad600a53a4d29cf9ff /src/control/TrafficLights.cpp
parentfix (diff)
downloadre3-ee89c485fcce7f3b9a189f7a80b3a1b2933f79bd.tar
re3-ee89c485fcce7f3b9a189f7a80b3a1b2933f79bd.tar.gz
re3-ee89c485fcce7f3b9a189f7a80b3a1b2933f79bd.tar.bz2
re3-ee89c485fcce7f3b9a189f7a80b3a1b2933f79bd.tar.lz
re3-ee89c485fcce7f3b9a189f7a80b3a1b2933f79bd.tar.xz
re3-ee89c485fcce7f3b9a189f7a80b3a1b2933f79bd.tar.zst
re3-ee89c485fcce7f3b9a189f7a80b3a1b2933f79bd.zip
Diffstat (limited to '')
-rw-r--r--src/control/TrafficLights.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/control/TrafficLights.cpp b/src/control/TrafficLights.cpp
index df0761ab..d8f211d0 100644
--- a/src/control/TrafficLights.cpp
+++ b/src/control/TrafficLights.cpp
@@ -114,6 +114,32 @@ CTrafficLights::DisplayActualLight(CEntity *ent)
CBrightLights::RegisterOne(pos1, ent->GetUp(), ent->GetRight(), CVector(0.0f, 0.0f, 0.0f), id + BRIGHTLIGHT_TRAFFIC_GREEN);
CBrightLights::RegisterOne(pos2, ent->GetUp(), -ent->GetRight(), CVector(0.0f, 0.0f, 0.0f), id + BRIGHTLIGHT_TRAFFIC_GREEN);
+
+ // TODO(LCS): check coordinates
+ static const float top = -0.127f;
+ static const float bot = -0.539f;
+ static const float mid = bot + (top - bot) / 3.0f;
+ static const float left = 1.256f;
+ static const float right = 0.706f;
+ phase = CTrafficLights::LightForPeds();
+ if (phase == PED_LIGHTS_DONT_WALK) {
+ CVector p0(2.7f, right, top);
+ CVector p1(2.7f, left, top);
+ CVector p2(2.7f, right, mid);
+ CVector p3(2.7f, left, mid);
+ CShinyTexts::RegisterOne(ent->GetMatrix() * p0, ent->GetMatrix() * p1, ent->GetMatrix() * p2, ent->GetMatrix() * p3,
+ 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f,
+ SHINYTEXT_WALK, 255, 0, 0, 60.0f);
+ }
+ else if (phase == PED_LIGHTS_WALK || CTimer::GetTimeInMilliseconds() & 0x100) {
+ CVector p0(2.7f, right, mid);
+ CVector p1(2.7f, left, mid);
+ CVector p2(2.7f, right, bot);
+ CVector p3(2.7f, left, bot);
+ CShinyTexts::RegisterOne(ent->GetMatrix() * p0, ent->GetMatrix() * p1, ent->GetMatrix() * p2, ent->GetMatrix() * p3,
+ 1.0f, 0.5f, 0.0f, 0.5f, 1.0f, 1.0f, 0.0f, 1.0f,
+ SHINYTEXT_WALK, 255, 255, 255, 60.0f);
+ }
}
else if (MI_TRAFFICLIGHTS_VERTICAL == m) {
CBaseModelInfo* mi = CModelInfo::GetModelInfo(ent->GetModelIndex());