disable the extra css ladder stuff from checkpoints for now

This commit is contained in:
rtldg 2022-04-21 13:22:44 +00:00
parent f1ad55fddf
commit 158f0b8546
3 changed files with 15 additions and 2 deletions

View File

@ -152,8 +152,8 @@
// find in CCSGameMovement::CheckForLadders which references CCSPlayer::CanGrabLadder // find in CCSGameMovement::CheckForLadders which references CCSPlayer::CanGrabLadder
"CCSPlayer::m_lastStandingPos" "CCSPlayer::m_lastStandingPos"
{ {
"windows" "5688" "windows" "5684"
"linux" "5704" "linux" "5704" // +20 wow that's easy!
} }
// find CCSPlayer::CanGrabLadder via 4096.0f or symbols on linux... // find CCSPlayer::CanGrabLadder via 4096.0f or symbols on linux...
"CCSPlayer::m_ladderSurpressionTimer" "CCSPlayer::m_ladderSurpressionTimer"

View File

@ -23,6 +23,9 @@
#endif #endif
#define _shavit_checkpoints_included #define _shavit_checkpoints_included
// disabled for now since it's a lot of bytes to add
#define MORE_LADDER_CHECKPOINT_STUFF 0
enum struct cp_cache_t enum struct cp_cache_t
{ {
float fPosition[3]; float fPosition[3];
@ -53,10 +56,12 @@ enum struct cp_cache_t
bool m_bHasWalkMovedSinceLastJump; // csgo only bool m_bHasWalkMovedSinceLastJump; // csgo only
float m_ignoreLadderJumpTime; // csgo only float m_ignoreLadderJumpTime; // csgo only
#if MORE_LADDER_CHECKPOINT_STUFF
float m_lastStandingPos[3]; // css only float m_lastStandingPos[3]; // css only
float m_ladderSurpressionTimer[2]; // css only // 0 = duration, 1 = remaining float m_ladderSurpressionTimer[2]; // css only // 0 = duration, 1 = remaining
float m_lastLadderNormal[3]; // css only float m_lastLadderNormal[3]; // css only
float m_lastLadderPos[3]; // css only float m_lastLadderPos[3]; // css only
#endif
} }
/** /**

View File

@ -103,10 +103,12 @@ bool gB_ReplayRecorder = false;
DynamicHook gH_CommitSuicide = null; DynamicHook gH_CommitSuicide = null;
float gF_NextSuicide[MAXPLAYERS+1]; float gF_NextSuicide[MAXPLAYERS+1];
#if MORE_LADDER_CHECKPOINT_STUFF
int gI_Offset_m_lastStandingPos = 0; int gI_Offset_m_lastStandingPos = 0;
int gI_Offset_m_ladderSurpressionTimer = 0; int gI_Offset_m_ladderSurpressionTimer = 0;
int gI_Offset_m_lastLadderNormal = 0; int gI_Offset_m_lastLadderNormal = 0;
int gI_Offset_m_lastLadderPos = 0; int gI_Offset_m_lastLadderPos = 0;
#endif
public Plugin myinfo = public Plugin myinfo =
{ {
@ -232,6 +234,7 @@ void LoadDHooks()
if (gEV_Type == Engine_CSS) if (gEV_Type == Engine_CSS)
{ {
#if MORE_LADDER_CHECKPOINT_STUFF
if ((gI_Offset_m_lastStandingPos = GameConfGetOffset(hGameData, "CCSPlayer::m_lastStandingPos")) == -1) if ((gI_Offset_m_lastStandingPos = GameConfGetOffset(hGameData, "CCSPlayer::m_lastStandingPos")) == -1)
{ {
SetFailState("Couldn't get the offset for \"CCSPlayer::m_lastStandingPos\"!"); SetFailState("Couldn't get the offset for \"CCSPlayer::m_lastStandingPos\"!");
@ -251,6 +254,7 @@ void LoadDHooks()
{ {
SetFailState("Couldn't get the offset for \"CCSPlayer::m_lastLadderPos\"!"); SetFailState("Couldn't get the offset for \"CCSPlayer::m_lastLadderPos\"!");
} }
#endif
} }
delete hGameData; delete hGameData;
@ -1412,11 +1416,13 @@ void SaveCheckpointCache(int saver, int target, cp_cache_t cpcache, int index, H
if (gEV_Type == Engine_CSS) if (gEV_Type == Engine_CSS)
{ {
#if MORE_LADDER_CHECKPOINT_STUFF
GetEntDataVector(target, gI_Offset_m_lastStandingPos, cpcache.m_lastStandingPos); GetEntDataVector(target, gI_Offset_m_lastStandingPos, cpcache.m_lastStandingPos);
cpcache.m_ladderSurpressionTimer[0] = GetEntDataFloat(target, gI_Offset_m_ladderSurpressionTimer + 4); cpcache.m_ladderSurpressionTimer[0] = GetEntDataFloat(target, gI_Offset_m_ladderSurpressionTimer + 4);
cpcache.m_ladderSurpressionTimer[1] = GetEntDataFloat(target, gI_Offset_m_ladderSurpressionTimer + 8) - GetGameTime(); cpcache.m_ladderSurpressionTimer[1] = GetEntDataFloat(target, gI_Offset_m_ladderSurpressionTimer + 8) - GetGameTime();
GetEntDataVector(target, gI_Offset_m_lastLadderNormal, cpcache.m_lastLadderNormal); GetEntDataVector(target, gI_Offset_m_lastLadderNormal, cpcache.m_lastLadderNormal);
GetEntDataVector(target, gI_Offset_m_lastLadderPos, cpcache.m_lastLadderPos); GetEntDataVector(target, gI_Offset_m_lastLadderPos, cpcache.m_lastLadderPos);
#endif
} }
else if (gEV_Type == Engine_CSGO) else if (gEV_Type == Engine_CSGO)
{ {
@ -1690,11 +1696,13 @@ bool LoadCheckpointCache(int client, cp_cache_t cpcache, int index, bool force =
if(gEV_Type == Engine_CSS) if(gEV_Type == Engine_CSS)
{ {
#if MORE_LADDER_CHECKPOINT_STUFF
SetEntDataVector(client, gI_Offset_m_lastStandingPos, cpcache.m_lastStandingPos); SetEntDataVector(client, gI_Offset_m_lastStandingPos, cpcache.m_lastStandingPos);
SetEntDataFloat(client, gI_Offset_m_ladderSurpressionTimer + 4, cpcache.m_ladderSurpressionTimer[0]); SetEntDataFloat(client, gI_Offset_m_ladderSurpressionTimer + 4, cpcache.m_ladderSurpressionTimer[0]);
SetEntDataFloat(client, gI_Offset_m_ladderSurpressionTimer + 8, cpcache.m_ladderSurpressionTimer[1] + GetGameTime()); SetEntDataFloat(client, gI_Offset_m_ladderSurpressionTimer + 8, cpcache.m_ladderSurpressionTimer[1] + GetGameTime());
SetEntDataVector(client, gI_Offset_m_lastLadderNormal, cpcache.m_lastLadderNormal); SetEntDataVector(client, gI_Offset_m_lastLadderNormal, cpcache.m_lastLadderNormal);
SetEntDataVector(client, gI_Offset_m_lastLadderPos, cpcache.m_lastLadderPos); SetEntDataVector(client, gI_Offset_m_lastLadderPos, cpcache.m_lastLadderPos);
#endif
SetEntPropFloat(client, Prop_Send, "m_flDucktime", cpcache.fDucktime); SetEntPropFloat(client, Prop_Send, "m_flDucktime", cpcache.fDucktime);
} }
else if(gEV_Type == Engine_CSGO) else if(gEV_Type == Engine_CSGO)