diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-07 22:22:15 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-07 22:22:15 +0200 |
commit | b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04 (patch) | |
tree | ab07a4b632108268d62700baf702536c1e87b4f9 /src/core/FileLoader.cpp | |
parent | intermediate changes (diff) | |
parent | CBaseModelInfo done (diff) | |
download | re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.tar re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.tar.gz re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.tar.bz2 re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.tar.lz re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.tar.xz re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.tar.zst re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/FileLoader.cpp | 50 |
1 files changed, 15 insertions, 35 deletions
diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp index ee429806..07e2eee7 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 |