summaryrefslogtreecommitdiffstats
path: root/src/control/Script7.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/control/Script7.cpp')
-rw-r--r--src/control/Script7.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/control/Script7.cpp b/src/control/Script7.cpp
index 344ea2c7..220a7c4d 100644
--- a/src/control/Script7.cpp
+++ b/src/control/Script7.cpp
@@ -816,7 +816,12 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command)
//case COMMAND_HAS_CHAR_BEEN_DAMAGED_BY_CAR:
//case COMMAND_HAS_CAR_BEEN_DAMAGED_BY_CHAR:
//case COMMAND_HAS_CAR_BEEN_DAMAGED_BY_CAR:
- //case COMMAND_GET_RADIO_CHANNEL:
+ case COMMAND_GET_RADIO_CHANNEL:
+ {
+ // TODO
+ ScriptParams[0] = -1;
+ StoreParameters(&m_nIp, 1);
+ }
//case COMMAND_DISPLAY_TEXT_WITH_3_NUMBERS:
//case COMMAND_IS_CAR_DROWNING_IN_WATER:
case COMMAND_IS_CHAR_DROWNING_IN_WATER:
@@ -1327,7 +1332,19 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command)
CollectParameters(&m_nIp, 1);
UpdateCompareFlag(CPools::GetPedPool()->GetAt(ScriptParams[0]) != 0);
return 0;
- //case COMMAND_DOES_VEHICLE_EXIST:
+ case COMMAND_DOES_VEHICLE_EXIST:
+ {
+ // TODO
+ CollectParameters(&m_nIp, 1);
+ CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]);
+ bool bExist = false;
+ if (pVehicle) {
+ int index = CPools::GetVehiclePool()->GetJustIndex_NoFreeAssert(pVehicle);
+ bExist = (index >= 0 && index <= NUMVEHICLES); // TODO: FIX_BUGS
+ }
+ UpdateCompareFlag(bExist);
+ return 0;
+ }
//case COMMAND_ADD_SHORT_RANGE_BLIP_FOR_CONTACT_POINT:
case COMMAND_ADD_SHORT_RANGE_SPRITE_BLIP_FOR_CONTACT_POINT:
{