summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/audio/AudioManager.cpp2
-rw-r--r--src/control/RoadBlocks.cpp10
-rw-r--r--src/modelinfo/ModelIndices.h3
3 files changed, 8 insertions, 7 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index ec520eaa..a417e077 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -7989,7 +7989,7 @@ cAudioManager::ProcessVehicle(CVehicle *veh)
if (handling)
params.m_pTransmission = &handling->Transmission;
- params.m_nIndex = veh->GetModelIndex() - 90;
+ params.m_nIndex = veh->GetModelIndex() - MI_FIRST_VEHICLE;
if (params.m_pVehicle->GetStatus() == STATUS_SIMPLE)
velChange = params.m_pVehicle->AutoPilot.m_fMaxTrafficSpeed * 0.02f;
else
diff --git a/src/control/RoadBlocks.cpp b/src/control/RoadBlocks.cpp
index 1c0d9f96..572f8134 100644
--- a/src/control/RoadBlocks.cpp
+++ b/src/control/RoadBlocks.cpp
@@ -79,8 +79,8 @@ CRoadBlocks::GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType
if (copType == COP_STREET)
pCopPed->SetCurrentWeapon(WEAPONTYPE_COLT45);
CPedPlacement::FindZCoorForPed(&posForZ);
- pCopPed->m_matrix.GetPosition() = posForZ;
- CVector vecSavedPos = pCopPed->m_matrix.GetPosition();
+ pCopPed->SetPosition(posForZ);
+ CVector vecSavedPos = pCopPed->GetPosition();
pCopPed->m_matrix.SetRotate(0.0f, 0.0f, -HALFPI);
pCopPed->m_matrix.GetPosition() += vecSavedPos;
pCopPed->m_bIsDisabledCop = true;
@@ -133,8 +133,8 @@ CRoadBlocks::GenerateRoadBlocks(void)
float fModelRadius = 2.0f * pVehicleColModel->boundingSphere.radius + 0.25f;
int16 radius = (int16)(fMapObjectRadius / fModelRadius);
if (radius > 0 && radius < 6) {
- CVector2D vecDistanceToCamera = TheCamera.GetPosition() - mapObject->m_matrix.GetPosition();
- float fDotProduct = DotProduct2D(vecDistanceToCamera, mapObject->m_matrix.GetUp());
+ CVector2D vecDistanceToCamera = TheCamera.GetPosition() - mapObject->GetPosition();
+ float fDotProduct = DotProduct2D(vecDistanceToCamera, mapObject->GetForward());
float fOffset = 0.5f * fModelRadius * (float)(radius - 1);
for (int16 i = 0; i < radius; i++) {
uint8 nRoadblockType = fDotProduct < 0.0f;
@@ -174,7 +174,7 @@ CRoadBlocks::GenerateRoadBlocks(void)
pVehicle->bExtendedRange = true;
if (pVehicle->UsesSiren(pVehicle->GetModelIndex()) && CGeneral::GetRandomNumber() & 1)
pVehicle->m_bSirenOrAlarm = true;
- if (pVehicle->m_matrix.GetForward().z > 0.94f) {
+ if (pVehicle->GetForward().z > 0.94f) {
CVisibilityPlugins::SetClumpAlpha(pVehicle->GetClump(), 0);
CWorld::Add(pVehicle);
pVehicle->bCreateRoadBlockPeds = true;
diff --git a/src/modelinfo/ModelIndices.h b/src/modelinfo/ModelIndices.h
index 8e117882..cc6ed25c 100644
--- a/src/modelinfo/ModelIndices.h
+++ b/src/modelinfo/ModelIndices.h
@@ -255,7 +255,8 @@ enum
MI_BUSKER4,
// three more peds possible
- MI_LANDSTAL = 90,
+ MI_FIRST_VEHICLE = 90,
+ MI_LANDSTAL = MI_FIRST_VEHICLE,
MI_IDAHO,
MI_STINGER,
MI_LINERUN,