Core/Players: Update the location of the cinematic camera only if there is an active cinematic (#26215)

This commit is contained in:
Meji
2021-03-15 00:06:26 +01:00
committed by GitHub
parent 41c342113f
commit 72f99531b7

View File

@@ -922,7 +922,7 @@ void Player::Update(uint32 p_time)
// Update cinematic location, if 500ms have passed and we're doing a cinematic now.
_cinematicMgr->m_cinematicDiff += p_time;
if (_cinematicMgr->m_activeCinematicCameraIndex != 0 && GetMSTimeDiffToNow(_cinematicMgr->m_lastCinematicCheck) > CINEMATIC_UPDATEDIFF)
if (_cinematicMgr->m_cinematicCamera && _cinematicMgr->m_activeCinematic && GetMSTimeDiffToNow(_cinematicMgr->m_lastCinematicCheck) > CINEMATIC_UPDATEDIFF)
{
_cinematicMgr->m_lastCinematicCheck = GameTime::GetGameTimeMS();
_cinematicMgr->UpdateCinematicLocation(p_time);