diff --git a/src/g_statusbar/sbarinfo_commands.cpp b/src/g_statusbar/sbarinfo_commands.cpp index 6e6b55bec..ae6ba5b00 100644 --- a/src/g_statusbar/sbarinfo_commands.cpp +++ b/src/g_statusbar/sbarinfo_commands.cpp @@ -1442,7 +1442,7 @@ class CommandDrawNumber : public CommandDrawString int retv; VMReturn ret(&retv); GlobalVMStack.Call(func, params, 2, &ret, 1); - num = retv / TICRATE + 1; + num = retv < 0? 0 : retv / TICRATE + 1; break; } case INVENTORY: diff --git a/wadsrc/static/zscript/shared/player.txt b/wadsrc/static/zscript/shared/player.txt index 7b8ba8f30..9039b37b6 100644 --- a/wadsrc/static/zscript/shared/player.txt +++ b/wadsrc/static/zscript/shared/player.txt @@ -130,7 +130,7 @@ class PlayerPawn : Actor native return powerup.EffectTics, maxtics; } } - return 0, 0; + return -1, -1; } native int GetMaxHealth();