From fe2f12c49f12480d540721ae0ab2b47e6bc62da4 Mon Sep 17 00:00:00 2001 From: Piogre Date: Thu, 19 Mar 2026 15:11:12 -0700 Subject: [PATCH] Fix Lightning Ball Spell retriggering trigger_add_tf_player_condition entities Lightning Ball spell currently uses the Teleport function passing only a velocity vector. Mechanically this just sets the player's absolute velocity, but invokes teleportation-related side-effects including apparently retriggering any trigger_add_tf_player_condition which the player is already inside of (and possibly others) causing in particular a noticeable issue if the player is inside a purgatory condition trigger. Since lightning ball doesn't actually need to set anything other than the player's velocity, it can just call the velocity-setting functions that teleport calls directly to avoid the side-effects with no change in movement mechanics --- src/game/shared/tf/halloween/tf_weapon_spellbook.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/shared/tf/halloween/tf_weapon_spellbook.cpp b/src/game/shared/tf/halloween/tf_weapon_spellbook.cpp index f987d9132f3..f69b5e858c0 100644 --- a/src/game/shared/tf/halloween/tf_weapon_spellbook.cpp +++ b/src/game/shared/tf/halloween/tf_weapon_spellbook.cpp @@ -3006,7 +3006,9 @@ class CTFProjectile_SpellLightningOrb : public CTFProjectile_SpellFireball pEntity->SetGroundChangeTime( gpGlobals->curtime + 0.5f ); } - pEntity->Teleport( NULL, NULL, &vecVelocity ); + pEntity->SetAbsVelocity( vecVelocity ); + pEntity->SetBaseVelocity( vec3_origin ); + } SetContextThink( &CTFProjectile_SpellLightningOrb::VortexThink, gpGlobals->curtime + 0.2f, "VortexThink" );