Fixing mixed IsCutsceneProcessing and IsRunning

This commit is contained in:
Sergeanur 2020-04-10 11:23:35 +03:00
parent 6647312660
commit 8917567508
6 changed files with 5 additions and 5 deletions

View File

@ -26,7 +26,7 @@ public:
static CDirectory *&ms_pCutsceneDir; static CDirectory *&ms_pCutsceneDir;
static uint32 &ms_cutsceneLoadStatus; static uint32 &ms_cutsceneLoadStatus;
static void SetRunning(bool running) { ms_running = running; } static void StartCutsceneProcessing() { ms_cutsceneProcessing = true; }
static bool IsRunning(void) { return ms_running; } static bool IsRunning(void) { return ms_running; }
static bool IsCutsceneProcessing(void) { return ms_cutsceneProcessing; } static bool IsCutsceneProcessing(void) { return ms_cutsceneProcessing; }
static bool UseLodMultiplier(void) { return ms_useLodMultiplier; } static bool UseLodMultiplier(void) { return ms_useLodMultiplier; }

View File

@ -90,7 +90,7 @@ uint32 (&aCarsToKeepTime)[MAX_CARS_TO_KEEP] = *(uint32(*)[MAX_CARS_TO_KEEP])*(ui
void void
CCarCtrl::GenerateRandomCars() CCarCtrl::GenerateRandomCars()
{ {
if (CCutsceneMgr::IsCutsceneProcessing()) if (CCutsceneMgr::IsRunning())
return; return;
if (NumRandomCars < 30){ if (NumRandomCars < 30){
if (CountDownToCarsAtStart == 0){ if (CountDownToCarsAtStart == 0){

View File

@ -242,7 +242,7 @@ void CCarGenerator::Load(uint8 *&buffer)
void CTheCarGenerators::Process() void CTheCarGenerators::Process()
{ {
if (FindPlayerTrain() || CCutsceneMgr::IsRunning()) if (FindPlayerTrain() || CCutsceneMgr::IsCutsceneProcessing())
return; return;
if (++CTheCarGenerators::ProcessCounter == 4) if (++CTheCarGenerators::ProcessCounter == 4)
CTheCarGenerators::ProcessCounter = 0; CTheCarGenerators::ProcessCounter = 0;

View File

@ -8442,7 +8442,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]]; CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]];
CPad::GetPad(ScriptParams[0])->DisablePlayerControls |= PLAYERCONTROL_DISABLED_80; CPad::GetPad(ScriptParams[0])->DisablePlayerControls |= PLAYERCONTROL_DISABLED_80;
pPlayerInfo->MakePlayerSafe(true); pPlayerInfo->MakePlayerSafe(true);
CCutsceneMgr::SetRunning(true); CCutsceneMgr::StartCutsceneProcessing();
return 0; return 0;
} }
case COMMAND_USE_TEXT_COMMANDS: case COMMAND_USE_TEXT_COMMANDS:

View File

@ -475,7 +475,7 @@ void CWeather::RenderRainStreaks(void)
// 1/16 probability // 1/16 probability
Streaks[i].direction = CVector(4.0f, 4.0f, -4.0f); Streaks[i].direction = CVector(4.0f, 4.0f, -4.0f);
Streaks[i].position = 6.0f * TheCamera.GetForward() + TheCamera.GetPosition() + CVector(-1.8f * Streaks[i].direction.x, -1.8f * Streaks[i].direction.y, 8.0f); Streaks[i].position = 6.0f * TheCamera.GetForward() + TheCamera.GetPosition() + CVector(-1.8f * Streaks[i].direction.x, -1.8f * Streaks[i].direction.y, 8.0f);
if (!CCutsceneMgr::IsCutsceneProcessing()) { if (!CCutsceneMgr::IsRunning()) {
Streaks[i].position.x += 2.0f * FindPlayerSpeed().x * 60.0f; Streaks[i].position.x += 2.0f * FindPlayerSpeed().x * 60.0f;
Streaks[i].position.y += 2.0f * FindPlayerSpeed().y * 60.0f; Streaks[i].position.y += 2.0f * FindPlayerSpeed().y * 60.0f;
} }