Skip to content

Commit 4e90c22

Browse files
committed
fix passtime flamethrower
1 parent 0c17fa0 commit 4e90c22

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

game/shared/tf/tf_weapon_flamethrower.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -609,13 +609,6 @@ void CTFFlameThrower::PrimaryAttack()
609609
// Move other players back to history positions based on local player's lag
610610
lagcompensation->StartLagCompensation( pOwner, pOwner->GetCurrentCommand() );
611611

612-
// PASSTIME custom lag compensation for the ball; see also tf_fx_shared.cpp
613-
// it would be better if all entities could opt-in to this, or a way for lagcompensation to handle non-players automatically
614-
if ( g_pPasstimeLogic && g_pPasstimeLogic->GetBall() )
615-
{
616-
g_pPasstimeLogic->GetBall()->StartLagCompensation( pOwner, pOwner->GetCurrentCommand() );
617-
}
618-
619612
#endif
620613
#ifdef CLIENT_DLL
621614
C_CTF_GameStats.Event_PlayerFiredWeapon( pOwner, IsCurrentAttackACrit() );
@@ -716,13 +709,6 @@ void CTFFlameThrower::PrimaryAttack()
716709

717710
#if !defined (CLIENT_DLL)
718711
lagcompensation->FinishLagCompensation( pOwner );
719-
720-
// PASSTIME custom lag compensation for the ball; see also tf_fx_shared.cpp
721-
// it would be better if all entities could opt-in to this, or a way for lagcompensation to handle non-players automatically
722-
if ( g_pPasstimeLogic && g_pPasstimeLogic->GetBall() )
723-
{
724-
g_pPasstimeLogic->GetBall()->FinishLagCompensation( pOwner );
725-
}
726712
#endif
727713
}
728714

game/shared/tf/tf_weaponbase.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "tf_gamerules.h"
3232
#include "tf_gamestats.h"
3333
#include "ilagcompensationmanager.h"
34+
#include "tf_passtime_logic.h"
3435
#include "collisionutils.h"
3536
#include "tf_team.h"
3637
#include "tf_obj.h"
@@ -5464,6 +5465,13 @@ bool CTFWeaponBase::DeflectProjectiles()
54645465

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

5468+
// PASSTIME custom lag compensation for the ball; see also tf_fx_shared.cpp
5469+
// it would be better if all entities could opt-in to this, or a way for lagcompensation to handle non-players automatically
5470+
if ( g_pPasstimeLogic && g_pPasstimeLogic->GetBall() )
5471+
{
5472+
g_pPasstimeLogic->GetBall()->StartLagCompensation( pOwner, pOwner->GetCurrentCommand() );
5473+
}
5474+
54675475
Vector vecEye = pOwner->EyePosition();
54685476
Vector vecForward, vecRight, vecUp;
54695477
AngleVectors( pOwner->EyeAngles(), &vecForward, &vecRight, &vecUp );
@@ -5530,6 +5538,13 @@ bool CTFWeaponBase::DeflectProjectiles()
55305538

55315539
lagcompensation->FinishLagCompensation( pOwner );
55325540

5541+
// PASSTIME custom lag compensation for the ball; see also tf_fx_shared.cpp
5542+
// it would be better if all entities could opt-in to this, or a way for lagcompensation to handle non-players automatically
5543+
if ( g_pPasstimeLogic && g_pPasstimeLogic->GetBall() )
5544+
{
5545+
g_pPasstimeLogic->GetBall()->FinishLagCompensation( pOwner );
5546+
}
5547+
55335548
return true;
55345549
}
55355550

0 commit comments

Comments
 (0)