From 9770368ee9b2e60fb375b60da71e66f130c44e06 Mon Sep 17 00:00:00 2001 From: Tatsuru <44866610+Ikkarin@users.noreply.github.com> Date: Mon, 30 Nov 2020 18:21:06 -0300 Subject: [PATCH 1/2] Initialize junk line tag lists --- src/p_enemy.c | 8 ++++++++ src/p_inter.c | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/src/p_enemy.c b/src/p_enemy.c index 22de9bc67..63a14636d 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -3924,6 +3924,10 @@ void A_BossDeath(mobj_t *mo) } else { + // Initialize my junk + junk.tags.tags = NULL; + junk.tags.count = 0; + // Bring the egg trap up to the surface // Incredibly shitty code ahead Tag_FSet(&junk.tags, LE_CAPSULE0); @@ -4053,6 +4057,10 @@ bossjustdie: } case MT_KOOPA: { + // Initialize my junk + junk.tags.tags = NULL; + junk.tags.count = 0; + Tag_FSet(&junk.tags, LE_KOOPA); EV_DoCeiling(&junk, raiseToHighest); return; diff --git a/src/p_inter.c b/src/p_inter.c index 415c679e4..9bfe54e54 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -1388,6 +1388,10 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) if (player->bot) return; + // Initialize my junk + junk.tags.tags = NULL; + junk.tags.count = 0; + Tag_FSet(&junk.tags, LE_AXE); EV_DoElevator(&junk, bridgeFall, false); From fae845f935db2973da75e5f74197ada426bcd9a8 Mon Sep 17 00:00:00 2001 From: Tatsuru <44866610+Ikkarin@users.noreply.github.com> Date: Thu, 3 Dec 2020 17:50:10 -0300 Subject: [PATCH 2/2] Initialize in p_spec.c too + magic number replacement --- src/p_spec.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/p_spec.c b/src/p_spec.c index a1afdd00d..4996573a9 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -4420,15 +4420,19 @@ void P_ProcessSpecialSector(player_t *player, sector_t *sector, sector_t *rovers // clear the special so you can't push the button twice. sector->special = 0; + // Initialize my junk + junk.tags.tags = NULL; + junk.tags.count = 0; + // Move the button down - Tag_FSet(&junk.tags, 680); + Tag_FSet(&junk.tags, LE_CAPSULE0); EV_DoElevator(&junk, elevateDown, false); // Open the top FOF - Tag_FSet(&junk.tags, 681); + Tag_FSet(&junk.tags, LE_CAPSULE1); EV_DoFloor(&junk, raiseFloorToNearestFast); // Open the bottom FOF - Tag_FSet(&junk.tags, 682); + Tag_FSet(&junk.tags, LE_CAPSULE2); EV_DoCeiling(&junk, lowerToLowestFast); // Mark all players with the time to exit thingy!