Fix an issue where spawn max could crash the game for some vehicles (#341)

This commit is contained in:
aa15032261
2022-07-17 04:36:05 +08:00
committed by GitHub
parent 399d41d74a
commit 14e0a112ae
8 changed files with 369 additions and 244 deletions

View File

@ -136,12 +136,7 @@ namespace big
spawn_plate = personal_veh->get_plate();
}
auto veh = vehicle::clone(veh_data, spawn_location, spawn_heading);
if (g->clone_pv.spawn_inside)
{
vehicle::telport_into_veh(veh);
}
auto veh = vehicle::clone_from_vehicle_data(veh_data, spawn_location, spawn_heading);
if (g->clone_pv.spawn_maxed)
{
@ -149,6 +144,11 @@ namespace big
}
vehicle::set_plate(veh, spawn_plate);
if (g->clone_pv.spawn_inside)
{
vehicle::teleport_into_vehicle(veh);
}
}
else
{