summaryrefslogtreecommitdiffstats
path: root/src/control/CarCtrl.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-07 11:33:20 +0200
committeraap <aap@papnet.eu>2020-05-07 11:33:20 +0200
commit05a1d64fbbe374dabb6572bb47d9a745464633bb (patch)
treee56b03fbb2c768324a4b540645eac2dc8c5bdf08 /src/control/CarCtrl.cpp
parentchanged default ID ranges. old default.ide incompatible now (diff)
downloadre3-05a1d64fbbe374dabb6572bb47d9a745464633bb.tar
re3-05a1d64fbbe374dabb6572bb47d9a745464633bb.tar.gz
re3-05a1d64fbbe374dabb6572bb47d9a745464633bb.tar.bz2
re3-05a1d64fbbe374dabb6572bb47d9a745464633bb.tar.lz
re3-05a1d64fbbe374dabb6572bb47d9a745464633bb.tar.xz
re3-05a1d64fbbe374dabb6572bb47d9a745464633bb.tar.zst
re3-05a1d64fbbe374dabb6572bb47d9a745464633bb.zip
Diffstat (limited to 'src/control/CarCtrl.cpp')
-rw-r--r--src/control/CarCtrl.cpp34
1 files changed, 25 insertions, 9 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index a4769d56..702bd411 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -302,9 +302,14 @@ CCarCtrl::GenerateOneRandomCar()
case RICH:
case EXEC:
case WORKER:
- case SPECIAL:
case BIG:
case TAXI:
+ // TODO(MIAMI): check this
+ case MOPED:
+ case MOTORBIKE:
+ case LEISUREBOAT:
+ case WORKERBOAT:
+ //
case MAFIA:
case TRIAD:
case DIABLO:
@@ -318,7 +323,7 @@ CCarCtrl::GenerateOneRandomCar()
pCar->AutoPilot.m_nCruiseSpeed = CGeneral::GetRandomNumberInRange(9, 14);
if (carClass == EXEC)
pCar->AutoPilot.m_nCruiseSpeed = CGeneral::GetRandomNumberInRange(12, 18);
- else if (carClass == POOR || carClass == SPECIAL)
+ else if (carClass == POOR)
pCar->AutoPilot.m_nCruiseSpeed = CGeneral::GetRandomNumberInRange(7, 10);
CVehicleModelInfo* pVehicleInfo = pCar->GetModelInfo();
if (pVehicleInfo->GetColModel()->boundingBox.max.y - pCar->GetModelInfo()->GetColModel()->boundingBox.min.y > 10.0f || carClass == BIG) {
@@ -475,7 +480,12 @@ CCarCtrl::GenerateOneRandomCar()
case RICH:
case EXEC:
case WORKER:
- case SPECIAL:
+ // TODO(MIAMI): check this
+ case MOPED:
+ case MOTORBIKE:
+ case LEISUREBOAT:
+ case WORKERBOAT:
+ //
case BIG:
case TAXI:
case MAFIA:
@@ -550,16 +560,17 @@ CCarCtrl::ChooseModel(CZoneInfo* pZone, CVector* pPos, int* pClass) {
int32 model = -1;
while (model == -1 || !CStreaming::HasModelLoaded(model)){
int rnd = CGeneral::GetRandomNumberInRange(0, 1000);
+ // TODO(MIAMI): new car classes
if (rnd < pZone->carThreshold[0])
- model = CCarCtrl::ChooseCarModel((*pClass = POOR));
+ model = CCarCtrl::ChooseCarModel((*pClass = NORMAL));
else if (rnd < pZone->carThreshold[1])
- model = CCarCtrl::ChooseCarModel((*pClass = RICH));
+ model = CCarCtrl::ChooseCarModel((*pClass = POOR));
else if (rnd < pZone->carThreshold[2])
- model = CCarCtrl::ChooseCarModel((*pClass = EXEC));
+ model = CCarCtrl::ChooseCarModel((*pClass = RICH));
else if (rnd < pZone->carThreshold[3])
- model = CCarCtrl::ChooseCarModel((*pClass = WORKER));
+ model = CCarCtrl::ChooseCarModel((*pClass = EXEC));
else if (rnd < pZone->carThreshold[4])
- model = CCarCtrl::ChooseCarModel((*pClass = SPECIAL));
+ model = CCarCtrl::ChooseCarModel((*pClass = WORKER));
else if (rnd < pZone->carThreshold[5])
model = CCarCtrl::ChooseCarModel((*pClass = BIG));
else if (rnd < pZone->copThreshold)
@@ -597,7 +608,12 @@ CCarCtrl::ChooseCarModel(int32 vehclass)
case RICH:
case EXEC:
case WORKER:
- case SPECIAL:
+ // TODO(MIAMI): check this
+ case MOPED:
+ case MOTORBIKE:
+ case LEISUREBOAT:
+ case WORKERBOAT:
+ //
case BIG:
case TAXI:
{