Skip to content

Commit

Permalink
fix passtime flamethrower
Browse files Browse the repository at this point in the history
  • Loading branch information
mastercoms committed Oct 6, 2020
1 parent 0c17fa0 commit 4e90c22
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
14 changes: 0 additions & 14 deletions game/shared/tf/tf_weapon_flamethrower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,13 +609,6 @@ void CTFFlameThrower::PrimaryAttack()
// Move other players back to history positions based on local player's lag
lagcompensation->StartLagCompensation( pOwner, pOwner->GetCurrentCommand() );

// PASSTIME custom lag compensation for the ball; see also tf_fx_shared.cpp
// it would be better if all entities could opt-in to this, or a way for lagcompensation to handle non-players automatically
if ( g_pPasstimeLogic && g_pPasstimeLogic->GetBall() )
{
g_pPasstimeLogic->GetBall()->StartLagCompensation( pOwner, pOwner->GetCurrentCommand() );
}

#endif
#ifdef CLIENT_DLL
C_CTF_GameStats.Event_PlayerFiredWeapon( pOwner, IsCurrentAttackACrit() );
Expand Down Expand Up @@ -716,13 +709,6 @@ void CTFFlameThrower::PrimaryAttack()

#if !defined (CLIENT_DLL)
lagcompensation->FinishLagCompensation( pOwner );

// PASSTIME custom lag compensation for the ball; see also tf_fx_shared.cpp
// it would be better if all entities could opt-in to this, or a way for lagcompensation to handle non-players automatically
if ( g_pPasstimeLogic && g_pPasstimeLogic->GetBall() )
{
g_pPasstimeLogic->GetBall()->FinishLagCompensation( pOwner );
}
#endif
}

Expand Down
15 changes: 15 additions & 0 deletions game/shared/tf/tf_weaponbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "tf_gamerules.h"
#include "tf_gamestats.h"
#include "ilagcompensationmanager.h"
#include "tf_passtime_logic.h"
#include "collisionutils.h"
#include "tf_team.h"
#include "tf_obj.h"
Expand Down Expand Up @@ -5464,6 +5465,13 @@ bool CTFWeaponBase::DeflectProjectiles()

lagcompensation->StartLagCompensation( pOwner, pOwner->GetCurrentCommand() );

// PASSTIME custom lag compensation for the ball; see also tf_fx_shared.cpp
// it would be better if all entities could opt-in to this, or a way for lagcompensation to handle non-players automatically
if ( g_pPasstimeLogic && g_pPasstimeLogic->GetBall() )
{
g_pPasstimeLogic->GetBall()->StartLagCompensation( pOwner, pOwner->GetCurrentCommand() );
}

Vector vecEye = pOwner->EyePosition();
Vector vecForward, vecRight, vecUp;
AngleVectors( pOwner->EyeAngles(), &vecForward, &vecRight, &vecUp );
Expand Down Expand Up @@ -5530,6 +5538,13 @@ bool CTFWeaponBase::DeflectProjectiles()

lagcompensation->FinishLagCompensation( pOwner );

// PASSTIME custom lag compensation for the ball; see also tf_fx_shared.cpp
// it would be better if all entities could opt-in to this, or a way for lagcompensation to handle non-players automatically
if ( g_pPasstimeLogic && g_pPasstimeLogic->GetBall() )
{
g_pPasstimeLogic->GetBall()->FinishLagCompensation( pOwner );
}

return true;
}

Expand Down

0 comments on commit 4e90c22

Please sign in to comment.