summaryrefslogtreecommitdiffstats
path: root/src/core/FileLoader.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-07 17:53:38 +0200
committeraap <aap@papnet.eu>2020-05-07 17:53:38 +0200
commit19b21cafcd0e457155c71f339dbccb94aff72d83 (patch)
tree3c61e0b3839ff14b9eaf8d30f88bcb4f4b265e65 /src/core/FileLoader.cpp
parentMerge branch 'miami' of github.com:GTAmodding/re3 into miami (diff)
downloadre3-19b21cafcd0e457155c71f339dbccb94aff72d83.tar
re3-19b21cafcd0e457155c71f339dbccb94aff72d83.tar.gz
re3-19b21cafcd0e457155c71f339dbccb94aff72d83.tar.bz2
re3-19b21cafcd0e457155c71f339dbccb94aff72d83.tar.lz
re3-19b21cafcd0e457155c71f339dbccb94aff72d83.tar.xz
re3-19b21cafcd0e457155c71f339dbccb94aff72d83.tar.zst
re3-19b21cafcd0e457155c71f339dbccb94aff72d83.zip
Diffstat (limited to '')
-rw-r--r--src/core/FileLoader.cpp50
1 files changed, 15 insertions, 35 deletions
diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp
index f886561c..a37adc21 100644
--- a/src/core/FileLoader.cpp
+++ b/src/core/FileLoader.cpp
@@ -826,54 +826,34 @@ CFileLoader::LoadVehicleObject(const char *line)
mi->m_handlingId = mod_HandlingManager.GetHandlingId(handlingId);
- // Well this is kinda dumb....
- if(strncmp(vehclass, "normal", 7) == 0){
+ if(strncmp(vehclass, "normal", 7) == 0)
mi->m_vehicleClass = CCarCtrl::NORMAL;
- while(frequency-- > 0)
- CCarCtrl::AddToCarArray(id, CCarCtrl::NORMAL);
- }else if(strncmp(vehclass, "poorfamily", 11) == 0){
+ else if(strncmp(vehclass, "poorfamily", 11) == 0)
mi->m_vehicleClass = CCarCtrl::POOR;
- while(frequency-- > 0)
- CCarCtrl::AddToCarArray(id, CCarCtrl::POOR);
- }else if(strncmp(vehclass, "richfamily", 11) == 0){
+ else if(strncmp(vehclass, "richfamily", 11) == 0)
mi->m_vehicleClass = CCarCtrl::RICH;
- while(frequency-- > 0)
- CCarCtrl::AddToCarArray(id, CCarCtrl::RICH);
- }else if(strncmp(vehclass, "executive", 10) == 0){
+ else if(strncmp(vehclass, "executive", 10) == 0)
mi->m_vehicleClass = CCarCtrl::EXEC;
- while(frequency-- > 0)
- CCarCtrl::AddToCarArray(id, CCarCtrl::EXEC);
- }else if(strncmp(vehclass, "worker", 7) == 0){
+ else if(strncmp(vehclass, "worker", 7) == 0)
mi->m_vehicleClass = CCarCtrl::WORKER;
- while(frequency-- > 0)
- CCarCtrl::AddToCarArray(id, CCarCtrl::WORKER);
- }else if(strncmp(vehclass, "big", 4) == 0){
+ else if(strncmp(vehclass, "big", 4) == 0)
mi->m_vehicleClass = CCarCtrl::BIG;
- while(frequency-- > 0)
- CCarCtrl::AddToCarArray(id, CCarCtrl::BIG);
- }else if(strncmp(vehclass, "taxi", 5) == 0){
+ else if(strncmp(vehclass, "taxi", 5) == 0)
mi->m_vehicleClass = CCarCtrl::TAXI;
- while(frequency-- > 0)
- CCarCtrl::AddToCarArray(id, CCarCtrl::TAXI);
- }else if(strncmp(vehclass, "moped", 6) == 0){
+ else if(strncmp(vehclass, "moped", 6) == 0)
mi->m_vehicleClass = CCarCtrl::MOPED;
- while(frequency-- > 0)
- CCarCtrl::AddToCarArray(id, CCarCtrl::MOPED);
- }else if(strncmp(vehclass, "motorbike", 10) == 0){
+ else if(strncmp(vehclass, "motorbike", 10) == 0)
mi->m_vehicleClass = CCarCtrl::MOTORBIKE;
- while(frequency-- > 0)
- CCarCtrl::AddToCarArray(id, CCarCtrl::MOTORBIKE);
- }else if(strncmp(vehclass, "leisureboat", 12) == 0){
+ else if(strncmp(vehclass, "leisureboat", 12) == 0)
mi->m_vehicleClass = CCarCtrl::LEISUREBOAT;
- while(frequency-- > 0)
- CCarCtrl::AddToCarArray(id, CCarCtrl::LEISUREBOAT);
- }else if(strncmp(vehclass, "workerboat", 11) == 0){
+ else if(strncmp(vehclass, "workerboat", 11) == 0)
mi->m_vehicleClass = CCarCtrl::WORKERBOAT;
- while(frequency-- > 0)
- CCarCtrl::AddToCarArray(id, CCarCtrl::WORKERBOAT);
- }else if(strncmp(vehclass, "ignore", 11) == 0){
+ else if(strncmp(vehclass, "ignore", 11) == 0){
mi->m_vehicleClass = -1;
+ return;
}
+ CCarCtrl::AddToCarArray(id, mi->m_vehicleClass);
+ mi->m_frequency = frequency;
}
void