From d5d9e27ccaf4f684986a72dd1961676fa7d3e930 Mon Sep 17 00:00:00 2001 From: Diavolo Date: Wed, 22 Dec 2021 21:32:09 +0100 Subject: [PATCH] Added elevators (dvar controlled) --- src/client/game/dvars.cpp | 2 ++ src/client/game/dvars.hpp | 2 ++ src/client/game/structs.hpp | 19 ++++++++++++++++++- src/client/game/symbols.hpp | 8 +++++++- 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/client/game/dvars.cpp b/src/client/game/dvars.cpp index e2c31f6e..27c65c95 100644 --- a/src/client/game/dvars.cpp +++ b/src/client/game/dvars.cpp @@ -21,6 +21,8 @@ namespace dvars game::dvar_t* cg_legacyCrashHandling; + game::dvar_t* g_enableElevators = nullptr; + std::string dvar_get_vector_domain(const int components, const game::dvar_limits& domain) { if (domain.vector.min == -FLT_MAX) diff --git a/src/client/game/dvars.hpp b/src/client/game/dvars.hpp index f65b21e5..6d9f8614 100644 --- a/src/client/game/dvars.hpp +++ b/src/client/game/dvars.hpp @@ -22,6 +22,8 @@ namespace dvars extern game::dvar_t* cg_legacyCrashHandling; + extern game::dvar_t* g_enableElevators; + extern std::vector dvar_list; std::string dvar_get_vector_domain(const int components, const game::dvar_limits& domain); diff --git a/src/client/game/structs.hpp b/src/client/game/structs.hpp index 3eaf0d67..a839e160 100644 --- a/src/client/game/structs.hpp +++ b/src/client/game/structs.hpp @@ -915,7 +915,24 @@ namespace game uint64_t streams[4]; const char* name; }; - + + struct Bounds + { + vec3_t midPoint; + vec3_t halfSize; + }; + + struct pmove_t + { + }; + + struct trace_t + { + char __pad0[0x29]; + bool allsolid; // Confirmed in CM_PositionTestCapsuleInTriangle + bool startsolid; // Confirmed in PM_JitterPoint + }; + namespace hks { struct GenericChunkHeader diff --git a/src/client/game/symbols.hpp b/src/client/game/symbols.hpp index fea2f668..9b66eba1 100644 --- a/src/client/game/symbols.hpp +++ b/src/client/game/symbols.hpp @@ -45,7 +45,8 @@ namespace game Dvar_RegisterString{0x618170}; WEAK symbol Dvar_RegisterVec4{0x6185F0}; - WEAK symbol Dvar_ValueToString{0x61B8F0}; + WEAK symbol Dvar_DisplayableValue{0x618EA0}; + WEAK symbol Dvar_ValueToString{0x61B8F0}; WEAK symbol Dvar_SetCommand{0x61A5C0}; WEAK symbol Dvar_SetFromStringFromSource{0x61A910}; @@ -122,6 +123,11 @@ namespace game WEAK symbol UI_SafeTranslateString{0x5A2930}; WEAK symbol UI_PlayLocalSoundAlias{0x606080}; + WEAK symbol PM_playerTrace{0x68F0A0}; + WEAK symbol PM_trace{0x68F1D0}; + WEAK symbol longjmp{0x89EED0}; WEAK symbol _setjmp{0x8EC2E0};