mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-06 18:08:26 +00:00
disable the extra css ladder stuff from checkpoints for now
This commit is contained in:
parent
f1ad55fddf
commit
158f0b8546
@ -152,8 +152,8 @@
|
||||
// find in CCSGameMovement::CheckForLadders which references CCSPlayer::CanGrabLadder
|
||||
"CCSPlayer::m_lastStandingPos"
|
||||
{
|
||||
"windows" "5688"
|
||||
"linux" "5704"
|
||||
"windows" "5684"
|
||||
"linux" "5704" // +20 wow that's easy!
|
||||
}
|
||||
// find CCSPlayer::CanGrabLadder via 4096.0f or symbols on linux...
|
||||
"CCSPlayer::m_ladderSurpressionTimer"
|
||||
|
||||
@ -23,6 +23,9 @@
|
||||
#endif
|
||||
#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
|
||||
{
|
||||
float fPosition[3];
|
||||
@ -53,10 +56,12 @@ enum struct cp_cache_t
|
||||
bool m_bHasWalkMovedSinceLastJump; // csgo only
|
||||
float m_ignoreLadderJumpTime; // csgo only
|
||||
|
||||
#if MORE_LADDER_CHECKPOINT_STUFF
|
||||
float m_lastStandingPos[3]; // css only
|
||||
float m_ladderSurpressionTimer[2]; // css only // 0 = duration, 1 = remaining
|
||||
float m_lastLadderNormal[3]; // css only
|
||||
float m_lastLadderPos[3]; // css only
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -103,10 +103,12 @@ bool gB_ReplayRecorder = false;
|
||||
DynamicHook gH_CommitSuicide = null;
|
||||
float gF_NextSuicide[MAXPLAYERS+1];
|
||||
|
||||
#if MORE_LADDER_CHECKPOINT_STUFF
|
||||
int gI_Offset_m_lastStandingPos = 0;
|
||||
int gI_Offset_m_ladderSurpressionTimer = 0;
|
||||
int gI_Offset_m_lastLadderNormal = 0;
|
||||
int gI_Offset_m_lastLadderPos = 0;
|
||||
#endif
|
||||
|
||||
public Plugin myinfo =
|
||||
{
|
||||
@ -232,6 +234,7 @@ void LoadDHooks()
|
||||
|
||||
if (gEV_Type == Engine_CSS)
|
||||
{
|
||||
#if MORE_LADDER_CHECKPOINT_STUFF
|
||||
if ((gI_Offset_m_lastStandingPos = GameConfGetOffset(hGameData, "CCSPlayer::m_lastStandingPos")) == -1)
|
||||
{
|
||||
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\"!");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
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 MORE_LADDER_CHECKPOINT_STUFF
|
||||
GetEntDataVector(target, gI_Offset_m_lastStandingPos, cpcache.m_lastStandingPos);
|
||||
cpcache.m_ladderSurpressionTimer[0] = GetEntDataFloat(target, gI_Offset_m_ladderSurpressionTimer + 4);
|
||||
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_lastLadderPos, cpcache.m_lastLadderPos);
|
||||
#endif
|
||||
}
|
||||
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 MORE_LADDER_CHECKPOINT_STUFF
|
||||
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 + 8, cpcache.m_ladderSurpressionTimer[1] + GetGameTime());
|
||||
SetEntDataVector(client, gI_Offset_m_lastLadderNormal, cpcache.m_lastLadderNormal);
|
||||
SetEntDataVector(client, gI_Offset_m_lastLadderPos, cpcache.m_lastLadderPos);
|
||||
#endif
|
||||
SetEntPropFloat(client, Prop_Send, "m_flDucktime", cpcache.fDucktime);
|
||||
}
|
||||
else if(gEV_Type == Engine_CSGO)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user