summaryrefslogtreecommitdiffstats
path: root/src/Pad.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-02 07:43:00 +0200
committerGitHub <noreply@github.com>2019-07-02 07:43:00 +0200
commitb2d1433392483c3e1faafcf5127885cb425527e0 (patch)
tree477b9853bea245d9cbdaa8700e02ff980abe79d5 /src/Pad.cpp
parentMerge pull request #85 from erorcun/erorcun (diff)
parentKangaroo cheat and bug fixes (diff)
downloadre3-b2d1433392483c3e1faafcf5127885cb425527e0.tar
re3-b2d1433392483c3e1faafcf5127885cb425527e0.tar.gz
re3-b2d1433392483c3e1faafcf5127885cb425527e0.tar.bz2
re3-b2d1433392483c3e1faafcf5127885cb425527e0.tar.lz
re3-b2d1433392483c3e1faafcf5127885cb425527e0.tar.xz
re3-b2d1433392483c3e1faafcf5127885cb425527e0.tar.zst
re3-b2d1433392483c3e1faafcf5127885cb425527e0.zip
Diffstat (limited to 'src/Pad.cpp')
-rw-r--r--src/Pad.cpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/Pad.cpp b/src/Pad.cpp
index 13b9b589..002e7180 100644
--- a/src/Pad.cpp
+++ b/src/Pad.cpp
@@ -14,6 +14,7 @@
#include "Game.h"
#include "CutsceneMgr.h"
#include "Font.h"
+#include "Hud.h"
#include "Text.h"
#include "Timer.h"
#include "World.h"
@@ -24,7 +25,6 @@
#include "Weather.h"
#include "win.h"
-
CPad *Pads = (CPad*)0x6F0360; // [2]
CMousePointerStateHelper &MousePointerStateHelper = *(CMousePointerStateHelper*)0x95CC8C;
@@ -70,6 +70,28 @@ WRAPPER void StrongGripCheat() { EAXJMP(0x491670); }
WRAPPER void NastyLimbsCheat() { EAXJMP(0x4916A0); }
//////////////////////////////////////////////////////////////////////////
+#ifdef KANGAROO_CHEAT
+void KangarooCheat()
+{
+ wchar *string;
+ CPed *playerPed = FindPlayerPed();
+ int m_fMass;
+
+ if (playerPed->m_ped_flagI80) {
+ string = TheText.Get("CHEATOF");
+ m_fMass = 70.0f;
+ } else {
+ string = TheText.Get("CHEAT1");
+ m_fMass = 15.0f;
+ }
+ CHud::SetHelpMessage(string, 1);
+ playerPed->m_ped_flagI80 = !playerPed->m_ped_flagI80;
+
+ playerPed->m_fMass = m_fMass;
+ playerPed->m_fAirResistance = 0.4f / m_fMass;
+}
+#endif
+
void
CControllerState::Clear(void)
{
@@ -509,6 +531,12 @@ void CPad::AddToPCCheatString(char c)
// "NASTYLIMBSCHEAT"
if ( !_CHEATCMP("TAEHCSBMILYTSAN") )
NastyLimbsCheat();
+
+#ifdef KANGAROO_CHEAT
+ // "KANGAROO"
+ if (!_CHEATCMP("OORAGNAK"))
+ KangarooCheat();
+#endif
#undef _CHEATCMP
}