Skip to content

Commit

Permalink
Merge branch 'maecry:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
M3351AN authored Aug 15, 2024
2 parents 2f865d4 + 1d45f7d commit ea50d26
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cstrike/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cstrike/core/hooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace VTABLE
enum
{
CREATEMOVE = 5U,
MOUSEINPUTENABLED = 13U,
MOUSEINPUTENABLED = 16U,
FRAMESTAGENOTIFY = 36U,
};
}
Expand Down
2 changes: 1 addition & 1 deletion cstrike/core/interfaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ bool I::Setup()
}
bSuccess &= (Device != nullptr && DeviceContext != nullptr);

Input = *reinterpret_cast<CCSGOInput**>(MEM::ResolveRelativeAddress(MEM::FindPattern(CLIENT_DLL, CS_XOR("48 8B 0D ? ? ? ? 48 8B 01 FF 50 ? 8B DF")), 0x3, 0x7));
Input = *reinterpret_cast<CCSGOInput**>(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]'
Expand Down
2 changes: 1 addition & 1 deletion cstrike/features/CRC.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace CRC
protobufBuffer.EnsureCapacity(nCalcualtedCRCSize + 1);

using fnSerializePartialToArray = bool(__fastcall*)(CBaseUserCmdPB*, CUtlBuffer, int);
static const fnSerializePartialToArray oSerializePartialToArray = reinterpret_cast<fnSerializePartialToArray>(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<fnSerializePartialToArray>(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);
Expand Down
16 changes: 7 additions & 9 deletions cstrike/sdk/datatypes/usercmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -253,7 +253,6 @@ class CCSGOUserCmdPB
nHasBits |= nBits;
}
};

static_assert(sizeof(CCSGOUserCmdPB) == 0x40);

struct CInButtonState
Expand All @@ -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)
{
Expand All @@ -296,5 +295,4 @@ class CUserCmd
}
}
};

static_assert(sizeof(CUserCmd) == 0x88);
static_assert(sizeof(CUserCmd) == 0x98);
2 changes: 1 addition & 1 deletion cstrike/sdk/interfaces/ccsgoinput.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ea50d26

Please sign in to comment.