mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-03-23 11:21:51 +00:00
MFE_JUSTBOUNCEDWALL
Hopefully, this should prevent instances where shells/Oni get caught on walls.
This commit is contained in:
parent
d5a2fb9317
commit
14caf66567
4 changed files with 12 additions and 4 deletions
|
@ -7306,7 +7306,7 @@ static const char *const MOBJEFLAG_LIST[] = {
|
|||
"JUSTSTEPPEDDOWN", // used for ramp sectors
|
||||
"VERTICALFLIP", // Vertically flip sprite/allow upside-down physics
|
||||
"GOOWATER", // Goo water
|
||||
"\x01", // free: 1<<7 (name un-matchable)
|
||||
"JUSTBOUNCEDWALL", // SRB2Kart: Mobj already bounced off a wall this tic
|
||||
"SPRUNG", // Mobj was already sprung this tic
|
||||
"APPLYPMOMZ", // Platform movement
|
||||
NULL
|
||||
|
|
|
@ -3886,6 +3886,12 @@ void P_BounceMove(mobj_t *mo)
|
|||
//INT32 hitcount;
|
||||
fixed_t mmomx = 0, mmomy = 0;
|
||||
|
||||
if (mo->eflags & MFE_JUSTBOUNCEDWALL)
|
||||
{
|
||||
P_SlideMove(mo, true);
|
||||
return;
|
||||
}
|
||||
|
||||
slidemo = mo;
|
||||
//hitcount = 0;
|
||||
|
||||
|
@ -4018,7 +4024,8 @@ bounceback:
|
|||
}
|
||||
}
|
||||
|
||||
P_HitBounceLine(bestslideline); // clip the moves
|
||||
P_HitBounceLine(bestslideline);
|
||||
mo->eflags |= MFE_JUSTBOUNCEDWALL;
|
||||
|
||||
mo->momx = tmxmove;
|
||||
mo->momy = tmymove;
|
||||
|
|
|
@ -6407,7 +6407,7 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
P_SetTarget(&mobj->tracer, NULL);
|
||||
|
||||
mobj->flags2 &= ~MF2_PUSHED;
|
||||
mobj->eflags &= ~MFE_SPRUNG;
|
||||
mobj->eflags &= ~(MFE_SPRUNG|MFE_JUSTBOUNCEDWALL);
|
||||
|
||||
tmfloorthing = tmhitthing = NULL;
|
||||
|
||||
|
|
|
@ -233,7 +233,8 @@ typedef enum
|
|||
MFE_VERTICALFLIP = 1<<5,
|
||||
// Goo water
|
||||
MFE_GOOWATER = 1<<6,
|
||||
// free: to and including 1<<7
|
||||
// SRB2Kart: The mobj just hit & bounced off a wall, this is cleared on next frame
|
||||
MFE_JUSTBOUNCEDWALL = 1<<7,
|
||||
// Mobj was already sprung this tic
|
||||
MFE_SPRUNG = 1<<8,
|
||||
// Platform movement
|
||||
|
|
Loading…
Reference in a new issue