Skip to content

Commit b041c22

Browse files
committed
11-5 fix fix
1 parent 650ff3a commit b041c22

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

gamedata/cs2fixes.games.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{
1111
"library" "server"
1212
"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"
13-
"linux" "\x55\x66\x0F\xEF\xC0\x48\x89\xE5\x41\x57\x49\x89\xF7\x41\x56\x41\x55\x4D\x89\xC5"
13+
"linux" "\x55\x66\x0F\xEF\xC0\x48\x89\xE5\x41\x57\x41\x56\x49\x89\xF6\x41\x55\x49\x89\xD5"
1414
}
1515
//https://github.com/KZGlobalTeam/cs2kz-metamod/blob/f4ba43bd44dc3300bb78ca20006174935ba7964f/gamedata/cs2kz-core.games.txt#L217C4-L224C5
1616
// sub_18061AF90(a1, a2, ((a1 + 48) + 864i64) & 1); <- this one

src/cs2_sdk/entity/services.h

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,19 +355,29 @@ class CMoveData : public CMoveDataBase
355355

356356
CMoveData(const CMoveData &source)
357357
: CMoveDataBase(source), m_outWishVel {source.m_outWishVel}, m_vecOldAngles {source.m_vecOldAngles},
358-
m_vecAccelPerSecond {source.m_vecAccelPerSecond}, m_vecInputRotated {source.m_vecInputRotated}, m_flMaxSpeed {source.m_flMaxSpeed}
358+
m_vecInputRotated {source.m_vecInputRotated}, m_vecContinousAcceleration {source.m_vecContinousAcceleration},
359+
m_vecFrameVelocityDelta {source.m_vecFrameVelocityDelta}, m_flMaxSpeed {source.m_flMaxSpeed}
359360
{
360361
}
361362

362363
Vector m_outWishVel;
363364
QAngle m_vecOldAngles;
364-
Vector m_vecAccelPerSecond; // related to accel and friction
365+
// World space input vector. Used to compare against last the movement services' previous rotation for ground movement stuff.
365366
Vector m_vecInputRotated;
367+
// u/s^2.
368+
Vector m_vecContinousAcceleration;
369+
// 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
370+
// straight into this.
371+
Vector m_vecFrameVelocityDelta;
366372
float m_flMaxSpeed;
367373
float m_flClientMaxSpeed;
368374
float m_flFrictionDecel;
369375
bool m_bInAir;
370376
bool m_bGameCodeMovedPlayer; // true if usercmd cmd number == (m_nGameCodeHasMovedPlayerAfterCommand + 1)
371377
};
372378

373-
static_assert(sizeof(CMoveData) == 296, "Class didn't match expected size");
379+
#ifdef _WIN32
380+
static_assert(sizeof(CMoveData) == 312, "Class didn't match expected size");
381+
#else
382+
static_assert(sizeof(CMoveData) == 304, "Class didn't match expected size");
383+
#endif

src/recipientfilters.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,17 @@ class CRecipientFilter : public IRecipientFilter
7070
return std::popcount(bits);
7171
}
7272

73+
virtual CPlayerSlot GetExcludedPlayerDueToPrediction() const
74+
{
75+
return m_slotPlayerExcludedDueToPrediction;
76+
}
77+
7378
protected:
74-
NetChannelBufType_t m_nBufType;
75-
bool m_bInitMessage;
7679
CPlayerBitVec m_Recipients;
80+
CPlayerSlot m_slotPlayerExcludedDueToPrediction = -1;
81+
NetChannelBufType_t m_nBufType = BUF_DEFAULT;
82+
bool m_bInitMessage;
83+
bool m_bDoNotSuppressPrediction; // unused
7784
};
7885

7986
// Simple filter for when only 1 recipient is needed

0 commit comments

Comments
 (0)