diff options
author | erorcun <erayorcunus@gmail.com> | 2020-04-16 21:21:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-16 21:21:43 +0200 |
commit | 435a9ca7f272f0238440b939bc57c78d2385dd1a (patch) | |
tree | 78ca1babbac01fff758c20ed9ae4bc3ffb210095 /src/core/re3.cpp | |
parent | More refs removed (diff) | |
parent | Some refs removed, little fixes and teleport (diff) | |
download | re3-435a9ca7f272f0238440b939bc57c78d2385dd1a.tar re3-435a9ca7f272f0238440b939bc57c78d2385dd1a.tar.gz re3-435a9ca7f272f0238440b939bc57c78d2385dd1a.tar.bz2 re3-435a9ca7f272f0238440b939bc57c78d2385dd1a.tar.lz re3-435a9ca7f272f0238440b939bc57c78d2385dd1a.tar.xz re3-435a9ca7f272f0238440b939bc57c78d2385dd1a.tar.zst re3-435a9ca7f272f0238440b939bc57c78d2385dd1a.zip |
Diffstat (limited to 'src/core/re3.cpp')
-rw-r--r-- | src/core/re3.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/re3.cpp b/src/core/re3.cpp index 5d76d642..ecf02f39 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -24,6 +24,8 @@ #include "Hud.h" #include "SceneEdit.h" #include "Pad.h" +#include "PlayerPed.h" +#include "Radar.h" #include <list> @@ -164,6 +166,19 @@ FixCar(void) ((CAutomobile*)veh)->Fix(); } +#ifdef MENU_MAP +static void +TeleportToWaypoint(void) +{ + if (FindPlayerVehicle()) { + if (CRadar::TargetMarkerId != -1) + FindPlayerVehicle()->Teleport(CRadar::TargetMarkerPos + CVector(0.0f, 0.0f, FindPlayerVehicle()->GetColModel()->boundingSphere.center.z)); + } else + if(CRadar::TargetMarkerId != -1) + FindPlayerPed()->Teleport(CRadar::TargetMarkerPos + CVector(0.0f, 0.0f, FEET_OFFSET)); +} +#endif + static int engineStatus; static void SetEngineStatus(void) @@ -359,6 +374,9 @@ DebugMenuPopulate(void) DebugMenuAddVarBool8("Debug", "Don't render Peds", (int8*)&gbDontRenderPeds, nil); DebugMenuAddVarBool8("Debug", "Don't render Vehicles", (int8*)&gbDontRenderVehicles, nil); DebugMenuAddVarBool8("Debug", "Don't render Objects", (int8*)&gbDontRenderObjects, nil); +#ifdef MENU_MAP + DebugMenuAddCmd("Debug", "Teleport to map waypoint", TeleportToWaypoint); +#endif #ifdef TOGGLEABLE_BETA_FEATURES DebugMenuAddVarBool8("Debug", "Toggle banned particles", (int8*)&CParticle::bEnableBannedParticles, nil); DebugMenuAddVarBool8("Debug", "Toggle popping heads on headshot", (int8*)&CPed::bPopHeadsOnHeadshot, nil); |