From 6c693e3bbfe46cb445e4664eb91ef85c811a6240 Mon Sep 17 00:00:00 2001 From: _AG Date: Tue, 2 Jul 2019 13:59:19 +0200 Subject: Implemented frontend inputs. Fixed #66 and few other stuff. --- src/entities/Vehicle.cpp | 3 ++- src/entities/Vehicle.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/entities') diff --git a/src/entities/Vehicle.cpp b/src/entities/Vehicle.cpp index 8c1ef515..f7c4b065 100644 --- a/src/entities/Vehicle.cpp +++ b/src/entities/Vehicle.cpp @@ -12,7 +12,8 @@ bool &CVehicle::bAllDodosCheat = *(bool *)0x95CD75; bool &CVehicle::bCheat3 = *(bool *)0x95CD66; bool &CVehicle::bCheat4 = *(bool *)0x95CD65; bool &CVehicle::bCheat5 = *(bool *)0x95CD64; - +bool &CVehicle::m_bDisableMouseSteering = *(bool *)0x60252C; + void *CVehicle::operator new(size_t sz) { return CPools::GetVehiclePool()->New(); } void *CVehicle::operator new(size_t sz, int handle) { return CPools::GetVehiclePool()->New(handle); } void CVehicle::operator delete(void *p, size_t sz) { CPools::GetVehiclePool()->Delete((CVehicle*)p); } diff --git a/src/entities/Vehicle.h b/src/entities/Vehicle.h index 27641e47..ba3e568e 100644 --- a/src/entities/Vehicle.h +++ b/src/entities/Vehicle.h @@ -135,6 +135,7 @@ public: static bool &bCheat3; static bool &bCheat4; static bool &bCheat5; + static bool &m_bDisableMouseSteering; }; static_assert(sizeof(CVehicle) == 0x288, "CVehicle: error"); -- cgit v1.2.3 From 34e8fffcb4b41bb3049dfca9d42cea2e1da637f8 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Tue, 2 Jul 2019 21:31:12 +0200 Subject: Fix address of IsPedHeadAbovePos --- src/entities/Ped.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/entities') diff --git a/src/entities/Ped.cpp b/src/entities/Ped.cpp index 14aad60a..61d6d182 100644 --- a/src/entities/Ped.cpp +++ b/src/entities/Ped.cpp @@ -1696,7 +1696,7 @@ STARTPATCHES InjectHook(0x4D2BB0, &CPed::Avoid, PATCH_JUMP); InjectHook(0x4C6A50, &CPed::ClearAimFlag, PATCH_JUMP); InjectHook(0x4C64F0, &CPed::ClearLookFlag, PATCH_JUMP); - InjectHook(0x4E5BD0, &CPed::IsPedHeadAbovePos, PATCH_JUMP); + InjectHook(0x4EB670, &CPed::IsPedHeadAbovePos, PATCH_JUMP); InjectHook(0x4E68A0, &CPed::FinishedAttackCB, PATCH_JUMP); InjectHook(0x4E5BD0, &CheckForPedsOnGroundToAttack, PATCH_JUMP); InjectHook(0x4E6BA0, &CPed::Attack, PATCH_JUMP); -- cgit v1.2.3 From e8215cf560318fdd77817cea485af50fca827552 Mon Sep 17 00:00:00 2001 From: aap Date: Tue, 2 Jul 2019 22:05:11 +0200 Subject: Revert "Implemented frontend inputs." --- src/entities/Vehicle.cpp | 3 +-- src/entities/Vehicle.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'src/entities') diff --git a/src/entities/Vehicle.cpp b/src/entities/Vehicle.cpp index f7c4b065..8c1ef515 100644 --- a/src/entities/Vehicle.cpp +++ b/src/entities/Vehicle.cpp @@ -12,8 +12,7 @@ bool &CVehicle::bAllDodosCheat = *(bool *)0x95CD75; bool &CVehicle::bCheat3 = *(bool *)0x95CD66; bool &CVehicle::bCheat4 = *(bool *)0x95CD65; bool &CVehicle::bCheat5 = *(bool *)0x95CD64; -bool &CVehicle::m_bDisableMouseSteering = *(bool *)0x60252C; - + void *CVehicle::operator new(size_t sz) { return CPools::GetVehiclePool()->New(); } void *CVehicle::operator new(size_t sz, int handle) { return CPools::GetVehiclePool()->New(handle); } void CVehicle::operator delete(void *p, size_t sz) { CPools::GetVehiclePool()->Delete((CVehicle*)p); } diff --git a/src/entities/Vehicle.h b/src/entities/Vehicle.h index ba3e568e..27641e47 100644 --- a/src/entities/Vehicle.h +++ b/src/entities/Vehicle.h @@ -135,7 +135,6 @@ public: static bool &bCheat3; static bool &bCheat4; static bool &bCheat5; - static bool &m_bDisableMouseSteering; }; static_assert(sizeof(CVehicle) == 0x288, "CVehicle: error"); -- cgit v1.2.3 From 69b5c9f1e0aff9bc32f903b39f5c1673b43a9b37 Mon Sep 17 00:00:00 2001 From: _AG Date: Wed, 3 Jul 2019 17:26:15 +0200 Subject: Update Frontend. --- src/entities/PlayerSkin.cpp | 5 +++++ src/entities/PlayerSkin.h | 7 +++++++ src/entities/Vehicle.cpp | 3 ++- src/entities/Vehicle.h | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 src/entities/PlayerSkin.cpp create mode 100644 src/entities/PlayerSkin.h (limited to 'src/entities') diff --git a/src/entities/PlayerSkin.cpp b/src/entities/PlayerSkin.cpp new file mode 100644 index 00000000..1c9ca2c6 --- /dev/null +++ b/src/entities/PlayerSkin.cpp @@ -0,0 +1,5 @@ +#include "common.h" +#include "patcher.h" +#include "PlayerSkin.h" + +WRAPPER void CPlayerSkin::BeginFrontEndSkinEdit() { EAXJMP(0x59BC70); } diff --git a/src/entities/PlayerSkin.h b/src/entities/PlayerSkin.h new file mode 100644 index 00000000..61e09cdf --- /dev/null +++ b/src/entities/PlayerSkin.h @@ -0,0 +1,7 @@ +#pragma once + +class CPlayerSkin +{ +public: + static void BeginFrontEndSkinEdit(); +}; \ No newline at end of file diff --git a/src/entities/Vehicle.cpp b/src/entities/Vehicle.cpp index 8c1ef515..f7c4b065 100644 --- a/src/entities/Vehicle.cpp +++ b/src/entities/Vehicle.cpp @@ -12,7 +12,8 @@ bool &CVehicle::bAllDodosCheat = *(bool *)0x95CD75; bool &CVehicle::bCheat3 = *(bool *)0x95CD66; bool &CVehicle::bCheat4 = *(bool *)0x95CD65; bool &CVehicle::bCheat5 = *(bool *)0x95CD64; - +bool &CVehicle::m_bDisableMouseSteering = *(bool *)0x60252C; + void *CVehicle::operator new(size_t sz) { return CPools::GetVehiclePool()->New(); } void *CVehicle::operator new(size_t sz, int handle) { return CPools::GetVehiclePool()->New(handle); } void CVehicle::operator delete(void *p, size_t sz) { CPools::GetVehiclePool()->Delete((CVehicle*)p); } diff --git a/src/entities/Vehicle.h b/src/entities/Vehicle.h index 27641e47..ba3e568e 100644 --- a/src/entities/Vehicle.h +++ b/src/entities/Vehicle.h @@ -135,6 +135,7 @@ public: static bool &bCheat3; static bool &bCheat4; static bool &bCheat5; + static bool &m_bDisableMouseSteering; }; static_assert(sizeof(CVehicle) == 0x288, "CVehicle: error"); -- cgit v1.2.3 From 7fae683316db64e772fb82833d73860cc16cf03a Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Thu, 4 Jul 2019 01:16:24 +0300 Subject: Script stuff + bug fixes --- src/entities/PlayerInfo.cpp | 2 ++ src/entities/PlayerInfo.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src/entities') diff --git a/src/entities/PlayerInfo.cpp b/src/entities/PlayerInfo.cpp index 796481a4..59efe2ae 100644 --- a/src/entities/PlayerInfo.cpp +++ b/src/entities/PlayerInfo.cpp @@ -1,3 +1,5 @@ #include "common.h" #include "patcher.h" #include "PlayerInfo.h" + +WRAPPER void CPlayerInfo::MakePlayerSafe(bool) { EAXJMP(0x4A1400); } \ No newline at end of file diff --git a/src/entities/PlayerInfo.h b/src/entities/PlayerInfo.h index 79f379d5..e2b42fe7 100644 --- a/src/entities/PlayerInfo.h +++ b/src/entities/PlayerInfo.h @@ -65,6 +65,8 @@ public: bool m_bGetOutOfHospitalFree; uint8 m_aSkinName[32]; RwTexture *m_pSkinTexture; + + void MakePlayerSafe(bool); }; static_assert(sizeof(CPlayerInfo) == 0x13C, "CPlayerInfo: error"); -- cgit v1.2.3