summaryrefslogtreecommitdiffstats
path: root/src/control/Script6.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-08-29 18:32:22 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2021-08-29 18:32:22 +0200
commit453f8c05a4fc2ef03ba1d4f7bac43ba871c52fbd (patch)
treeb1586ab27437633e49c795c2e1277f6ca4877cfa /src/control/Script6.cpp
parentfix (diff)
downloadre3-453f8c05a4fc2ef03ba1d4f7bac43ba871c52fbd.tar
re3-453f8c05a4fc2ef03ba1d4f7bac43ba871c52fbd.tar.gz
re3-453f8c05a4fc2ef03ba1d4f7bac43ba871c52fbd.tar.bz2
re3-453f8c05a4fc2ef03ba1d4f7bac43ba871c52fbd.tar.lz
re3-453f8c05a4fc2ef03ba1d4f7bac43ba871c52fbd.tar.xz
re3-453f8c05a4fc2ef03ba1d4f7bac43ba871c52fbd.tar.zst
re3-453f8c05a4fc2ef03ba1d4f7bac43ba871c52fbd.zip
Diffstat (limited to 'src/control/Script6.cpp')
-rw-r--r--src/control/Script6.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/control/Script6.cpp b/src/control/Script6.cpp
index 8dcabd30..94378cc0 100644
--- a/src/control/Script6.cpp
+++ b/src/control/Script6.cpp
@@ -38,6 +38,7 @@
#include "CarAI.h"
#include "Pickups.h"
#include "Fluff.h"
+#include "CustomSoundTrack.h"
// LCS: file done except TODOs
@@ -109,9 +110,12 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
CollectParameters(&m_nIp, 2);
CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0));
script_assert(pVehicle);
- script_assert(pVehicle->m_vehType == VEHICLE_TYPE_CAR);
- CAutomobile* pCar = (CAutomobile*)pVehicle;
- pCar->bNotDamagedUpsideDown = (GET_INTEGER_PARAM(1) != 0);
+ //assert(pVehicle->m_vehType == VEHICLE_TYPE_CAR);
+ // they call this for bikes again, we don't really want to destroy the structure...
+#ifdef FIX_BUGS
+ if (pVehicle->m_vehType == VEHICLE_TYPE_CAR)
+#endif
+ ((CAutomobile*)pVehicle)->bNotDamagedUpsideDown = (GET_INTEGER_PARAM(1) != 0);
return 0;
}
case COMMAND_CAN_PLAYER_START_MISSION:
@@ -400,7 +404,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
if (size <= 0)
size = CTheScripts::LargestMissionScriptSize;
CFileMgr::Seek(gScriptsFile, offset, 0);
- CFileMgr::Read(gScriptsFile, (const char*)&CTheScripts::ScriptSpace[CTheScripts::MainScriptSize], size); // TODO
+ CFileMgr::Read(gScriptsFile, (const char*)&CTheScripts::ScriptSpace[CTheScripts::MainScriptSize], size);
CRunningScript* pMissionScript = CTheScripts::StartNewScript(CTheScripts::MainScriptSize);
CTimer::Resume();
pMissionScript->m_bIsMissionScript = true;
@@ -468,8 +472,8 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
return 0;
case COMMAND_SET_RADIO_CHANNEL:
CollectParameters(&m_nIp, 2);
- // if (base::cSingleton<cCustomSoundTrack>::Instance()->unk()) - TODO on PS2, but it's not on mobile
- DMAudio.SetRadioChannel(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1));
+ if (!cCustomSoundTrack::Instance()->IsPlaying())
+ DMAudio.SetRadioChannel(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1));
return 0;
/*
case COMMAND_OVERRIDE_HOSPITAL_LEVEL: