I’m making a radio addon which under certain conditions should remove a certain player’s VC panel (or prevents it from being rendered/added). Now there’s a problem, when I simply “remove the panel” it still appears for a split second before being hidden. In other words, the root of the problem is that the player has to be in g_VoicePanelList in order to be removed, and there’s absolutely no way to prevent them being added
I simply copied cl_voice.lua and overrode it. I would just run a hook right before a player’s panel is displayed, call it “ShouldDrawPlayerVoicePanel” with the player as the argument. if the hook returns false, it’s not rendered. Easy.
But is this really the only way? Overriding a file which the base game uses? Will this work with custom huds?