summaryrefslogtreecommitdiffstats
path: root/src/peds/PlayerPed.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2019-07-18 04:26:46 +0200
committereray orçunus <erayorcunus@gmail.com>2019-07-18 04:27:29 +0200
commit59671fab03703570eeb4837b713108619d762a01 (patch)
treee94e57a02e09540ba97e078486485d7558be0592 /src/peds/PlayerPed.cpp
parentMerge branch 'master' of git://github.com/GTAmodding/re3 into erorcun (diff)
downloadre3-59671fab03703570eeb4837b713108619d762a01.tar
re3-59671fab03703570eeb4837b713108619d762a01.tar.gz
re3-59671fab03703570eeb4837b713108619d762a01.tar.bz2
re3-59671fab03703570eeb4837b713108619d762a01.tar.lz
re3-59671fab03703570eeb4837b713108619d762a01.tar.xz
re3-59671fab03703570eeb4837b713108619d762a01.tar.zst
re3-59671fab03703570eeb4837b713108619d762a01.zip
Diffstat (limited to '')
-rw-r--r--src/peds/PlayerPed.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp
index 3bab2d31..d2bc494f 100644
--- a/src/peds/PlayerPed.cpp
+++ b/src/peds/PlayerPed.cpp
@@ -38,6 +38,24 @@ CPlayerPed::SetWantedLevelNoDrop(int32 level)
m_pWanted->SetWantedLevelNoDrop(level);
}
+// I don't know actual purpose of parameter
+void
+CPlayerPed::AnnoyPlayerPed(bool itsPolice)
+{
+ int8 *temper = &m_pedStats->m_temper;
+ if (*temper >= 52) {
+ if (itsPolice) {
+ if (*temper < 55) {
+ (*temper)++;
+ } else {
+ (*temper) = 46;
+ }
+ }
+ } else {
+ (*temper)++;
+ }
+}
+
class CPlayerPed_ : public CPlayerPed
{
@@ -48,4 +66,5 @@ public:
STARTPATCHES
InjectHook(0x4EFB30, &CPlayerPed_::dtor, PATCH_JUMP);
InjectHook(0x4F28A0, &CPlayerPed::ClearWeaponTarget, PATCH_JUMP);
+ InjectHook(0x4F3700, &CPlayerPed::AnnoyPlayerPed, PATCH_JUMP);
ENDPATCHES