summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-11 20:02:31 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-04-11 20:02:31 +0200
commitd010f6255a9e2567a240bb5a235ac8a340a6af9b (patch)
tree10306c47ef931167e74ee590bdae40bc6119040d /src
parentCPools (diff)
parentMerge remote-tracking branch 'upstream/master' (diff)
downloadre3-d010f6255a9e2567a240bb5a235ac8a340a6af9b.tar
re3-d010f6255a9e2567a240bb5a235ac8a340a6af9b.tar.gz
re3-d010f6255a9e2567a240bb5a235ac8a340a6af9b.tar.bz2
re3-d010f6255a9e2567a240bb5a235ac8a340a6af9b.tar.lz
re3-d010f6255a9e2567a240bb5a235ac8a340a6af9b.tar.xz
re3-d010f6255a9e2567a240bb5a235ac8a340a6af9b.tar.zst
re3-d010f6255a9e2567a240bb5a235ac8a340a6af9b.zip
Diffstat (limited to 'src')
-rw-r--r--src/animation/CutsceneMgr.cpp2
-rw-r--r--src/control/TrafficLights.cpp4
-rw-r--r--src/core/Cam.cpp2
-rw-r--r--src/core/Timer.h1
4 files changed, 5 insertions, 4 deletions
diff --git a/src/animation/CutsceneMgr.cpp b/src/animation/CutsceneMgr.cpp
index 0e35599b..6f8e9790 100644
--- a/src/animation/CutsceneMgr.cpp
+++ b/src/animation/CutsceneMgr.cpp
@@ -410,7 +410,7 @@ CCutsceneMgr::Update(void)
if (!ms_running) return;
- ms_cutsceneTimer += CTimer::GetTimeStepNonClipped() * 0.02f;
+ ms_cutsceneTimer += CTimer::GetTimeStepNonClippedInSeconds();
if (CGeneral::faststricmp(ms_cutsceneName, "end") && TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_FLYBY && ms_cutsceneLoadStatus == CUTSCENE_LOADING_0) {
if (CPad::GetPad(0)->GetCrossJustDown()
|| (CGame::playingIntro && CPad::GetPad(0)->GetStartJustDown())
diff --git a/src/control/TrafficLights.cpp b/src/control/TrafficLights.cpp
index e4416965..ab9cd92d 100644
--- a/src/control/TrafficLights.cpp
+++ b/src/control/TrafficLights.cpp
@@ -40,9 +40,9 @@ CTrafficLights::DisplayActualLight(CEntity *ent)
for(i = 1; i < 6; i++){
assert(mi->Get2dEffect(i));
yMin = min(yMin, mi->Get2dEffect(i)->pos.y);
- yMax = min(yMax, mi->Get2dEffect(i)->pos.y);
+ yMax = max(yMax, mi->Get2dEffect(i)->pos.y);
zMin = min(zMin, mi->Get2dEffect(i)->pos.z);
- zMax = min(zMax, mi->Get2dEffect(i)->pos.z);
+ zMax = max(zMax, mi->Get2dEffect(i)->pos.z);
}
CVector pos1, pos2;
diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp
index dc9ef74f..cfdea46a 100644
--- a/src/core/Cam.cpp
+++ b/src/core/Cam.cpp
@@ -3511,7 +3511,7 @@ CCam::Process_FlyBy(const CVector&, float, float, float)
Up = CVector(0.0f, 0.0f, 1.0f);
if(TheCamera.m_bStartingSpline)
- m_fTimeElapsedFloat += CTimer::GetTimeStepInMilliseconds();
+ m_fTimeElapsedFloat += CTimer::GetTimeStepNonClippedInMilliseconds();
else{
m_fTimeElapsedFloat = 0.0f;
m_uiFinishTime = MS(TheCamera.m_arrPathArray[2].m_arr_PathData[10*((int)TheCamera.m_arrPathArray[2].m_arr_PathData[0]-1) + 1]);
diff --git a/src/core/Timer.h b/src/core/Timer.h
index 2498ec8a..88a46661 100644
--- a/src/core/Timer.h
+++ b/src/core/Timer.h
@@ -21,6 +21,7 @@ public:
static float GetTimeStepInMilliseconds() { return ms_fTimeStep / 50.0f * 1000.0f; }
static const float &GetTimeStepNonClipped(void) { return ms_fTimeStepNonClipped; }
static float GetTimeStepNonClippedInSeconds(void) { return ms_fTimeStepNonClipped / 50.0f; }
+ static float GetTimeStepNonClippedInMilliseconds(void) { return ms_fTimeStepNonClipped / 50.0f * 1000.0f; }
static void SetTimeStepNonClipped(float ts) { ms_fTimeStepNonClipped = ts; }
static const uint32 &GetFrameCounter(void) { return m_FrameCounter; }
static void SetFrameCounter(uint32 fc) { m_FrameCounter = fc; }