Re: [hlcoders] Hud round counter not displaying correctly

2005-02-28 Thread British_Bomber
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



Re: [hlcoders] Hud round counter not displaying correctly

2005-02-28 Thread r00t 3:16
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


Re: [hlcoders] Hud round counter not displaying correctly

2005-02-28 Thread r00t 3:16
Oh forgot to mention,
When the timer gets to around 10 seconds the hud will change red. This also 
works in-game
So the hud works just the timer isn't being displayed.

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


Re: [hlcoders] Hud round counter not displaying correctly

2005-02-28 Thread r00t 3:16
Nevermind I figured it out, I had the wrong font set. It seems that if you 
have
m_hTextFont as the font it will not work :P
It is now working sorry for the emails..

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


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



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