From b041c22d99d02457ecde2d62bbf401747badffbd Mon Sep 17 00:00:00 2001 From: rcnoob <139053812+rcnoob@users.noreply.github.com> Date: Wed, 5 Nov 2025 12:32:06 -0500 Subject: [PATCH] 11-5 fix fix --- gamedata/cs2fixes.games.txt | 2 +- src/cs2_sdk/entity/services.h | 16 +++++++++++++--- src/recipientfilters.h | 11 +++++++++-- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/gamedata/cs2fixes.games.txt b/gamedata/cs2fixes.games.txt index dbae9c83..bf717430 100644 --- a/gamedata/cs2fixes.games.txt +++ b/gamedata/cs2fixes.games.txt @@ -10,7 +10,7 @@ { "library" "server" "windows" "\x48\x8B\xC4\x4C\x89\x48\x20\x4C\x89\x40\x18\x48\x89\x50\x10\x48\x89\x48\x08\x55\x53\x56\x57\x41\x54\x41\x55\x41\x56\x41\x57\x48\x8D\xA8\xC8\xFD\xFF\xFF" - "linux" "\x55\x66\x0F\xEF\xC0\x48\x89\xE5\x41\x57\x49\x89\xF7\x41\x56\x41\x55\x4D\x89\xC5" + "linux" "\x55\x66\x0F\xEF\xC0\x48\x89\xE5\x41\x57\x41\x56\x49\x89\xF6\x41\x55\x49\x89\xD5" } //https://github.com/KZGlobalTeam/cs2kz-metamod/blob/f4ba43bd44dc3300bb78ca20006174935ba7964f/gamedata/cs2kz-core.games.txt#L217C4-L224C5 // sub_18061AF90(a1, a2, ((a1 + 48) + 864i64) & 1); <- this one diff --git a/src/cs2_sdk/entity/services.h b/src/cs2_sdk/entity/services.h index 2d73b851..82ff2611 100644 --- a/src/cs2_sdk/entity/services.h +++ b/src/cs2_sdk/entity/services.h @@ -355,14 +355,20 @@ class CMoveData : public CMoveDataBase CMoveData(const CMoveData &source) : CMoveDataBase(source), m_outWishVel {source.m_outWishVel}, m_vecOldAngles {source.m_vecOldAngles}, - m_vecAccelPerSecond {source.m_vecAccelPerSecond}, m_vecInputRotated {source.m_vecInputRotated}, m_flMaxSpeed {source.m_flMaxSpeed} + m_vecInputRotated {source.m_vecInputRotated}, m_vecContinousAcceleration {source.m_vecContinousAcceleration}, + m_vecFrameVelocityDelta {source.m_vecFrameVelocityDelta}, m_flMaxSpeed {source.m_flMaxSpeed} { } Vector m_outWishVel; QAngle m_vecOldAngles; - Vector m_vecAccelPerSecond; // related to accel and friction + // World space input vector. Used to compare against last the movement services' previous rotation for ground movement stuff. Vector m_vecInputRotated; + // u/s^2. + Vector m_vecContinousAcceleration; + // Immediate delta in u/s. Air acceleration bypasses per second acceleration, applies up to half of its impulse to the velocity and the rest goes + // straight into this. + Vector m_vecFrameVelocityDelta; float m_flMaxSpeed; float m_flClientMaxSpeed; float m_flFrictionDecel; @@ -370,4 +376,8 @@ class CMoveData : public CMoveDataBase bool m_bGameCodeMovedPlayer; // true if usercmd cmd number == (m_nGameCodeHasMovedPlayerAfterCommand + 1) }; -static_assert(sizeof(CMoveData) == 296, "Class didn't match expected size"); \ No newline at end of file +#ifdef _WIN32 +static_assert(sizeof(CMoveData) == 312, "Class didn't match expected size"); +#else +static_assert(sizeof(CMoveData) == 304, "Class didn't match expected size"); +#endif \ No newline at end of file diff --git a/src/recipientfilters.h b/src/recipientfilters.h index 7630b399..fe6b0c01 100644 --- a/src/recipientfilters.h +++ b/src/recipientfilters.h @@ -70,10 +70,17 @@ class CRecipientFilter : public IRecipientFilter return std::popcount(bits); } + virtual CPlayerSlot GetExcludedPlayerDueToPrediction() const + { + return m_slotPlayerExcludedDueToPrediction; + } + protected: - NetChannelBufType_t m_nBufType; - bool m_bInitMessage; CPlayerBitVec m_Recipients; + CPlayerSlot m_slotPlayerExcludedDueToPrediction = -1; + NetChannelBufType_t m_nBufType = BUF_DEFAULT; + bool m_bInitMessage; + bool m_bDoNotSuppressPrediction; // unused }; // Simple filter for when only 1 recipient is needed