diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2019-11-01 14:54:02 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2019-11-01 14:54:02 +0100 |
commit | 0013b97aac0d166170d8c30c69787b7abbb91bf4 (patch) | |
tree | 95d7142e51fea55d40c42866c880a19b3e3b2932 /TestDLL | |
parent | 0364b7427f5eb1f5123a662611d922d65ad30754 (diff) |
added PENTITYSYSTEM -> ISYSTEM offset to Hunt Classes and TActorMap typedef
Diffstat (limited to 'TestDLL')
-rw-r--r-- | TestDLL/HuntClasses.h | 5 | ||||
-rw-r--r-- | TestDLL/dllmain.cpp | 11 |
2 files changed, 6 insertions, 10 deletions
diff --git a/TestDLL/HuntClasses.h b/TestDLL/HuntClasses.h index 0de811c..692ad1d 100644 --- a/TestDLL/HuntClasses.h +++ b/TestDLL/HuntClasses.h @@ -4,6 +4,7 @@ #include <stdarg.h> #include <string> +#include <map> struct ISystem; @@ -14,6 +15,8 @@ struct ISystem; #define ENTITY_FLAG_CASTSHADOW 0x1 #define ENTITY_ENEMY_CHECK (ENTITY_FLAG_SEND_RENDER_EVENT | ENTITY_FLAG_CASTSHADOW) +#define PENTITYSYSTEM_ISYSTEM_OFFSET 104 + template<class _I> class _smart_ptr { private: @@ -645,6 +648,8 @@ struct IActorIterator }; typedef _smart_ptr<IActorIterator> IActorIteratorPtr; +typedef std::map<int, IActor*> TActorMap; + struct IActorSystem { virtual ~IActorSystem() {} diff --git a/TestDLL/dllmain.cpp b/TestDLL/dllmain.cpp index 7e4dd84..7904c24 100644 --- a/TestDLL/dllmain.cpp +++ b/TestDLL/dllmain.cpp @@ -238,7 +238,6 @@ static bool InitAndCheckPtr(PVOID user_ptr) MB_OK | MB_ICONINFORMATION); return false; } -#define PENTITYSYSTEM_ISYSTEM_OFFSET 104 if ((PVOID)(*(UINT64*)(pEntSys + PENTITYSYSTEM_ISYSTEM_OFFSET)) != iEnt->GetSystem()) { char errbuf[128]; snprintf(errbuf, sizeof errbuf, @@ -375,17 +374,9 @@ void APIENTRY LibEntry(PVOID user_ptr) return; } -#if 1 +#if 0 static UINT64 exec_counter = 0; if ((++exec_counter) % 500 == 0) { - printf("---%d---%d---%s---%.2f %.2f %.2f---\n", - iEnt->GetSystem()->GetGlobalEnvironment()->pGameFramework->GetClientActorId(), - iEnt->GetSystem()->GetGlobalEnvironment()->pGameFramework->GetClientEntityId(), - iEnt->GetSystem()->GetGlobalEnvironment()->pGameFramework->GetLevelName(), - iEnt->GetSystem()->GetGlobalEnvironment()->pGameFramework->GetClientEntity()->GetWorldAngles().x, - iEnt->GetSystem()->GetGlobalEnvironment()->pGameFramework->GetClientEntity()->GetWorldAngles().y, - iEnt->GetSystem()->GetGlobalEnvironment()->pGameFramework->GetClientEntity()->GetWorldAngles().z - ); } #endif |