summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2019-09-28 17:01:05 +0200
committerSergeanur <s.anureev@yandex.ua>2019-09-28 17:01:05 +0200
commitef65ad81ceda9ae04d4ddfd1e79fe5377ae7d07f (patch)
tree1635191dd5226dafd15fe9b648e4e7d8310afc3a /src
parentRefactoring (diff)
downloadre3-ef65ad81ceda9ae04d4ddfd1e79fe5377ae7d07f.tar
re3-ef65ad81ceda9ae04d4ddfd1e79fe5377ae7d07f.tar.gz
re3-ef65ad81ceda9ae04d4ddfd1e79fe5377ae7d07f.tar.bz2
re3-ef65ad81ceda9ae04d4ddfd1e79fe5377ae7d07f.tar.lz
re3-ef65ad81ceda9ae04d4ddfd1e79fe5377ae7d07f.tar.xz
re3-ef65ad81ceda9ae04d4ddfd1e79fe5377ae7d07f.tar.zst
re3-ef65ad81ceda9ae04d4ddfd1e79fe5377ae7d07f.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/CutsceneMgr.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core/CutsceneMgr.cpp b/src/core/CutsceneMgr.cpp
index b3737c4d..ccb0bf64 100644
--- a/src/core/CutsceneMgr.cpp
+++ b/src/core/CutsceneMgr.cpp
@@ -148,8 +148,7 @@ CCutsceneMgr::Initialise(void)
void
CCutsceneMgr::Shutdown(void)
{
- if (ms_pCutsceneDir)
- delete ms_pCutsceneDir;
+ delete ms_pCutsceneDir;
}
void
@@ -234,7 +233,7 @@ CCutsceneMgr::SetHeadAnim(const char *animName, CObject *pObject)
void
CCutsceneMgr::FinishCutscene()
{
- CCutsceneMgr::ms_cutsceneTimer = TheCamera.GetCutSceneFinishTime() * 0.001;
+ CCutsceneMgr::ms_cutsceneTimer = TheCamera.GetCutSceneFinishTime() * 0.001f;
TheCamera.FinishCutscene();
FindPlayerPed()->bIsVisible = true;
@@ -337,8 +336,7 @@ CCutsceneMgr::DeleteCutsceneData(void)
for (--ms_numCutsceneObjs; ms_numCutsceneObjs >= 0; ms_numCutsceneObjs--) {
CWorld::Remove(ms_pCutsceneObjects[ms_numCutsceneObjs]);
ms_pCutsceneObjects[ms_numCutsceneObjs]->DeleteRwObject();
- if (ms_pCutsceneObjects[ms_numCutsceneObjs])
- delete ms_pCutsceneObjects[ms_numCutsceneObjs];
+ delete ms_pCutsceneObjects[ms_numCutsceneObjs];
}
ms_numCutsceneObjs = 0;
@@ -397,7 +395,7 @@ CCutsceneMgr::Update(void)
if (!ms_running) return;
- ms_cutsceneTimer += CTimer::GetTimeStepNonClipped() * 0.02;
+ ms_cutsceneTimer += CTimer::GetTimeStepNonClipped() * 0.02f;
if (strcmpi(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())
@@ -408,7 +406,7 @@ CCutsceneMgr::Update(void)
}
}
-bool CCutsceneMgr::HasCutsceneFinished(void) { return TheCamera.GetPositionAlongSpline() == 1.0; }
+bool CCutsceneMgr::HasCutsceneFinished(void) { return TheCamera.GetPositionAlongSpline() == 1.0f; }
STARTPATCHES
InjectHook(0x4045D0, &CCutsceneMgr::Initialise, PATCH_JUMP);