From 1a9841272b0ef33185cd5872176de8056f819568 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Sun, 16 Apr 2023 23:19:52 -0400 Subject: [PATCH] Bigger, chunkier items test - Random & Sphere Items are x3 bigger. - Eggman Items grow to x3 bigger when they land. - Eggman Item hitbox reverted from 24 to 16 again, since the x3 size increases their hitbox even more anyway. - Random item temporarily moved to 2011 and 2000 objects ignored, as per Ivo's request. The idea behind this branch is to start turning tons of item clusters into single file item rows with only a few items per. The original intent was to make 9P+ more bearable by making item sets no longer free, but in a way that's engaging & takes thought. This does eliminate one of the reasons I had originally standardized MK64-style clusters, but honestly no one really hides eggman items anymore :P I'm not totally confident that this will make massive netgames enjoyable on its own, but it's one step towards that and this change has a lot of other benefits as well like less clutter and better visibility. Due to the mapthing type shuffle, this needs to be tested on a few maps with changed item sets, and then swap it back before merging. --- src/info.c | 4 ++-- src/p_mobj.c | 24 ++++++++++++++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/info.c b/src/info.c index 505ad5373..993039457 100644 --- a/src/info.c +++ b/src/info.c @@ -22331,7 +22331,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = // SRB2kart MT's { // MT_RANDOMITEM - 2000, // doomednum + 2011, // doomednum S_RANDOMITEM1, // spawnstate 1000, // spawnhealth S_NULL, // seestate @@ -23265,7 +23265,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL, // xdeathstate sfx_kc2e, // deathsound 0, // speed - 24*FRACUNIT, // radius + 16*FRACUNIT, // radius 32*FRACUNIT, // height 0, // display offset 100, // mass diff --git a/src/p_mobj.c b/src/p_mobj.c index 1c67ad98e..8bc686b4a 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -7309,6 +7309,12 @@ static boolean P_MobjRegularThink(mobj_t *mobj) S_StartSound(mobj, mobj->info->activesound); mobj->momx = mobj->momy = 0; mobj->health = 1; + + if (mobj->type == MT_EGGMANITEM) + { + // Grow to match the actual items + mobj->destscale *= 3; + } } } else @@ -10345,9 +10351,6 @@ static void P_DefaultMobjShadowScale(mobj_t *thing) thing->whiteshadow = false; break; case MT_EGGMANITEM: - thing->shadowscale = FRACUNIT; - thing->whiteshadow = false; - break; case MT_EGGMANITEM_SHIELD: thing->shadowscale = 3*FRACUNIT/2; thing->whiteshadow = false; @@ -10917,6 +10920,11 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type) // Remove before release CONS_Alert(CONS_WARNING, "Boss waypoints are deprecated. Did you forget to remove the old checkpoints, too?\n"); break; + case MT_RANDOMITEM: + case MT_SPHEREBOX: + mobj->destscale *= 3; + P_SetScale(mobj, mobj->scale * 3); + break; default: break; } @@ -12194,7 +12202,15 @@ static boolean P_SpawnNonMobjMapThing(mapthing_t *mthing) static boolean P_AllowMobjSpawn(mapthing_t* mthing, mobjtype_t i) { - (void)mthing; + //(void)mthing; + + if (mthing->type == 2000) + { + // TEMP: old item spot ID, while we're testing big items. + // Return MT_RANDOMITEM from 2011 to 2000 later, + // and then remove this when we're done. + return false; + } switch (i) {