From 8a882c55e5020d2d3ba4898d7c686ddddc97bb1b Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 20 Jan 2024 21:31:08 -0800 Subject: [PATCH] Battle: have 6 emeralds and touch the 7th to win instantly Win instantly instead of waiting for the emerald to finish swirling into your body. --- src/k_battle.c | 5 +++++ src/p_inter.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/src/k_battle.c b/src/k_battle.c index 811c9fc37..7e330b545 100644 --- a/src/k_battle.c +++ b/src/k_battle.c @@ -207,6 +207,11 @@ void K_CheckEmeralds(player_t *player) return; } + if (player->exiting) + { + return; + } + player->roundscore = 100; // lmao P_DoAllPlayersExit(0, false); diff --git a/src/p_inter.c b/src/p_inter.c index a2954e8ca..97b166def 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -560,6 +560,13 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) Obj_SetEmeraldAwardee(special, toucher); } + // You have 6 emeralds and you touch the 7th: win instantly! + if (ALLCHAOSEMERALDS((player->emeralds | special->extravalue1))) + { + player->emeralds |= special->extravalue1; + K_CheckEmeralds(player); + } + return; case MT_SPECIAL_UFO: if (Obj_UFOEmeraldCollect(special, toucher) == false)