Skip to content

Commit

Permalink
fix: skip injecting a backwards sample into projectiles
Browse files Browse the repository at this point in the history
i know this is Valve's way to fix a theoretical visual bug
and smooth out over interp for projectile spawning.

however, players were setting their interp to dangerously
low values because they got the impression that their projectiles
were delayed by interp. in testing, I couldn't really find much
benefit to adding the history at higher interps like the max of 0.5
and it was a negligible difference at 0.1 and lower.
  • Loading branch information
mastercoms committed Mar 18, 2023
1 parent a3973d6 commit 6e05696
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/game/shared/tf/tf_projectile_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ void CTFBaseProjectile::PostDataUpdate( DataUpdateType_t type )
// Pass through to the base class.
BaseClass::PostDataUpdate( type );

return;

if ( type == DATA_UPDATE_CREATED )
{
// Now stick our initial velocity and angles into the interpolation history.
Expand Down
2 changes: 2 additions & 0 deletions src/game/shared/tf/tf_weaponbase_grenadeproj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ void CTFWeaponBaseGrenadeProj::OnDataChanged( DataUpdateType_t type )
{
BaseClass::OnDataChanged( type );

return;

if ( type == DATA_UPDATE_CREATED )
{
// Now stick our initial velocity into the interpolation history
Expand Down
2 changes: 2 additions & 0 deletions src/game/shared/tf/tf_weaponbase_rocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ void CTFBaseRocket::PostDataUpdate( DataUpdateType_t type )
// Pass through to the base class.
BaseClass::PostDataUpdate( type );

return;

if ( type == DATA_UPDATE_CREATED )
{
// Now stick our initial velocity and angles into the interpolation history.
Expand Down

0 comments on commit 6e05696

Please sign in to comment.