diff --git a/cstrike/common.h b/cstrike/common.h index 36fa7df..18cfc16 100644 --- a/cstrike/common.h +++ b/cstrike/common.h @@ -12,7 +12,7 @@ * - used to verify game version */ -#define CS_PRODUCTSTRINGVERSION CS_XOR("1.40.2.3") +#define CS_PRODUCTSTRINGVERSION CS_XOR("1.40.2.6") /* * game's modules diff --git a/cstrike/core/hooks.h b/cstrike/core/hooks.h index a231f19..408e26d 100644 --- a/cstrike/core/hooks.h +++ b/cstrike/core/hooks.h @@ -35,7 +35,7 @@ namespace VTABLE enum { CREATEMOVE = 5U, - MOUSEINPUTENABLED = 13U, + MOUSEINPUTENABLED = 16U, FRAMESTAGENOTIFY = 36U, }; } diff --git a/cstrike/core/interfaces.cpp b/cstrike/core/interfaces.cpp index 58d9e8b..dfb30e6 100644 --- a/cstrike/core/interfaces.cpp +++ b/cstrike/core/interfaces.cpp @@ -169,7 +169,7 @@ bool I::Setup() } bSuccess &= (Device != nullptr && DeviceContext != nullptr); - Input = *reinterpret_cast(MEM::ResolveRelativeAddress(MEM::FindPattern(CLIENT_DLL, CS_XOR("48 8B 0D ? ? ? ? 48 8B 01 FF 50 ? 8B DF")), 0x3, 0x7)); + Input = *reinterpret_cast(MEM::ResolveRelativeAddress(MEM::FindPattern(CLIENT_DLL, CS_XOR("48 8B 0D ? ? ? ? E8 ? ? ? ? 8B BE 84 12 00 00")), 0x3, 0x7)); bSuccess &= (Input != nullptr); // @ida: STR '%s: %f tick(%d) curtime(%f) OnSequenceCycleChanged: %s : %d=[%s]' diff --git a/cstrike/features/CRC.h b/cstrike/features/CRC.h index 941a15f..7879293 100644 --- a/cstrike/features/CRC.h +++ b/cstrike/features/CRC.h @@ -57,7 +57,7 @@ namespace CRC protobufBuffer.EnsureCapacity(nCalcualtedCRCSize + 1); using fnSerializePartialToArray = bool(__fastcall*)(CBaseUserCmdPB*, CUtlBuffer, int); - static const fnSerializePartialToArray oSerializePartialToArray = reinterpret_cast(MEM::FindPattern(CLIENT_DLL, CS_XOR("48 89 5C 24 18 55 56 57 48 81 EC 90 00 00 00 48"))); + static const fnSerializePartialToArray oSerializePartialToArray = reinterpret_cast(MEM::FindPattern(CLIENT_DLL, CS_XOR("48 89 5C 24 18 55 56 57 48 81 EC 90"))); #ifdef CS_PARANOID CS_ASSERT(oSerializePartialToArray != nullptr); diff --git a/cstrike/sdk/datatypes/usercmd.h b/cstrike/sdk/datatypes/usercmd.h index fc5a6ec..7324a7c 100644 --- a/cstrike/sdk/datatypes/usercmd.h +++ b/cstrike/sdk/datatypes/usercmd.h @@ -212,7 +212,7 @@ class CBaseUserCmdPB : public CBasePB std::string* strMoveCrc; CInButtonStatePB* pInButtonState; CMsgQAngle* pViewAngles; - std::int32_t nCommandNumber; + std::int32_t nLegacyCommandNumber; std::int32_t nClientTick; float flForwardMove; float flSideMove; @@ -253,7 +253,6 @@ class CCSGOUserCmdPB nHasBits |= nBits; } }; - static_assert(sizeof(CCSGOUserCmdPB) == 0x40); struct CInButtonState @@ -264,16 +263,16 @@ struct CInButtonState std::uint64_t nValueChanged; // 0x10 std::uint64_t nValueScroll; // 0x18 }; - static_assert(sizeof(CInButtonState) == 0x20); class CUserCmd { public: - MEM_PAD(0x8) // 0x0 VTABLE - CCSGOUserCmdPB csgoUserCmd; // 0x8 - CInButtonState nButtons; // 0x28 - MEM_PAD(0x20); // 0x50 + MEM_PAD(0x8); // 0x0 VTABLE + MEM_PAD(0x10); // TODO: find out what this is, added 14.08.2024 + CCSGOUserCmdPB csgoUserCmd; // 0x18 + CInButtonState nButtons; // 0x58 + MEM_PAD(0x20); // 0x78 CCSGOInputHistoryEntryPB* GetInputHistoryEntry(int nIndex) { @@ -296,5 +295,4 @@ class CUserCmd } } }; - -static_assert(sizeof(CUserCmd) == 0x88); +static_assert(sizeof(CUserCmd) == 0x98); diff --git a/cstrike/sdk/interfaces/ccsgoinput.h b/cstrike/sdk/interfaces/ccsgoinput.h index b85af62..e0f2312 100644 --- a/cstrike/sdk/interfaces/ccsgoinput.h +++ b/cstrike/sdk/interfaces/ccsgoinput.h @@ -47,7 +47,7 @@ class CCSGOInput public: MEM_PAD(0x250); CUserCmd arrCommands[MULTIPLAYER_BACKUP]; - MEM_PAD(0x89) + MEM_PAD(0x99) bool bInThirdPerson; MEM_PAD(0x6); QAngle_t angThirdPersonAngles;