Page 1 of 1

Hudmessage discrepancy between render mode

Posted: Tue Nov 29, 2011 0:28
by chopkinsca
I have a script that uses HudMessage for a breath meter but I found how it displays depending on what render method is used.

Top is hardware (vid_renderer=1)
Bottom is software (vid_renderer=0)

[spoiler]Image[/spoiler]

Breath meter script (in case it's needed)
[spoiler]

Code: Select all

int howlongisthebar;
script 447 (void) {
	SetHudSize(512, 384, 1);
	//hudmessage(s: " air: ", d: GetAirSupply(PlayerNumber()) ; HUDMSG_plain, 189, CR_LIGHTBLUE, 400.0, 140.0, 1.0);
	if(GetAirSupply(PlayerNumber()) < 700) {
		
		howlongisthebar = (GetAirSupply(PlayerNumber()) / 35);
		for(int x = 0; x <  howlongisthebar; x++){
			//SetFont("WBARA0");
			//hudmessage(s: " air: ", d: GetAirSupply(PlayerNumber()); HUDMSG_plain, 189, CR_LIGHTBLUE, 400.0, 140.0, 1.0);
			//print(d: x);
			SetFont("WBARA0");
			HudMessage(s:"A"; HUDMSG_PLAIN, 190 + x, CR_LIGHTBLUE, 250.0 + (x * 7.0), 150.0, 1.0);
			//delay(1);
		}
		delay(35);
	}

	delay(1);
	restart;
}
[/spoiler]

I've attached the image used in the script, in case you need that too.

Re: Hudmessage discrepancy between render mode

Posted: Tue Nov 29, 2011 8:26
by Graf Zahl
It doesn't help at all if you post scaled down screenshots. Please use the original size. More importantly, post a functional demo map to show the error in action.

Re: Hudmessage discrepancy between render mode

Posted: Thu Dec 01, 2011 0:59
by chopkinsca
I didn't scale the image down... it's two screenshots at 800x600 each.

Anyway, I've attached an example. Try it with vid_renderer set to either 1 or 0.

Re: Hudmessage discrepancy between render mode

Posted: Thu Dec 01, 2011 18:30
by Graf Zahl
Well..

If anything in the HUDMessage code made actual sense I might be able to fix this. But the way the code messes around with coordinates just inevitably creates situations where the end result is not what one might expect.