summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-04-11 19:33:46 +0200
committeraap <aap@papnet.eu>2020-04-11 19:33:46 +0200
commitc307e72fa0f40a8c4695505fa31aa85d0bbb460c (patch)
tree51d2b19218a2710928102b5278012b1139255032
parentfixed traffic light position (diff)
parentFix cutscene camera latency (diff)
downloadre3-c307e72fa0f40a8c4695505fa31aa85d0bbb460c.tar
re3-c307e72fa0f40a8c4695505fa31aa85d0bbb460c.tar.gz
re3-c307e72fa0f40a8c4695505fa31aa85d0bbb460c.tar.bz2
re3-c307e72fa0f40a8c4695505fa31aa85d0bbb460c.tar.lz
re3-c307e72fa0f40a8c4695505fa31aa85d0bbb460c.tar.xz
re3-c307e72fa0f40a8c4695505fa31aa85d0bbb460c.tar.zst
re3-c307e72fa0f40a8c4695505fa31aa85d0bbb460c.zip
Diffstat (limited to '')
-rw-r--r--src/animation/CutsceneMgr.cpp2
-rw-r--r--src/core/Cam.cpp2
-rw-r--r--src/core/RwTexRead.cpp10
-rw-r--r--src/core/Timer.h1
4 files changed, 9 insertions, 6 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/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/RwTexRead.cpp b/src/core/RwTexRead.cpp
index ef1ac197..49b245dd 100644
--- a/src/core/RwTexRead.cpp
+++ b/src/core/RwTexRead.cpp
@@ -260,11 +260,13 @@ CreateTxdImageForVideoCard()
RwStream *img = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMWRITE, "models\\txd.img");
if (img == nil) {
- if (_dwOperatingSystemVersion == OS_WINNT || _dwOperatingSystemVersion == OS_WIN2000 || _dwOperatingSystemVersion == OS_WINXP) {
+ // original code does otherwise and it leaks
+ delete []buf;
+ delete pDir;
+
+ if (_dwOperatingSystemVersion == OS_WINNT || _dwOperatingSystemVersion == OS_WIN2000 || _dwOperatingSystemVersion == OS_WINXP)
DealWithTxdWriteError(0, TXDSTORESIZE, "CVT_CRT");
- delete []buf;
- delete pDir;
- }
+
return false;
}
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; }