Merge branch 'no-battle-ring-box' into 'master'

Fix visual type desync on respawned battle items

See merge request KartKrew/Kart!1556
This commit is contained in:
James R. 2023-10-18 01:05:00 +00:00
commit 96e36521d8
2 changed files with 5 additions and 5 deletions

View file

@ -125,10 +125,7 @@ void Obj_RandomItemVisuals(mobj_t *mobj)
{
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)
if (mobj->extravalue1 == RINGBOX_TIME || specialstageinfo.valid)
{
// Sync the position in RINGBOX and RANDOMITEM animations.
statenum_t animDelta = mobj->state - states - S_RINGBOX1;

View file

@ -412,7 +412,10 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
P_SetTarget(&special->target, toucher);
P_UpdateLastPickup(player, cheesetype);
// P_KillMobj(special, toucher, toucher, DMG_NORMAL);
if (special->extravalue1 >= RINGBOX_TIME)
statenum_t specialstate = special->state - states;
if (specialstate >= S_RANDOMITEM1 && specialstate <= S_RANDOMITEM12)
K_StartItemRoulette(player, false);
else
K_StartItemRoulette(player, true);