TTT-2 / TTT2

Trouble in Terrorist Town 2 for Garry's Mod (gmod)
https://steamcommunity.com/sharedfiles/filedetails/?id=1357204556
178 stars 74 forks source link

Hud(Elements) fallback inconsistency #1055

Open NickCloudAT opened 1 year ago

NickCloudAT commented 1 year ago

Your version of TTT2 (mandatory)

Leave one of the following:

Describe the bug (mandatory)

If a Hud-Element does not exist in a specific hud, the fallback element will just be the first one available. Currently this completely ignores restricted huds nor will it always fallback to the pureskin hud, if the old_ttt element is first in row.

Talked with @saibotk about this an the pointed to this section in code: https://github.com/TTT-2/TTT2/blob/2154639bef8cfe285399f4ba84dcd9c7ebb39583/gamemodes/terrortown/gamemode/shared/huds/base_huds/hud_base/cl_init.lua#L231-L240

It should probably be checked if the fallback hud is restricted.

Expected behaviour

Hud-Elements from restricted huds should not be considered as fallbacks.

stale[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.