1.40 ... Huds messed up all the time? Here's the fix

GreyHound

Veteran XX
Code:
/* 
	Huds only get respositioned when PlayGui is loaded, 
	so starting and leaving without playing will fuck up your hud setup.
	
	This standalone fix prevents that.
	
	Make sure this is loaded by 
	a) naming it  "HudMessupFix.acs.cs" and put into config/modules ... idiot proof way.
	or b) putting into autoexec.cs
	or c) exec it some other way
	
	GreyHound / Hunden
*/

$HudMessupFix::DoExport = false;

//catch the case that restores the huds, if that happened, it's save to export them later
function HudMessupFix::OnGuiOpen( %gui ) after Hud::OnGuiOpen {
	if ( %gui == "playGui" )
		$HudMessupFix::DoExport = true;
}

//make sure the shizzle just exports under our conditions
function HudMessupFix::OnExit() before Hud::OnExit 
{
	if($HudMessupFix::DoExport) //fine, don't halt
		return;
	
	echo("Sucky behavior detected and prevented.");
	halt;
}

.... damn this got annoying over time.

Feel free to do the fix at it's source, in "core/Hud.cs" ... it's basicly a copy paste if you know what you're doing
 
Last edited:
can anyone give me a code line to disable clock hud for real? Idk, i disable it in huds option but when I restart it appears again..
 
can anyone give me a code line to disable clock hud for real? Idk, i disable it in huds option but when I restart it appears again..

yeah the automatic reactivation of some huds is a pain, especially the chathud, i haven't done it but you should be fine removing the clockhud from play.gui.cs

(my clockhud does what i tell it to tho, no idea what's wrong on your side )
 
Last edited:
Back
Top