From fc59b7e7a6d37e9c0786789efe9598b690ddffb5 Mon Sep 17 00:00:00 2001 From: Skull Merlin <86374920+skkuull@users.noreply.github.com> Date: Sat, 5 Mar 2022 02:35:20 +0200 Subject: [PATCH] Revert "baseaddr" This reverts commit 05696f1ec509684d4cb496581e1eddf437c4278a. --- src/client/game/game.cpp | 13 ------------- src/client/game/game.hpp | 9 ++------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/client/game/game.cpp b/src/client/game/game.cpp index 95fb0793..9045761b 100644 --- a/src/client/game/game.cpp +++ b/src/client/game/game.cpp @@ -3,14 +3,6 @@ namespace game { - uint64_t base_address; - - void load_base_address() - { - const auto module = GetModuleHandle(NULL); - base_address = uint64_t(module); - } - int Cmd_Argc() { return cmd_args->argc[cmd_args->nesting]; @@ -110,8 +102,3 @@ namespace game } } } - -uintptr_t operator"" _b(const uintptr_t ptr) -{ - return game::base_address + ptr; -} \ No newline at end of file diff --git a/src/client/game/game.hpp b/src/client/game/game.hpp index 0442fece..47041ca9 100644 --- a/src/client/game/game.hpp +++ b/src/client/game/game.hpp @@ -9,9 +9,6 @@ namespace game { - extern uint64_t base_address; - void load_base_address(); - namespace environment { launcher::mode get_mode(); @@ -40,10 +37,10 @@ namespace game { if (environment::is_sp()) { - return reinterpret_cast((uint64_t)sp_object_ + base_address); + return sp_object_; } - return reinterpret_cast((uint64_t)mp_object_ + base_address); + return mp_object_; } operator T* () const @@ -70,6 +67,4 @@ namespace game bool VirtualLobby_Loaded(); } -uintptr_t operator"" _b(const uintptr_t ptr); - #include "symbols.hpp"