summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/control/CarCtrl.cpp4
-rw-r--r--src/control/Replay.cpp4
-rw-r--r--src/control/Script.cpp14
3 files changed, 11 insertions, 11 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index 8455e9ef..ca8d1c30 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -47,7 +47,7 @@ int32 &CCarCtrl::MaxNumberOfCarsInUse = *(int32*)0x5EC8B8;
uint32 &CCarCtrl::LastTimeLawEnforcerCreated = *(uint32*)0x8F5FF0;
int32 (&CCarCtrl::TotalNumOfCarsOfRating)[7] = *(int32(*)[7])*(uintptr*)0x8F1A60;
int32 (&CCarCtrl::NextCarOfRating)[7] = *(int32(*)[7])*(uintptr*)0x9412AC;
-int32 (&CCarCtrl::CarArrays)[7][256] = *(int32(*)[7][256])*(uintptr*)0x6EB860;
+int32 (&CCarCtrl::CarArrays)[7][MAX_CAR_MODELS_IN_ARRAY] = *(int32(*)[7][MAX_CAR_MODELS_IN_ARRAY])*(uintptr*)0x6EB860;
CVehicle* (&apCarsToKeep)[MAX_CARS_TO_KEEP] = *(CVehicle*(*)[MAX_CARS_TO_KEEP])*(uintptr*)0x70D830;
WRAPPER void CCarCtrl::SwitchVehicleToRealPhysics(CVehicle*) { EAXJMP(0x41F7F0); }
@@ -694,7 +694,7 @@ CCarCtrl::PossiblyRemoveVehicle(CVehicle* pVehicle)
if (pVehicle->m_status != STATUS_WRECKED || pVehicle->m_nTimeOfDeath == 0)
return;
if (CTimer::GetTimeInMilliseconds() > pVehicle->m_nTimeOfDeath + 60000 &&
- (!pVehicle->GetIsOnScreen() || CRenderer::IsEntityCullZoneVisible(pVehicle))){
+ (!pVehicle->GetIsOnScreen() || !CRenderer::IsEntityCullZoneVisible(pVehicle))){
if ((pVehicle->GetPosition() - vecPlayerPos).MagnitudeSqr() > SQR(7.5f)){
if (!CGarages::IsPointWithinHideOutGarage(&pVehicle->GetPosition())){
CWorld::Remove(pVehicle);
diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp
index 1e77da3a..12636d32 100644
--- a/src/control/Replay.cpp
+++ b/src/control/Replay.cpp
@@ -1166,7 +1166,7 @@ void CReplay::RestoreStuffFromMem(void)
ped->m_modelIndex = -1;
ped->SetModelIndex(mi);
ped->m_pVehicleAnim = 0;
- ped->m_audioEntityId = DMAudio.CreateEntity(0, ped);
+ ped->m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, ped);
DMAudio.SetEntityStatus(ped->m_audioEntityId, true);
CPopulation::UpdatePedCount(ped->m_nPedType, false);
if (ped->m_wepModelID >= 0)
@@ -1204,7 +1204,7 @@ void CReplay::RestoreStuffFromMem(void)
car->SetDoorDamage(CAR_DOOR_LR, DOOR_REAR_LEFT, true);
car->SetDoorDamage(CAR_DOOR_RR, DOOR_REAR_RIGHT, true);
}
- vehicle->m_audioEntityId = DMAudio.CreateEntity(0, vehicle);
+ vehicle->m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, vehicle);
DMAudio.SetEntityStatus(vehicle->m_audioEntityId, true);
CCarCtrl::UpdateCarCount(vehicle, false);
if ((mi == MI_AIRTRAIN || mi == MI_DEADDODO) && vehicle->m_rwObject){
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index c3c3a154..c81cd050 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -3494,9 +3494,9 @@ int8 CRunningScript::ProcessCommandsFrom300To399(int32 command)
break;
}
cAudioScriptObject* obj = new cAudioScriptObject();
- obj->m_vecPos = *(CVector*)&ScriptParams[0];
- obj->m_wSound = ScriptParams[3];
- obj->m_nAudioEntityId = -5;
+ obj->Posn = *(CVector*)&ScriptParams[0];
+ obj->AudioId = ScriptParams[3];
+ obj->AudioEntity = AEHANDLE_NONE;
/* BUG: if audio is not initialized, this object will not be freed. */
/* Issue needs to be addressed in CreateOneShotScriptObject. */
DMAudio.CreateOneShotScriptObject(obj);
@@ -3506,9 +3506,9 @@ int8 CRunningScript::ProcessCommandsFrom300To399(int32 command)
{
CollectParameters(&m_nIp, 4);
cAudioScriptObject* obj = new cAudioScriptObject();
- obj->m_vecPos = *(CVector*)&ScriptParams[0];
- obj->m_wSound = ScriptParams[3];
- obj->m_nAudioEntityId = DMAudio.CreateLoopingScriptObject(obj);
+ obj->Posn = *(CVector*)&ScriptParams[0];
+ obj->AudioId = ScriptParams[3];
+ obj->AudioEntity = DMAudio.CreateLoopingScriptObject(obj);
ScriptParams[0] = CPools::GetAudioScriptObjectPool()->GetIndex(obj);
StoreParameters(&m_nIp, 1);
return 0;
@@ -3521,7 +3521,7 @@ int8 CRunningScript::ProcessCommandsFrom300To399(int32 command)
debug("REMOVE_SOUND - Sound doesn't exist\n");
return 0;
}
- DMAudio.DestroyLoopingScriptObject(obj->m_nAudioEntityId);
+ DMAudio.DestroyLoopingScriptObject(obj->AudioEntity);
delete obj;
return 0;
}