Add a condition to bail on the HUD's ring counting down calculation if nummaprings is 0 or -1.

This commit is contained in:
toaster 2019-08-03 12:25:46 +01:00
parent 876f87e793
commit 544a160fc3
1 changed files with 7 additions and 3 deletions

View File

@ -1732,11 +1732,15 @@ static void ST_drawNiGHTSHUD(void)
{
// invert for s3k style junk
total_spherecount = ssspheres - total_spherecount;
total_ringcount = nummaprings - total_ringcount;
if (total_spherecount < 0)
total_spherecount = 0;
if (total_ringcount < 0)
total_ringcount = 0;
if (nummaprings > 0) // don't count down if there ISN'T a valid maximum number of rings, like sonic 3
{
total_ringcount = nummaprings - total_ringcount;
if (total_ringcount < 0)
total_ringcount = 0;
}
// now rings! you know, for that perfect bonus.
V_DrawScaledPatch(272, 8, V_PERPLAYER|V_SNAPTOTOP|V_SNAPTORIGHT|V_HUDTRANS, nbracket);