summaryrefslogtreecommitdiffstats
path: root/src/core/re3.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-04-16 21:19:56 +0200
committereray orçunus <erayorcunus@gmail.com>2020-04-16 21:19:56 +0200
commit2c2da558cac7e235d1dc89264aa78695aae32394 (patch)
tree78ca1babbac01fff758c20ed9ae4bc3ffb210095 /src/core/re3.cpp
parentMore refs removed (diff)
downloadre3-2c2da558cac7e235d1dc89264aa78695aae32394.tar
re3-2c2da558cac7e235d1dc89264aa78695aae32394.tar.gz
re3-2c2da558cac7e235d1dc89264aa78695aae32394.tar.bz2
re3-2c2da558cac7e235d1dc89264aa78695aae32394.tar.lz
re3-2c2da558cac7e235d1dc89264aa78695aae32394.tar.xz
re3-2c2da558cac7e235d1dc89264aa78695aae32394.tar.zst
re3-2c2da558cac7e235d1dc89264aa78695aae32394.zip
Diffstat (limited to 'src/core/re3.cpp')
-rw-r--r--src/core/re3.cpp18
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);