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)