From f662ef9454b72e697171f867d5b632d457c2a962 Mon Sep 17 00:00:00 2001 From: toaster Date: Sat, 30 Nov 2019 20:02:51 +0000 Subject: [PATCH] Fix emerald coordinate overflow in failed SS tally (resolves #421). --- src/y_inter.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/y_inter.c b/src/y_inter.c index 32548d263..340e8be4c 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -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