diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Cam.cpp | 2 | ||||
-rw-r--r-- | src/core/FileLoader.cpp | 59 | ||||
-rw-r--r-- | src/core/PlayerInfo.cpp | 2 | ||||
-rw-r--r-- | src/core/Streaming.cpp | 9 | ||||
-rw-r--r-- | src/core/config.h | 2 | ||||
-rw-r--r-- | src/core/re3.cpp | 30 |
6 files changed, 67 insertions, 37 deletions
diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp index e33e6bb0..2a147350 100644 --- a/src/core/Cam.cpp +++ b/src/core/Cam.cpp @@ -4907,7 +4907,7 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation, bool correctAlpha = true; // if (SA checks if we aren't in work car, why?) { - if (!isCar || car->GetModelIndex() != MI_YARDIE) { + if (!isCar || car->GetModelIndex() != MI_VOODOO) { correctAlpha = false; } else { diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp index b42cd0a2..ee429806 100644 --- a/src/core/FileLoader.cpp +++ b/src/core/FileLoader.cpp @@ -781,21 +781,22 @@ CFileLoader::LoadVehicleObject(const char *line) { int id; char model[24], txd[24]; - char type[8], handlingId[16], gamename[32], vehclass[12]; + char type[8], handlingId[16], gamename[32], anims[16], vehclass[12]; uint32 frequency, comprules; int32 level, misc; float wheelScale; CVehicleModelInfo *mi; char *p; - sscanf(line, "%d %s %s %s %s %s %s %d %d %x %d %f", + sscanf(line, "%d %s %s %s %s %s %s %s %d %d %x %d %f", &id, model, txd, - type, handlingId, gamename, vehclass, + type, handlingId, gamename, anims, vehclass, &frequency, &level, &comprules, &misc, &wheelScale); mi = CModelInfo::AddVehicleModel(id); mi->SetName(model); mi->SetTexDictionary(txd); + // TODO(MIAMI): anims for(p = gamename; *p; p++) if(*p == '_') *p = ' '; strncpy(mi->m_gameName, gamename, 32); @@ -826,34 +827,52 @@ CFileLoader::LoadVehicleObject(const char *line) mi->m_handlingId = mod_HandlingManager.GetHandlingId(handlingId); // Well this is kinda dumb.... - if(strncmp(vehclass, "poorfamily", 11) == 0){ - mi->m_vehicleClass = VEHICLE_CLASS_POOR; + if(strncmp(vehclass, "normal", 7) == 0){ + mi->m_vehicleClass = CCarCtrl::NORMAL; while(frequency-- > 0) - CCarCtrl::AddToCarArray(id, VEHICLE_CLASS_POOR); + CCarCtrl::AddToCarArray(id, CCarCtrl::NORMAL); + }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){ - mi->m_vehicleClass = VEHICLE_CLASS_RICH; + mi->m_vehicleClass = CCarCtrl::RICH; while(frequency-- > 0) - CCarCtrl::AddToCarArray(id, VEHICLE_CLASS_RICH); + CCarCtrl::AddToCarArray(id, CCarCtrl::RICH); }else if(strncmp(vehclass, "executive", 10) == 0){ - mi->m_vehicleClass = VEHICLE_CLASS_EXECUTIVE; + mi->m_vehicleClass = CCarCtrl::EXEC; while(frequency-- > 0) - CCarCtrl::AddToCarArray(id, VEHICLE_CLASS_EXECUTIVE); + CCarCtrl::AddToCarArray(id, CCarCtrl::EXEC); }else if(strncmp(vehclass, "worker", 7) == 0){ - mi->m_vehicleClass = VEHICLE_CLASS_WORKER; - while(frequency-- > 0) - CCarCtrl::AddToCarArray(id, VEHICLE_CLASS_WORKER); - }else if(strncmp(vehclass, "special", 8) == 0){ - mi->m_vehicleClass = VEHICLE_CLASS_SPECIAL; + mi->m_vehicleClass = CCarCtrl::WORKER; while(frequency-- > 0) - CCarCtrl::AddToCarArray(id, VEHICLE_CLASS_SPECIAL); + CCarCtrl::AddToCarArray(id, CCarCtrl::WORKER); }else if(strncmp(vehclass, "big", 4) == 0){ - mi->m_vehicleClass = VEHICLE_CLASS_BIG; + mi->m_vehicleClass = CCarCtrl::BIG; while(frequency-- > 0) - CCarCtrl::AddToCarArray(id, VEHICLE_CLASS_BIG); + CCarCtrl::AddToCarArray(id, CCarCtrl::BIG); }else if(strncmp(vehclass, "taxi", 5) == 0){ - mi->m_vehicleClass = VEHICLE_CLASS_TAXI; + mi->m_vehicleClass = CCarCtrl::TAXI; + while(frequency-- > 0) + CCarCtrl::AddToCarArray(id, CCarCtrl::TAXI); + }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){ + mi->m_vehicleClass = CCarCtrl::MOTORBIKE; + while(frequency-- > 0) + CCarCtrl::AddToCarArray(id, CCarCtrl::MOTORBIKE); + }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){ + mi->m_vehicleClass = CCarCtrl::WORKERBOAT; while(frequency-- > 0) - CCarCtrl::AddToCarArray(id, VEHICLE_CLASS_TAXI); + CCarCtrl::AddToCarArray(id, CCarCtrl::WORKERBOAT); + }else if(strncmp(vehclass, "ignore", 11) == 0){ + mi->m_vehicleClass = -1; } } diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp index ec6d3023..3db42d8b 100644 --- a/src/core/PlayerInfo.cpp +++ b/src/core/PlayerInfo.cpp @@ -354,7 +354,7 @@ CPlayerInfo::Process(void) bool startTaxiTimer = true; if (m_bUnusedTaxiThing && m_pPed->bInVehicle) { CVehicle *veh = m_pPed->m_pMyVehicle; - if ((veh->GetModelIndex() == MI_TAXI || veh->GetModelIndex() == MI_CABBIE || veh->GetModelIndex() == MI_BORGNINE) + if (veh->IsTaxi() && veh->pDriver == m_pPed && veh->m_nNumPassengers != 0) { for (uint32 timePassed = CTimer::GetTimeInMilliseconds() - m_nUnusedTaxiTimer; timePassed >= 1000; m_nUnusedTaxiTimer += 1000) { timePassed -= 1000; diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp index 54d34848..05b0c1f9 100644 --- a/src/core/Streaming.cpp +++ b/src/core/Streaming.cpp @@ -1285,8 +1285,11 @@ CStreaming::StreamVehiclesAndPeds(void) else if(ms_numVehiclesLoaded <= desiredNumVehiclesLoaded){ for(i = 1; i <= 10; i++){ model = CCarCtrl::ChooseCarModel(modelQualityClass); +// TODO(MIAMI): check this +if(model < 0) + continue; modelQualityClass++; - if(modelQualityClass >= NUM_VEHICLE_CLASSES) + if(modelQualityClass >= CCarCtrl::TOTAL_CUSTOM_CLASSES) modelQualityClass = 0; // check if we want to load this model @@ -1374,6 +1377,10 @@ CStreaming::StreamZoneModels(const CVector &pos) ms_loadedGangs &= ~bit; } +// TODO(MIAMI): check this +if(CGangs::GetGangInfo(i)->m_nVehicleMI < 0) + continue; + if(gangCarsToLoad & bit && (ms_loadedGangCars & bit) == 0){ RequestModel(CGangs::GetGangInfo(i)->m_nVehicleMI, STREAMFLAGS_DONT_REMOVE); }else if((gangCarsToLoad & bit) == 0 && ms_loadedGangCars & bit){ diff --git a/src/core/config.h b/src/core/config.h index 110794b6..f4cc8b05 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -61,7 +61,7 @@ enum Config { // Cull zones NUMATTRIBZONES = 704, - NUMHANDLINGS = 57, + NUMHANDLINGS = 106, PATHNODESIZE = 4500, diff --git a/src/core/re3.cpp b/src/core/re3.cpp index 739786b5..c221d64b 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -193,11 +193,17 @@ ResetCamStatics(void) } static const char *carnames[] = { - "landstal", "idaho", "stinger", "linerun", "peren", "sentinel", "patriot", "firetruk", "trash", "stretch", "manana", "infernus", "blista", "pony", - "mule", "cheetah", "ambulan", "fbicar", "moonbeam", "esperant", "taxi", "kuruma", "bobcat", "mrwhoop", "bfinject", "corpse", "police", "enforcer", - "securica", "banshee", "predator", "bus", "rhino", "barracks", "train", "chopper", "dodo", "coach", "cabbie", "stallion", "rumpo", "rcbandit", - "bellyup", "mrwongs", "mafia", "yardie", "yakuza", "diablos", "columb", "hoods", "airtrain", "deaddodo", "speeder", "reefer", "panlant", "flatbed", - "yankee", "escape", "borgnine", "toyz", "ghost", + "landstal", "idaho", "stinger", "linerun", "peren", "sentinel", "rio", "firetruk", "trash", "stretch", "manana", + "infernus", "voodoo", "pony", "mule", "cheetah", "ambulan", "fbicar", "moonbeam", "esperant", "taxi", "washing", + "bobcat", "mrwhoop", "bfinject", "hunter", "police", "enforcer", "securica", "banshee", "predator", "bus", + "rhino", "barracks", "cuban", "chopper", "angel", "coach", "cabbie", "stallion", "rumpo", "rcbandit", "romero", + "packer", "sentxs", "admiral", "squalo", "seaspar", "pizzaboy", "gangbur", "airtrain", "deaddodo", "speeder", + "reefer", "tropic", "flatbed", "yankee", "caddy", "zebra", "topfun", "skimmer", "pcj600", "faggio", "freeway", + "rcbaron", "rcraider", "glendale", "oceanic", "sanchez", "sparrow", "patriot", "lovefist", "coastg", "dinghy", + "hermes", "sabre", "sabretur", "pheonix", "walton", "regina", "comet", "deluxo", "burrito", "spand", "marquis", + "baggage", "kaufman", "maverick", "vcnmav", "rancher", "fbiranch", "virgo", "greenwoo", "jetmax", "hotring", + "sandking", "blistac", "polmav", "boxville", "benson", "mesa", "rcgoblin", "hotrina", "hotrinb", + "bloodra", "bloodrb", "vicechee" }; static std::list<CTweakVar *> TweakVarsList; @@ -292,14 +298,12 @@ DebugMenuPopulate(void) DebugMenuAddCmd("Cheats", "Nasty limbs", NastyLimbsCheat); static int spawnCarId = MI_LANDSTAL; - e = DebugMenuAddVar("Spawn", "Spawn Car ID", &spawnCarId, nil, 1, MI_LANDSTAL, MI_GHOST, carnames); + e = DebugMenuAddVar("Spawn", "Spawn Car ID", &spawnCarId, nil, 1, MI_LANDSTAL, MI_VICECHEE, carnames); DebugMenuEntrySetWrap(e, true); DebugMenuAddCmd("Spawn", "Spawn Car", [](){ - if(spawnCarId == MI_TRAIN || - spawnCarId == MI_CHOPPER || + if(spawnCarId == MI_CHOPPER || spawnCarId == MI_AIRTRAIN || - spawnCarId == MI_DEADDODO || - spawnCarId == MI_ESCAPE) + spawnCarId == MI_DEADDODO) return; SpawnCar(spawnCarId); }); @@ -311,13 +315,13 @@ DebugMenuPopulate(void) DebugMenuAddCmd("Spawn", "Spawn Cheetah", [](){ SpawnCar(MI_CHEETAH); }); DebugMenuAddCmd("Spawn", "Spawn Esperanto", [](){ SpawnCar(MI_ESPERANT); }); DebugMenuAddCmd("Spawn", "Spawn Stallion", [](){ SpawnCar(MI_STALLION); }); - DebugMenuAddCmd("Spawn", "Spawn Kuruma", [](){ SpawnCar(MI_KURUMA); }); + DebugMenuAddCmd("Spawn", "Spawn Washington", [](){ SpawnCar(MI_WASHING); }); DebugMenuAddCmd("Spawn", "Spawn Taxi", [](){ SpawnCar(MI_TAXI); }); DebugMenuAddCmd("Spawn", "Spawn Police", [](){ SpawnCar(MI_POLICE); }); DebugMenuAddCmd("Spawn", "Spawn Enforcer", [](){ SpawnCar(MI_ENFORCER); }); DebugMenuAddCmd("Spawn", "Spawn Banshee", [](){ SpawnCar(MI_BANSHEE); }); - DebugMenuAddCmd("Spawn", "Spawn Yakuza", [](){ SpawnCar(MI_YAKUZA); }); - DebugMenuAddCmd("Spawn", "Spawn Yardie", [](){ SpawnCar(MI_YARDIE); }); + DebugMenuAddCmd("Spawn", "Spawn Cuban", [](){ SpawnCar(MI_CUBAN); }); + DebugMenuAddCmd("Spawn", "Spawn Voodoo", [](){ SpawnCar(MI_VOODOO); }); DebugMenuAddCmd("Spawn", "Spawn Dodo", [](){ SpawnCar(MI_DODO); }); DebugMenuAddCmd("Spawn", "Spawn Rhino", [](){ SpawnCar(MI_RHINO); }); DebugMenuAddCmd("Spawn", "Spawn Firetruck", [](){ SpawnCar(MI_FIRETRUCK); }); |