mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Check for unlimited time power up using INT_MAX
It is possible for a power up to exceed 999 seconds without it being unlimited time.
This commit is contained in:
parent
520b100449
commit
c2ca5e7856
2 changed files with 16 additions and 6 deletions
|
@ -1197,10 +1197,15 @@ static float CG_DrawPowerups( float y ) {
|
||||||
if ( !ps->powerups[ i ] ) {
|
if ( !ps->powerups[ i ] ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
t = ps->powerups[ i ] - cg.time;
|
|
||||||
// ZOID--don't draw if the power up has unlimited time (999 seconds)
|
// ZOID--don't draw if the power up has unlimited time
|
||||||
// This is true of the CTF flags
|
// This is true of the CTF flags
|
||||||
if ( t < 0 || t > 999000) {
|
if ( ps->powerups[ i ] == INT_MAX ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
t = ps->powerups[ i ] - cg.time;
|
||||||
|
if ( t <= 0 ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -832,10 +832,15 @@ static void CG_DrawAreaPowerUp(rectDef_t *rect, int align, float special, float
|
||||||
if ( !ps->powerups[ i ] ) {
|
if ( !ps->powerups[ i ] ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
t = ps->powerups[ i ] - cg.time;
|
|
||||||
// ZOID--don't draw if the power up has unlimited time (999 seconds)
|
// ZOID--don't draw if the power up has unlimited time
|
||||||
// This is true of the CTF flags
|
// This is true of the CTF flags
|
||||||
if ( t <= 0 || t >= 999000) {
|
if ( ps->powerups[ i ] == INT_MAX ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
t = ps->powerups[ i ] - cg.time;
|
||||||
|
if ( t <= 0 ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue