summaryrefslogtreecommitdiffstats
path: root/src/control/Script4.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/control/Script4.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/control/Script4.cpp b/src/control/Script4.cpp
index a8658532..1337605f 100644
--- a/src/control/Script4.cpp
+++ b/src/control/Script4.cpp
@@ -106,7 +106,10 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
printf("Couldn't find zone - %s\n", zone);
return 0;
}
- CTheZones::SetPedGroup(zone_id, ScriptParams[0], ScriptParams[1]);
+ while (zone_id >= 0) {
+ CTheZones::SetPedGroup(zone_id, ScriptParams[0], ScriptParams[1]);
+ zone_id = CTheZones::FindNextZoneByLabelAndReturnIndex(zone, ZONE_INFO);
+ }
return 0;
}
case COMMAND_START_CAR_FIRE:
@@ -954,7 +957,10 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
pPed->WarpPedIntoCar(pVehicle);
return 0;
}
- //case COMMAND_SWITCH_CAR_RADIO:
+ case COMMAND_SWITCH_CAR_RADIO:
+ CollectParameters(&m_nIp, 1);
+ DMAudio.ChangeMusicMode(ScriptParams[0]);
+ return 0;
//case COMMAND_SET_AUDIO_STREAM:
case COMMAND_PRINT_WITH_2_NUMBERS_BIG:
{
@@ -1354,11 +1360,13 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
CTxdStore::AddRef(slot);
return 0;
}
+ /*
case COMMAND_REMOVE_TEXTURE_DICTIONARY:
{
CTheScripts::RemoveScriptTextureDictionary();
return 0;
}
+ */
case COMMAND_SET_OBJECT_DYNAMIC:
{
CollectParameters(&m_nIp, 2);
@@ -1418,7 +1426,6 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
pVehicle->m_bSirenOrAlarm = ScriptParams[1] != 0;
return 0;
}
- /*
case COMMAND_SWITCH_PED_ROADS_ON_ANGLED:
{
CollectParameters(&m_nIp, 7);
@@ -1441,7 +1448,6 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
ThePaths.SwitchRoadsInAngledArea(*(float*)&ScriptParams[0], *(float*)&ScriptParams[1], *(float*)&ScriptParams[2],
*(float*)&ScriptParams[3], *(float*)&ScriptParams[4], *(float*)&ScriptParams[5], *(float*)&ScriptParams[6], 1, 0);
return 0;
- */
case COMMAND_SET_CAR_WATERTIGHT:
{
CollectParameters(&m_nIp, 2);
@@ -1781,7 +1787,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
*/
case COMMAND_DISPLAY_ONSCREEN_TIMER_WITH_STRING:
{
- script_assert(CTheScripts::ScriptSpace[m_nIp++] == ARGUMENT_GLOBALVAR);
+ //script_assert(CTheScripts::ScriptSpace[m_nIp++] == ARGUMENT_GLOBALVAR);
uint16 var = CTheScripts::Read2BytesFromScript(&m_nIp);
CollectParameters(&m_nIp, 1);
wchar* text = TheText.Get((char*)&CTheScripts::ScriptSpace[m_nIp]); // ???
@@ -1792,7 +1798,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
}
case COMMAND_DISPLAY_ONSCREEN_COUNTER_WITH_STRING:
{
- script_assert(CTheScripts::ScriptSpace[m_nIp++] == ARGUMENT_GLOBALVAR);
+ //script_assert(CTheScripts::ScriptSpace[m_nIp++] == ARGUMENT_GLOBALVAR);
uint16 var = CTheScripts::Read2BytesFromScript(&m_nIp);
CollectParameters(&m_nIp, 1);
wchar* text = TheText.Get((char*)&CTheScripts::ScriptSpace[m_nIp]); // ???
@@ -1967,12 +1973,10 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
CWorld::Add(car);
return 0;
}
- /*
case COMMAND_IS_COLLISION_IN_MEMORY:
CollectParameters(&m_nIp, 1);
UpdateCompareFlag(CCollision::ms_collisionInMemory == ScriptParams[0]);
return 0;
- */
case COMMAND_SET_WANTED_MULTIPLIER:
CollectParameters(&m_nIp, 1);
FindPlayerPed()->m_pWanted->m_fCrimeSensitivity = *(float*)&ScriptParams[0];
@@ -2042,7 +2046,8 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
case COMMAND_HAS_MISSION_AUDIO_LOADED:
{
CollectParameters(&m_nIp, 1);
- UpdateCompareFlag(DMAudio.GetMissionAudioLoadingStatus(ScriptParams[0] - 1) == 1);
+ //UpdateCompareFlag(DMAudio.GetMissionAudioLoadingStatus(ScriptParams[0] - 1) == 1);
+ UpdateCompareFlag(true); // TODO
return 0;
}
case COMMAND_PLAY_MISSION_AUDIO:
@@ -2052,7 +2057,8 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
case COMMAND_HAS_MISSION_AUDIO_FINISHED:
{
CollectParameters(&m_nIp, 1);
- UpdateCompareFlag(DMAudio.IsMissionAudioSampleFinished(ScriptParams[0] - 1));
+ //UpdateCompareFlag(DMAudio.IsMissionAudioSampleFinished(ScriptParams[0] - 1)); // TODO
+ UpdateCompareFlag(true);
return 0;
}
case COMMAND_GET_CLOSEST_CAR_NODE_WITH_HEADING: