Merge branch 'thunderdome-gaiden' into 'master'

No Special Stage ringbox, always Record Attack ringbox

See merge request KartKrew/Kart!1377
This commit is contained in:
James R 2023-08-11 23:07:08 +00:00
commit bb7e8156b0
2 changed files with 9 additions and 4 deletions

View file

@ -18,6 +18,7 @@
#include "../r_defs.h"
#include "../k_battle.h"
#include "../m_random.h"
#include "../k_specialstage.h" // specialstageinfo
#define FLOAT_HEIGHT ( 12 * FRACUNIT )
#define FLOAT_TIME ( 2 * TICRATE )
@ -114,10 +115,14 @@ void Obj_RandomItemVisuals(mobj_t *mobj)
// the player's cleared out a good portion of the map.
//
// Then extraval1 starts ticking up and triggers the transformation from Ringbox to Random Item.
if (mobj->fuse == 0 && !(mobj->flags & MF_NOCLIPTHING) && !(mobj->flags2 & MF2_AMBUSH)
&& !cv_thunderdome.value && !(modeattacking & ATTACKING_SPB))
if (mobj->fuse == 0 && !(mobj->flags & MF_NOCLIPTHING) && !(mobj->flags2 & MF2_AMBUSH) && !cv_thunderdome.value
&& (modeattacking == 0 || specialstageinfo.valid)) // Time Attacking in Special is a fucked-looking exception
{
mobj->extravalue1++;
if (specialstageinfo.valid) // Setting the timer in this case probably looks kinda goofy, but P_ItemPop checks xval1, not states.
mobj->extravalue1 = max(mobj->extravalue1, RINGBOX_TIME); // I will change this if this logic ever becomes even slightly more complicated.
if (mobj->extravalue1 == RINGBOX_TIME)
{
// Sync the position in RINGBOX and RANDOMITEM animations.
@ -125,7 +130,6 @@ void Obj_RandomItemVisuals(mobj_t *mobj)
P_SetMobjState(mobj, S_RANDOMITEM1 + (animDelta%12));
}
}
}
boolean Obj_RandomItemSpawnIn(mobj_t *mobj)

View file

@ -207,7 +207,8 @@ static void P_ItemPop(mobj_t *actor)
Obj_SpawnItemDebrisEffects(actor, actor->target);
P_SetMobjState(actor, S_RINGBOX1);
if (!specialstageinfo.valid) // In Special, you'll respawn as a Ring Box (random-item.c), don't confuse the player.
P_SetMobjState(actor, S_RINGBOX1);
actor->extravalue1 = 0;
// de-solidify