From 82f54b946fa37f9c92be2a2f2883f8f37655f3ed Mon Sep 17 00:00:00 2001 From: shfil Date: Sun, 18 Oct 2020 00:54:27 +0200 Subject: Script.cpp missing breaks --- src/control/Script.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/control/Script.cpp') diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 650e11a7..5dceacb7 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -2002,9 +2002,11 @@ void CTheScripts::Process() case 4: AllowMissionReplay = 5; RetryMission(0, 0); + break; case 6: AllowMissionReplay = 7; TimeToWaitTill = CTimer::GetTimeInMilliseconds() + 500; + break; case 7: if (TimeToWaitTill < CTimer::GetTimeInMilliseconds()) { AllowMissionReplay = 0; -- cgit v1.2.3 From b91f6a45501634b55f6ef2c08d57c5293d5fd3a0 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sun, 18 Oct 2020 16:40:06 +0300 Subject: Setter for bIsStatic (became virtual in SA) --- src/control/Script.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/control/Script.cpp') diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 5dceacb7..efd17f25 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -3577,7 +3577,7 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); pos.z += car->GetDistanceFromCentreOfMassToBaseOfModel(); - car->bIsStatic = false; + car->SetIsStatic(false); /* Again weird usage of virtual functions. */ if (car->IsBoat()) { car->Teleport(pos); @@ -9184,14 +9184,14 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); script_assert(pObject); if (ScriptParams[1]) { - if (pObject->bIsStatic) { - pObject->bIsStatic = false; + if (pObject->GetIsStatic()) { + pObject->SetIsStatic(false); pObject->AddToMovingList(); } } else { - if (!pObject->bIsStatic) { - pObject->bIsStatic = true; + if (!pObject->GetIsStatic()) { + pObject->SetIsStatic(true); pObject->RemoveFromMovingList(); } } -- cgit v1.2.3 From cc0ae516319a028cd1ef1b317a26d58ef17ee6d0 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sun, 18 Oct 2020 16:55:11 +0300 Subject: lil fix --- src/control/Script.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/control/Script.cpp') diff --git a/src/control/Script.cpp b/src/control/Script.cpp index efd17f25..50e89ecc 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -9184,13 +9184,13 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); script_assert(pObject); if (ScriptParams[1]) { - if (pObject->GetIsStatic()) { + if (pObject->bIsStatic) { pObject->SetIsStatic(false); pObject->AddToMovingList(); } } else { - if (!pObject->GetIsStatic()) { + if (!pObject->bIsStatic) { pObject->SetIsStatic(true); pObject->RemoveFromMovingList(); } -- cgit v1.2.3