mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-14 05:41:02 +00:00
Merge branch 'fix-obj-step' into 'next'
Fix non-player objects having busted step-up/down on slopes Why the fuck did I make this a player conditional in the first place holy shit See merge request !103
This commit is contained in:
commit
fd5297ee6c
2 changed files with 14 additions and 6 deletions
|
@ -1970,8 +1970,12 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
|
|||
}
|
||||
|
||||
// Ramp test
|
||||
if (thing->player && maxstep > 0
|
||||
&& !(P_PlayerTouchingSectorSpecial(thing->player, 1, 14) || GETSECSPECIAL(R_PointInSubsector(x, y)->sector->special, 1) == 14))
|
||||
if (maxstep > 0 && !(
|
||||
thing->player && (
|
||||
P_PlayerTouchingSectorSpecial(thing->player, 1, 14)
|
||||
|| GETSECSPECIAL(R_PointInSubsector(x, y)->sector->special, 1) == 14)
|
||||
)
|
||||
)
|
||||
{
|
||||
// If the floor difference is MAXSTEPMOVE or less, and the sector isn't Section1:14, ALWAYS
|
||||
// step down! Formerly required a Section1:13 sector for the full MAXSTEPMOVE, but no more.
|
||||
|
|
12
src/p_mobj.c
12
src/p_mobj.c
|
@ -1650,8 +1650,6 @@ void P_XYMovement(mobj_t *mo)
|
|||
I_Assert(mo != NULL);
|
||||
I_Assert(!P_MobjWasRemoved(mo));
|
||||
|
||||
moved = true;
|
||||
|
||||
// if it's stopped
|
||||
if (!mo->momx && !mo->momy)
|
||||
{
|
||||
|
@ -1708,9 +1706,9 @@ void P_XYMovement(mobj_t *mo)
|
|||
if (!P_TryMove(mo, mo->x + xmove, mo->y + ymove, true) && !(mo->eflags & MFE_SPRUNG))
|
||||
{
|
||||
// blocked move
|
||||
moved = false;
|
||||
|
||||
if (player) {
|
||||
moved = false;
|
||||
if (player->bot)
|
||||
B_MoveBlocked(player);
|
||||
}
|
||||
|
@ -1815,7 +1813,7 @@ void P_XYMovement(mobj_t *mo)
|
|||
else
|
||||
mo->momx = mo->momy = 0;
|
||||
}
|
||||
else if (player)
|
||||
else
|
||||
moved = true;
|
||||
|
||||
if (P_MobjWasRemoved(mo)) // MF_SPECIAL touched a player! O_o;;
|
||||
|
@ -2375,6 +2373,12 @@ static boolean P_ZMovement(mobj_t *mo)
|
|||
mo->z = mo->floorz;
|
||||
|
||||
#ifdef ESLOPE
|
||||
if (mo->standingslope) // You're still on the ground; why are we here?
|
||||
{
|
||||
mo->momz = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
P_CheckPosition(mo, mo->x, mo->y); // Sets mo->standingslope correctly
|
||||
if (((mo->eflags & MFE_VERTICALFLIP) ? tmceilingslope : tmfloorslope) && (mo->type != MT_STEAM))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue