- restated some weird number manipulation in SBARINFO for powerup time. This appears to be needed to distinguish between non-expiring items and non-present items.

This commit is contained in:
Christoph Oelckers 2017-02-14 21:08:48 +01:00
parent a9f650c3f2
commit 3170591e32
2 changed files with 2 additions and 2 deletions

View file

@ -1442,7 +1442,7 @@ class CommandDrawNumber : public CommandDrawString
int retv; int retv;
VMReturn ret(&retv); VMReturn ret(&retv);
GlobalVMStack.Call(func, params, 2, &ret, 1); GlobalVMStack.Call(func, params, 2, &ret, 1);
num = retv / TICRATE + 1; num = retv < 0? 0 : retv / TICRATE + 1;
break; break;
} }
case INVENTORY: case INVENTORY:

View file

@ -130,7 +130,7 @@ class PlayerPawn : Actor native
return powerup.EffectTics, maxtics; return powerup.EffectTics, maxtics;
} }
} }
return 0, 0; return -1, -1;
} }
native int GetMaxHealth(); native int GetMaxHealth();