The timer is created using the
CountdownTimer class;

So when the round_start event fires client / server both create a timer using CountdownTimer class.
Once the timer is created you can get the time is elapsed with a pointer roundTimer->GetRemainingTime();


I convert the GetRemainingTime() to minutes and then seconds.

Again the timer isn't the issue I do not think..
The function below DevMsg shows in the console the time like is should,
Just the swprintf() is not displaying, it shows 0 in the hud. Not sure why it displays 0 because the DevMsg() is is showing the
time counting down.
So why does the hud only show 0?
My Paint(); is what calls PaintTime();


void CHudRoundTimer::PaintTime(HFont font, int xpos, int ypos, int mins, int secs)
{


DevMsg(2,"mins %i seconds %i\n", mins, secs);
surface()->DrawSetTextFont(font);
wchar_t unicode[6];
swprintf(unicode, L"%d:%.2d", mins, secs);
surface()->DrawSetTextPos(xpos, ypos);
// surface()->DrawSetTextColor( 255, 0, 0, 255 );
for (wchar_t *ch = unicode; *ch != 0; ch++)
{
surface()->DrawUnicodeChar(*ch);
}
}

r00t 3:16
CQC Gaming
www.cqc-gaming.com
----- Original Message ----- From: "British_Bomber" <[EMAIL PROTECTED]>
To: <hlcoders@list.valvesoftware.com>
Sent: Monday, February 28, 2005 5:17 AM
Subject: Re: [hlcoders] Hud round counter not displaying correctly



where is the time being sent from and updated?  Client or Server?

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders






_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Reply via email to