diff options
author | aap <aap@papnet.eu> | 2019-08-11 22:14:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-11 22:14:25 +0200 |
commit | c17bbc62f592270b6a1cac323223689603a6120f (patch) | |
tree | 2f0c6d7eac06333b4f04eb3002700e4c3d067f34 /src/core/re3.cpp | |
parent | finished CPathFind (diff) | |
parent | P.e.d.s. and fixes (diff) | |
download | re3-c17bbc62f592270b6a1cac323223689603a6120f.tar re3-c17bbc62f592270b6a1cac323223689603a6120f.tar.gz re3-c17bbc62f592270b6a1cac323223689603a6120f.tar.bz2 re3-c17bbc62f592270b6a1cac323223689603a6120f.tar.lz re3-c17bbc62f592270b6a1cac323223689603a6120f.tar.xz re3-c17bbc62f592270b6a1cac323223689603a6120f.tar.zst re3-c17bbc62f592270b6a1cac323223689603a6120f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/re3.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/re3.cpp b/src/core/re3.cpp index 9fe53579..dc501075 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -140,6 +140,20 @@ SpawnCar(int id) } static void +LetThemFollowYou(void) { + CPed* player = (CPed*) FindPlayerPed(); + for (int i = 0; i < player->m_numNearPeds; i++) { + + CPed* nearPed = player->m_nearPeds[i]; + if (nearPed && !nearPed->IsPlayer()) { + nearPed->SetObjective(OBJECTIVE_FOLLOW_PED_IN_FORMATION, (void*)player); + nearPed->m_pedFormation = rand() & 7; + nearPed->bScriptObjectiveCompleted = false; + } + } +} + +static void FixCar(void) { CVehicle *veh = FindPlayerVehicle(); @@ -335,6 +349,8 @@ 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); + + DebugMenuAddCmd("Debug", "Make peds around you follow you", LetThemFollowYou); #ifndef FINAL DebugMenuAddVarBool8("Debug", "Toggle unused fight feature", (int8*)&CPed::bUnusedFightThingOnPlayer, nil); #endif |