Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gamedata/cs2fixes.games.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 13 additions & 3 deletions src/cs2_sdk/entity/services.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,19 +355,29 @@ 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;
bool m_bInAir;
bool m_bGameCodeMovedPlayer; // true if usercmd cmd number == (m_nGameCodeHasMovedPlayerAfterCommand + 1)
};

static_assert(sizeof(CMoveData) == 296, "Class didn't match expected size");
#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
11 changes: 9 additions & 2 deletions src/recipientfilters.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down