Fix teleporter bug with vehicles

This commit is contained in:
Grinch_ 2021-02-22 05:09:28 +06:00
parent c4566ac9c3
commit 4a4847f417

View File

@ -122,13 +122,13 @@ void Teleport::TeleportPlayer(bool get_marker, CVector pos, short interior_id)
Command<Commands::FREEZE_CHAR_POSITION_AND_DONT_LOAD_COLLISION>(CPools::GetPedRef(player), true);
}
CStreaming::LoadScene(&Teleport::STeleport::pos);
CStreaming::LoadSceneCollision(&Teleport::STeleport::pos);
CStreaming::LoadScene(&pos);
CStreaming::LoadSceneCollision(&pos);
CStreaming::LoadAllRequestedModels(false);
if (pVeh && player->m_nPedFlags.bInVehicle)
{
pVeh->Teleport(STeleport::pos, false);
pVeh->Teleport(pos, false);
if (pVeh->m_nVehicleClass == VEHICLE_BIKE)
reinterpret_cast<CBike*>(pVeh)->PlaceOnRoadProperly();