diff --git a/EGameTools/EGameTools.vcxproj b/EGameTools/EGameTools.vcxproj
index add3aea..d67e5a2 100644
--- a/EGameTools/EGameTools.vcxproj
+++ b/EGameTools/EGameTools.vcxproj
@@ -35,7 +35,6 @@
-
@@ -140,7 +139,6 @@
-
diff --git a/EGameTools/EGameTools.vcxproj.filters b/EGameTools/EGameTools.vcxproj.filters
index 454d1a9..8d8662d 100644
--- a/EGameTools/EGameTools.vcxproj.filters
+++ b/EGameTools/EGameTools.vcxproj.filters
@@ -133,9 +133,6 @@
game\GamePH
-
- game\GamePH
-
game\GamePH
@@ -364,9 +361,6 @@
game\GamePH
-
- game\GamePH
-
game\GamePH
diff --git a/EGameTools/source/changelog.h b/EGameTools/source/changelog.h
index 8188087..2e57ae7 100644
--- a/EGameTools/source/changelog.h
+++ b/EGameTools/source/changelog.h
@@ -143,6 +143,8 @@ If anyone is looking to help with development, I'm all eyes and ears! Thank you!
I have some things planned for the next updates, but time will decide when I'll be able to work on the updates. I'm almost done with my exams!)" },
{ "v1.2.2",
R"(- Added compatibility with v1.18.0 "Community QoL" update
-- Fixed an issue with classes not always getting detected correctly for everyone (Debug tab; if you still run into issues, please open a bug report!))" }
+- Fixed an issue with classes not always getting detected correctly for everyone (Debug tab; if you still run into issues, please open a bug report!))" },
+ { "v1.2.3",
+ R"(- Fixed co-op issues related to Player and Weapon options, such as God Mode, Player Health, Player Immunity, Weapon Durability sliders not working (if you still run into issues, please open a bug report!)" }
};
}
\ No newline at end of file
diff --git a/EGameTools/source/game/Engine/engine_hooks.cpp b/EGameTools/source/game/Engine/engine_hooks.cpp
index 2139e8b..602417a 100644
--- a/EGameTools/source/game/Engine/engine_hooks.cpp
+++ b/EGameTools/source/game/Engine/engine_hooks.cpp
@@ -2,7 +2,6 @@
#include "..\GamePH\GameDI_PH.h"
#include "..\GamePH\LevelDI.h"
#include "..\GamePH\gameph_misc.h"
-#include "..\GamePH\gen_TPPModel.h"
#include "..\core.h"
#include "..\menu\camera.h"
#include "..\menu\misc.h"
diff --git a/EGameTools/source/game/GamePH/LevelDI.h b/EGameTools/source/game/GamePH/LevelDI.h
index ab40892..12eaac7 100644
--- a/EGameTools/source/game/GamePH/LevelDI.h
+++ b/EGameTools/source/game/GamePH/LevelDI.h
@@ -11,10 +11,6 @@ namespace GamePH {
class LevelDI {
public:
- union {
- buffer<0x160, PlayerDI_PH*> pPlayerDI_PH;
- };
-
bool IsLoading();
bool IsLoaded();
LPVOID GetViewCamera();
diff --git a/EGameTools/source/game/GamePH/LocalClientDI.h b/EGameTools/source/game/GamePH/LocalClientDI.h
index 84ab55c..5c14f62 100644
--- a/EGameTools/source/game/GamePH/LocalClientDI.h
+++ b/EGameTools/source/game/GamePH/LocalClientDI.h
@@ -2,12 +2,12 @@
#include "..\buffer.h"
namespace GamePH {
- class gen_TPPModel;
+ class PlayerDI_PH;
class LocalClientDI {
public:
union {
- buffer<0x90, gen_TPPModel*> pgen_TPPModel;
+ buffer<0x90, PlayerDI_PH*> pPlayerDI_PH;
};
static LocalClientDI* Get();
diff --git a/EGameTools/source/game/GamePH/PlayerDI_PH.cpp b/EGameTools/source/game/GamePH/PlayerDI_PH.cpp
index c7f5ccd..6afb672 100644
--- a/EGameTools/source/game/GamePH/PlayerDI_PH.cpp
+++ b/EGameTools/source/game/GamePH/PlayerDI_PH.cpp
@@ -2,17 +2,17 @@
#include "..\offsets.h"
#include "InventoryContainerDI.h"
#include "InventoryItem.h"
-#include "LevelDI.h"
+#include "LocalClientDI.h"
#include "PlayerDI_PH.h"
namespace GamePH {
PlayerDI_PH* PlayerDI_PH::Get() {
__try {
- LevelDI* iLevel = LevelDI::Get();
- if (!iLevel)
+ LocalClientDI* localClient = LocalClientDI::Get();
+ if (!localClient)
return nullptr;
- PlayerDI_PH* ptr = iLevel->pPlayerDI_PH;
+ PlayerDI_PH* ptr = localClient->pPlayerDI_PH;
if (!Utils::Memory::IsValidPtrMod(ptr, "gamedll_ph_x64_rwdi.dll"))
return nullptr;
if (*reinterpret_cast(ptr) != Offsets::GetVT_PlayerDI_PH())
@@ -41,7 +41,6 @@ namespace GamePH {
return nullptr;
}
}
-
InventoryContainerDI* PlayerDI_PH::GetInventoryContainer() {
__try {
InventoryContainerDI* ptr = reinterpret_cast(*reinterpret_cast(reinterpret_cast(this) + 0x470));
diff --git a/EGameTools/source/game/GamePH/PlayerDI_PH.h b/EGameTools/source/game/GamePH/PlayerDI_PH.h
index 4568153..e81c4c2 100644
--- a/EGameTools/source/game/GamePH/PlayerDI_PH.h
+++ b/EGameTools/source/game/GamePH/PlayerDI_PH.h
@@ -6,6 +6,11 @@
namespace GamePH {
class PlayerDI_PH {
public:
+ union {
+ buffer<0x35E1, bool> enableTPPModel1;
+ buffer<0x35E2, bool> enableTPPModel2;
+ };
+
static PlayerDI_PH* Get();
InventoryItem* GetCurrentWeapon(UINT indexMaybe);
diff --git a/EGameTools/source/game/GamePH/PlayerHealthModule.cpp b/EGameTools/source/game/GamePH/PlayerHealthModule.cpp
index 7ffdeab..7df04b9 100644
--- a/EGameTools/source/game/GamePH/PlayerHealthModule.cpp
+++ b/EGameTools/source/game/GamePH/PlayerHealthModule.cpp
@@ -1,5 +1,5 @@
#include
-#include "LevelDI.h"
+#include "PlayerDI_PH.h"
#include "PlayerHealthModule.h"
namespace GamePH {
@@ -23,14 +23,14 @@ namespace GamePH {
void PlayerHealthModule::Set(LPVOID instance) { pPlayerHealthModule = reinterpret_cast(instance); }
void PlayerHealthModule::UpdateClassAddr() {
- LevelDI* iLevel = LevelDI::Get();
- if (!iLevel)
+ PlayerDI_PH* pPlayerDI_PH = PlayerDI_PH::Get();
+ if (!pPlayerDI_PH)
return;
- if (PlayerHealthModule::Get() && PlayerHealthModule::Get()->pPlayerDI_PH == iLevel->pPlayerDI_PH)
+ if (PlayerHealthModule::Get() && PlayerHealthModule::Get()->pPlayerDI_PH == pPlayerDI_PH)
return;
for (auto& pPlayerHealthModule : PlayerHealthModule::playerHealthModulePtrList) {
- if (pPlayerHealthModule->pPlayerDI_PH == iLevel->pPlayerDI_PH) {
+ if (pPlayerHealthModule->pPlayerDI_PH == pPlayerDI_PH) {
PlayerHealthModule::Set(pPlayerHealthModule);
PlayerHealthModule::playerHealthModulePtrList.clear();
PlayerHealthModule::playerHealthModulePtrList.emplace_back(pPlayerHealthModule);
diff --git a/EGameTools/source/game/GamePH/PlayerInfectionModule.cpp b/EGameTools/source/game/GamePH/PlayerInfectionModule.cpp
index 0d2799a..5b09196 100644
--- a/EGameTools/source/game/GamePH/PlayerInfectionModule.cpp
+++ b/EGameTools/source/game/GamePH/PlayerInfectionModule.cpp
@@ -1,5 +1,5 @@
#include
-#include "LevelDI.h"
+#include "PlayerDI_PH.h"
#include "PlayerInfectionModule.h"
namespace GamePH {
@@ -23,14 +23,14 @@ namespace GamePH {
void PlayerInfectionModule::Set(LPVOID instance) { pPlayerInfectionModule = reinterpret_cast(instance); }
void PlayerInfectionModule::UpdateClassAddr() {
- LevelDI* iLevel = LevelDI::Get();
- if (!iLevel)
+ PlayerDI_PH* pPlayerDI_PH = PlayerDI_PH::Get();
+ if (!pPlayerDI_PH)
return;
- if (PlayerInfectionModule::Get() && PlayerInfectionModule::Get()->pPlayerDI_PH == iLevel->pPlayerDI_PH)
+ if (PlayerInfectionModule::Get() && PlayerInfectionModule::Get()->pPlayerDI_PH == pPlayerDI_PH)
return;
for (auto& pPlayerInfectionModule : PlayerInfectionModule::playerInfectionModulePtrList) {
- if (pPlayerInfectionModule->pPlayerDI_PH == iLevel->pPlayerDI_PH) {
+ if (pPlayerInfectionModule->pPlayerDI_PH == pPlayerDI_PH) {
PlayerInfectionModule::Set(pPlayerInfectionModule);
PlayerInfectionModule::playerInfectionModulePtrList.clear();
PlayerInfectionModule::playerInfectionModulePtrList.emplace_back(pPlayerInfectionModule);
diff --git a/EGameTools/source/game/GamePH/game_hooks.cpp b/EGameTools/source/game/GamePH/game_hooks.cpp
index d09804b..6b73a28 100644
--- a/EGameTools/source/game/GamePH/game_hooks.cpp
+++ b/EGameTools/source/game/GamePH/game_hooks.cpp
@@ -11,7 +11,7 @@
#include "LevelDI.h"
#include "PlayerHealthModule.h"
#include "PlayerInfectionModule.h"
-#include "gen_TPPModel.h"
+#include "PlayerDI_PH.h"
namespace GamePH {
namespace Hooks {
@@ -161,20 +161,20 @@ namespace GamePH {
static Utils::Hook::MHook ShowTPPModelFunc3Hook{ "ShowTPPModelFunc3", &Offsets::Get_ShowTPPModelFunc3, &detourShowTPPModelFunc3 };
static void detourShowTPPModelFunc3(DWORD64 tppFunc2Addr, bool showTPPModel) {
- gen_TPPModel* pgen_TPPModel = gen_TPPModel::Get();
- if (!pgen_TPPModel) {
+ PlayerDI_PH* pPlayerDI_PH = PlayerDI_PH::Get();
+ if (!pPlayerDI_PH) {
ShowTPPModelFunc3Hook.pOriginal(tppFunc2Addr, showTPPModel);
return;
}
if (!showTPPModel && prevUseTPPModel) {
- pgen_TPPModel->enableTPPModel2 = true;
- pgen_TPPModel->enableTPPModel1 = true;
+ pPlayerDI_PH->enableTPPModel2 = true;
+ pPlayerDI_PH->enableTPPModel1 = true;
}
ShowTPPModelFunc3Hook.pOriginal(tppFunc2Addr, showTPPModel);
if (showTPPModel && prevUseTPPModel) {
- pgen_TPPModel->enableTPPModel2 = false;
- pgen_TPPModel->enableTPPModel1 = false;
+ pPlayerDI_PH->enableTPPModel2 = false;
+ pPlayerDI_PH->enableTPPModel1 = false;
} else
prevUseTPPModel = showTPPModel;
}
diff --git a/EGameTools/source/game/GamePH/gameph_misc.cpp b/EGameTools/source/game/GamePH/gameph_misc.cpp
index 00216a2..e82be3b 100644
--- a/EGameTools/source/game/GamePH/gameph_misc.cpp
+++ b/EGameTools/source/game/GamePH/gameph_misc.cpp
@@ -1,7 +1,7 @@
#include
#include "..\offsets.h"
#include "GameDI_PH.h"
-#include "gen_TPPModel.h"
+#include "PlayerDI_PH.h"
namespace GamePH {
const DWORD GetCurrentGameVersion() {
@@ -59,8 +59,8 @@ namespace GamePH {
void(*pShowTPPModelFunc3)(DWORD64 tppFunc2Addr, bool showTPPModel) = (decltype(pShowTPPModelFunc3))Offsets::Get_ShowTPPModelFunc3();
if (!pShowTPPModelFunc3)
return;
- gen_TPPModel* pgen_TPPModel = gen_TPPModel::Get();
- if (!pgen_TPPModel)
+ PlayerDI_PH* pPlayerDI_PH = PlayerDI_PH::Get();
+ if (!pPlayerDI_PH)
return;
pShowTPPModelFunc3(tppFunc2Addr, showTPPModel);
diff --git a/EGameTools/source/game/GamePH/gen_TPPModel.cpp b/EGameTools/source/game/GamePH/gen_TPPModel.cpp
deleted file mode 100644
index d534caf..0000000
--- a/EGameTools/source/game/GamePH/gen_TPPModel.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#include
-#include "LocalClientDI.h"
-#include "gen_TPPModel.h"
-
-namespace GamePH {
- gen_TPPModel* gen_TPPModel::Get() {
- __try {
- LocalClientDI* pLocalClientDI = LocalClientDI::Get();
- if (!pLocalClientDI)
- return nullptr;
-
- gen_TPPModel* ptr = pLocalClientDI->pgen_TPPModel;
- if (!Utils::Memory::IsValidPtrMod(ptr, "gamedll_ph_x64_rwdi.dll"))
- return nullptr;
-
- return ptr;
- } __except (EXCEPTION_EXECUTE_HANDLER) {
- return nullptr;
- }
- }
-}
\ No newline at end of file
diff --git a/EGameTools/source/game/GamePH/gen_TPPModel.h b/EGameTools/source/game/GamePH/gen_TPPModel.h
deleted file mode 100644
index 98c9bec..0000000
--- a/EGameTools/source/game/GamePH/gen_TPPModel.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#pragma once
-#include "..\buffer.h"
-
-namespace GamePH {
- class gen_TPPModel {
- public:
- union {
- buffer<0x35E1, bool> enableTPPModel1;
- buffer<0x35E2, bool> enableTPPModel2;
- };
-
- static gen_TPPModel* Get();
- };
-}
\ No newline at end of file
diff --git a/EGameTools/source/menu/camera.cpp b/EGameTools/source/menu/camera.cpp
index 36924c2..6eac68d 100644
--- a/EGameTools/source/menu/camera.cpp
+++ b/EGameTools/source/menu/camera.cpp
@@ -5,9 +5,9 @@
#include "..\game\GamePH\FreeCamera.h"
#include "..\game\GamePH\GameDI_PH.h"
#include "..\game\GamePH\LevelDI.h"
+#include "..\game\GamePH\PlayerDI_PH.h"
#include "..\game\GamePH\PlayerVariables.h"
#include "..\game\GamePH\gameph_misc.h"
-#include "..\game\GamePH\gen_TPPModel.h"
#include "..\offsets.h"
#include "camera.h"
#include "menu.h"
@@ -149,8 +149,8 @@ namespace Menu {
if (!iLevel || !iLevel->IsLoaded())
return;
- GamePH::gen_TPPModel* pgen_TPPModel = GamePH::gen_TPPModel::Get();
- if (pgen_TPPModel) {
+ GamePH::PlayerDI_PH* pPlayerDI_PH = GamePH::PlayerDI_PH::Get();
+ if (pPlayerDI_PH) {
if (Menu::Camera::freeCam.GetValue() && !iLevel->IsTimerFrozen())
GamePH::ShowTPPModel(true);
else if (Menu::Camera::freeCam.GetValue() && iLevel->IsTimerFrozen() && !photoMode.GetValue())
diff --git a/EGameTools/source/menu/debug.cpp b/EGameTools/source/menu/debug.cpp
index c04a3c1..a82631a 100644
--- a/EGameTools/source/menu/debug.cpp
+++ b/EGameTools/source/menu/debug.cpp
@@ -16,7 +16,6 @@
#include "..\game\GamePH\SessionCooperativeDI.h"
#include "..\game\GamePH\TPPCameraDI.h"
#include "..\game\GamePH\TimeWeather\CSystem.h"
-#include "..\game\GamePH\gen_TPPModel.h"
#include "..\game\Engine\CBulletPhysicsCharacter.h"
#include "..\game\Engine\CGSObject.h"
@@ -37,7 +36,6 @@ namespace Menu {
{ "FreeCamera", reinterpret_cast(&GamePH::FreeCamera::Get) },
{ "GameDI_PH", reinterpret_cast(&GamePH::GameDI_PH::Get) },
{ "GameDI_PH2", reinterpret_cast(&GamePH::GameDI_PH2::Get) },
- { "gen_TPPModel", reinterpret_cast(&GamePH::gen_TPPModel::Get) },
{ "LevelDI", reinterpret_cast(&GamePH::LevelDI::Get) },
{ "LocalClientDI", reinterpret_cast(&GamePH::LocalClientDI::Get) },
{ "LogicalPlayer", reinterpret_cast(&GamePH::LogicalPlayer::Get) },