Skip to content

Conversation

@wgetJane
Copy link
Contributor

Description

fixes ValveSoftware/Source-1-Games/issues/7761

unfixed, minimum interp time:

caber_15interp_unfixed.mp4

unfixed, default interp time:

caber_100interp_unfixed.mp4

fixed, default interp time:

caber_100interp_fixed.mp4

@wgetJane
Copy link
Contributor Author

wgetJane commented Dec 20, 2025

minor note: this could potentially not unlag all players that the explosion should reach because of the WantsLagCompensationOnEntity filter:

bool CTFPlayer::WantsLagCompensationOnEntity( const CBasePlayer *pPlayer, const CUserCmd *pCmd, const CBitVec<MAX_EDICTS> *pEntityTransmitBits ) const

the filter includes players that are within a 45 degree cone from the attacker's crosshair, and players that are within a certain distance based on the attacker's max walk speed and the value of the sv_maxunlag cvar:

// get max distance player could have moved within max lag compensation time,
// multiply by 1.5 to to avoid "dead zones" (sqrt(2) would be the exact value)
float maxDistance = 1.5 * pPlayer->MaxSpeed() * sv_maxunlag.GetFloat();

sv_maxunlag's default value is 1.0 and the caber user's walk speed is going to be 280 unit/s (or 308 with booties)

so under normal circumstances this distance is going to be 420 units (or 462 with booties), which is well above the caber explosion's radius of 100 units

if the caber user's max walk speed is somehow set really low (maybe through vscript idk) or sv_maxunlag is set to a very low value (i think older anticheat plugins do this), then the distance might not be enough to reach every player that should be lagcomped

though again, this is really minor, just something funny to note
(maybe weapons should have a WantsLagCompensationOnEntity method? probably out of scope for this pr though)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TF2] Caber's explosion is not lag-compensated

1 participant