From 3036eaf35db038da08d4ba5fbc8e822ccdb0485b Mon Sep 17 00:00:00 2001 From: toaster Date: Sat, 19 Aug 2023 22:11:56 +0100 Subject: [PATCH] MT_EMBLEM: Rework grabbable conditions, so you pass through collected ones in both offline and online for consistency --- src/p_inter.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/p_inter.c b/src/p_inter.c index fb2a7a071..9d3751395 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -596,26 +596,22 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) // Secret emblem thingy case MT_EMBLEM: { - boolean gotcollected = false; - if (!P_CanPickupEmblem(player, special->health - 1)) return; - if (P_IsLocalPlayer(player) && !gamedata->collected[special->health-1]) + if (P_IsLocalPlayer(player)) { - gamedata->collected[special->health-1] = gotcollected = true; - if (!M_UpdateUnlockablesAndExtraEmblems(true, true)) - S_StartSound(NULL, sfx_ncitem); - gamedata->deferredsave = true; + if (!gamedata->collected[special->health-1]) + { + gamedata->collected[special->health-1] = true; + if (!M_UpdateUnlockablesAndExtraEmblems(true, true)) + S_StartSound(NULL, sfx_ncitem); + gamedata->deferredsave = true; + } } - if (netgame) - { - // Don't delete the object in netgames, just fade it. - return; - } - - break; + // Don't delete the object, just fade it. + return; } // CTF Flags