mirror of
https://github.com/GTAmodding/re3.git
synced 2024-12-29 03:45:40 +00:00
fix debug teleport
This commit is contained in:
parent
b2daa0e502
commit
7a80acf6a1
1 changed files with 9 additions and 8 deletions
|
@ -47,6 +47,7 @@
|
||||||
#include "CarCtrl.h"
|
#include "CarCtrl.h"
|
||||||
#include "Population.h"
|
#include "Population.h"
|
||||||
#include "IniFile.h"
|
#include "IniFile.h"
|
||||||
|
#include "Zones.h"
|
||||||
|
|
||||||
#include "crossplatform.h"
|
#include "crossplatform.h"
|
||||||
|
|
||||||
|
@ -775,14 +776,14 @@ FixCar(void)
|
||||||
static void
|
static void
|
||||||
TeleportToWaypoint(void)
|
TeleportToWaypoint(void)
|
||||||
{
|
{
|
||||||
CStreaming::LoadScene(CRadar::TargetMarkerPos);
|
if (CRadar::TargetMarkerId == -1)
|
||||||
CStreaming::LoadSceneCollision(CRadar::TargetMarkerPos);
|
return;
|
||||||
if (FindPlayerVehicle()) {
|
CEntity* pEntityToTeleport = FindPlayerEntity();
|
||||||
if (CRadar::TargetMarkerId != -1)
|
CVector vNewPos = CRadar::TargetMarkerPos;
|
||||||
FindPlayerVehicle()->Teleport(CRadar::TargetMarkerPos + CVector(0.0f, 0.0f, CWorld::FindGroundZForCoord(CRadar::TargetMarkerPos.x, CRadar::TargetMarkerPos.y) + FindPlayerVehicle()->GetColModel()->boundingSphere.radius));
|
CStreaming::LoadScene(vNewPos);
|
||||||
} else
|
CStreaming::LoadSceneCollision(vNewPos);
|
||||||
if(CRadar::TargetMarkerId != -1)
|
vNewPos.z = CWorld::FindGroundZForCoord(vNewPos.x, vNewPos.y) + pEntityToTeleport->GetDistanceFromCentreOfMassToBaseOfModel();
|
||||||
FindPlayerPed()->Teleport(CRadar::TargetMarkerPos + CVector(0.0f, 0.0f, CWorld::FindGroundZForCoord(CRadar::TargetMarkerPos.x, CRadar::TargetMarkerPos.y) + FEET_OFFSET));
|
pEntityToTeleport->Teleport(vNewPos);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue