Skip to content

[TF2] Fix Lightning Ball Spell constantly phasing players in and out of Purgatory#1846

Open
Piogre wants to merge 1 commit intoValveSoftware:masterfrom
Piogre:lightning
Open

[TF2] Fix Lightning Ball Spell constantly phasing players in and out of Purgatory#1846
Piogre wants to merge 1 commit intoValveSoftware:masterfrom
Piogre:lightning

Conversation

@Piogre
Copy link
Copy Markdown

@Piogre Piogre commented Mar 19, 2026

Currently, a player hit with the Lightning Ball spell while in Purgatory will repeatedly gain and lose the TF_COND_PURGATORY condition for as long as they're in the spell's effective radius, which will cause them to stay ubered and kritzed for the duration, while the whole server is constantly spammed with the "escaped the underworld" chat alert and bell sound.

This is because the lightning ball spell calls the "teleport" function on players inside its radius, passing only a velocity vector, to continually re-apply an absolute velocity and draw those players toward its center. Mechanically, it's only setting velocity on the player, but because it's technically teleporting them it has other side effects, including apparently re-triggering trigger_add_tf_player_condition entities they're inside of and thus removing/re-applying the condition. This is noticeable for the TF_COND_PURGATORY condition, which applies the uber, kritz, server-wide sound alert and chat alert upon its removal.

Having the Lightning Ball spell set the velocity directly instead of unnecessarily teleporting the player (calling the same functions teleport would call for velocity) fixes this issue.

See below demonstration on pd_pit_of_death_event (sound on).

lightning.mp4

edit: fixes ValveSoftware/Source-1-Games#4492

… 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TF2] Hitting a player with the Ball o' Lightning spell in an Underworld spams "has escaped the underworld" message

1 participant