|
31 | 31 | #include "tf_gamerules.h" |
32 | 32 | #include "tf_gamestats.h" |
33 | 33 | #include "ilagcompensationmanager.h" |
| 34 | +#include "tf_passtime_logic.h" |
34 | 35 | #include "collisionutils.h" |
35 | 36 | #include "tf_team.h" |
36 | 37 | #include "tf_obj.h" |
@@ -5464,6 +5465,13 @@ bool CTFWeaponBase::DeflectProjectiles() |
5464 | 5465 |
|
5465 | 5466 | lagcompensation->StartLagCompensation( pOwner, pOwner->GetCurrentCommand() ); |
5466 | 5467 |
|
| 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 | + |
5467 | 5475 | Vector vecEye = pOwner->EyePosition(); |
5468 | 5476 | Vector vecForward, vecRight, vecUp; |
5469 | 5477 | AngleVectors( pOwner->EyeAngles(), &vecForward, &vecRight, &vecUp ); |
@@ -5530,6 +5538,13 @@ bool CTFWeaponBase::DeflectProjectiles() |
5530 | 5538 |
|
5531 | 5539 | lagcompensation->FinishLagCompensation( pOwner ); |
5532 | 5540 |
|
| 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 | + |
5533 | 5548 | return true; |
5534 | 5549 | } |
5535 | 5550 |
|
|
0 commit comments