Fix emerald coordinate overflow in failed SS tally (resolves #421).

This commit is contained in:
toaster 2019-11-30 20:02:51 +00:00
parent e664e8b7f3
commit f662ef9454
1 changed files with 6 additions and 5 deletions

View File

@ -603,8 +603,7 @@ void Y_IntermissionDrawer(void)
{
if (emeraldbounces < 3)
{
emeraldmomy += 1;
emeraldy += emeraldmomy;
emeraldy += (++emeraldmomy);
if (emeraldy > 74)
{
S_StartSound(NULL, sfx_tink); // tink
@ -616,9 +615,11 @@ void Y_IntermissionDrawer(void)
}
else
{
emeraldmomy += 1;
emeraldy += emeraldmomy;
emeraldx += intertic - 6;
if (emeraldy < (vid.height/vid.dupy)+16)
{
emeraldy += (++emeraldmomy);
emeraldx += intertic - 6;
}
if (emeraldbounces < 1 && emeraldy > 74)
{
S_StartSound(NULL, sfx_shldls); // nope