Hey list,
maybe a stupid question but don't know whats wrong..
My mod uses round based play, so besides a Maptime it has roundtime as
well, I copied the maptimeremaining function and so have a
roundtimeremaining function, works FINE.
But now I have a float(can be an int too) to start
Don't use == for time comparations, because you won't call the function at
the EXACT time always.
Better use this:
if ( GetRoundRemainingTime() = flStartSuddenDeathSound )
{
// play sound and enable flag so the sound doesn't get repeated
}
On Tue, Dec 16, 2008 at 3:36 PM, Yorg Kuijs
Heh, well got it working now, thanks!
Rodrigo 'r2d2rigo' Diaz wrote:
Actually, you'd be surprised how common that error is. I fell on it some
time ago, too :)
___
To unsubscribe, edit your list preferences, or view the list archives, please
Actually, you'd be surprised how common that error is. I fell on it some
time ago, too :)
On Tue, Dec 16, 2008 at 3:56 PM, Yorg Kuijs yorg.ku...@home.nl wrote:
I thought so, but weird thing is that 30 always works the first time. oh
well, I'll go do that then!
Should have thought of it...
My guess is that you're running into precision issues when you are comparing
the two floats, and that GetRoundRemainingTime() isn't returning exactly 35
or 40 or whatever.
What happens if you try:
if( GetRoundRemainingTime() = flStartSuddenDeathSound )
?
-Mack
On Tue, Dec 16, 2008 at 9:36 AM,
5 matches
Mail list logo