ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
632 stars 73 forks source link

[TF2] Player Destruction PD Hud doesn't reset between maps, causing visual bugs. #4478

Open Lizard-Of-Oz opened 1 year ago

Lizard-Of-Oz commented 1 year ago

When switching maps from arena_lumberyard_event aka Graveyard, which is technically a Player Destruction map with a custom HUD, to a different Player Destruction map, there are leftovers of Graveyard's custom HUD mixed with a normal PD Hud.

Some elements, however, do get reset. Notably, the custom elements Graveyard introduces for the alive player counter background.

Invoking the console command hud_reloadscheme fixes the issue.

My guess: the game overrides the properties of the elements present in both HUDs, but additional Graveyard HUD elements not present on the default HUD don't get reset/deleted.

If you switch the maps in reverse, going to Graveyard from a different PD map, the bug isn't present, indicating that the normal PD HUD elements Graveyard HUD hides indeed get hidden.

I used the vanilla HUD for these tests, but if the user installs a modded HUD that has additional elements, said elements also stick around between maps.

image

image

image

Lizard-Of-Oz commented 1 year ago

I want to stress that this problem causes issues for any map trying to make use of Custom PD HUD.

Giving how env_screenoverlay conflicts with others overlays, such as Jarate, Flame and Uber, mappers sometimes prefer to use Custom PD HUD on non-PD maps just to have custom UI elements, which may cause these elements to "leak" into other PD maps.