mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-03-31 07:21:54 +00:00
Push fakes away from other items
Prevents stupid item stacking in Battle (you can still do it with bananas, but THOSE are removable, and don't have a similar sprite)
This commit is contained in:
parent
cc5d248c90
commit
66a7adfc34
2 changed files with 26 additions and 0 deletions
25
src/p_map.c
25
src/p_map.c
|
@ -665,8 +665,33 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
|
||||
// SRB2kart 011617 - Colission code for kart items //{
|
||||
|
||||
// Push fakes out of other items
|
||||
if (tmthing->type == MT_FAKEITEM && (thing->type == MT_RANDOMITEM || thing->type == MT_FAKEITEM))
|
||||
{
|
||||
// see if it went over / under
|
||||
if (tmthing->z > thing->z + thing->height)
|
||||
return true; // overhead
|
||||
if (tmthing->z + tmthing->height < thing->z)
|
||||
return true; // underneath
|
||||
|
||||
P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y), thing->radius/4);
|
||||
return true;
|
||||
}
|
||||
else if (thing->type == MT_FAKEITEM && (tmthing->type == MT_RANDOMITEM || tmthing->type == MT_FAKEITEM))
|
||||
{
|
||||
// see if it went over / under
|
||||
if (tmthing->z > thing->z + thing->height)
|
||||
return true; // overhead
|
||||
if (tmthing->z + tmthing->height < thing->z)
|
||||
return true; // underneath
|
||||
|
||||
P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y), tmthing->radius/4);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (tmthing->type == MT_RANDOMITEM)
|
||||
return true;
|
||||
|
||||
if (tmthing->type == MT_ORBINAUT || tmthing->type == MT_JAWZ || tmthing->type == MT_JAWZ_DUD
|
||||
|| tmthing->type == MT_ORBINAUT_SHIELD || tmthing->type == MT_JAWZ_SHIELD)
|
||||
{
|
||||
|
|
|
@ -8151,6 +8151,7 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
}
|
||||
case MT_BANANA:
|
||||
case MT_FAKEITEM:
|
||||
mobj->friction = ORIG_FRICTION/4;
|
||||
if (mobj->momx || mobj->momy)
|
||||
P_SpawnGhostMobj(mobj);
|
||||
if (mobj->z <= mobj->floorz && mobj->health > 1)
|
||||
|
|
Loading…
Reference in a new issue