mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
-Fix player being able to push up spikes
-Minor tweaks to make paper collision slightly more reliable
This commit is contained in:
parent
64cda33d6d
commit
f54eeb82b7
1 changed files with 6 additions and 6 deletions
12
src/p_map.c
12
src/p_map.c
|
@ -1719,8 +1719,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((tmthing->flags & MF_SPRING || tmthing->type == MT_STEAM) && (thing->player))
|
if ((tmthing->flags & MF_SPRING || tmthing->type == MT_STEAM || tmthing->type == MT_SPIKE || tmthing->type == MT_WALLSPIKE) && (thing->player))
|
||||||
; // springs and gas jets should never be able to step up onto a player
|
; // springs, gas jets and springs should never be able to step up onto a player
|
||||||
// z checking at last
|
// z checking at last
|
||||||
// Treat noclip things as non-solid!
|
// Treat noclip things as non-solid!
|
||||||
else if ((thing->flags & (MF_SOLID|MF_NOCLIP)) == MF_SOLID
|
else if ((thing->flags & (MF_SOLID|MF_NOCLIP)) == MF_SOLID
|
||||||
|
@ -3759,25 +3759,25 @@ void P_SlideMove(mobj_t *mo)
|
||||||
v2.y = tmhitthing->y + sinradius;
|
v2.y = tmhitthing->y + sinradius;
|
||||||
|
|
||||||
// Can we box collision our way into smooth movement..?
|
// Can we box collision our way into smooth movement..?
|
||||||
if (mo->y + mo->radius <= min(v1.y, v2.y))
|
if (sinradius && mo->y + mo->radius <= min(v1.y, v2.y))
|
||||||
{
|
{
|
||||||
mo->momy = 0;
|
mo->momy = 0;
|
||||||
P_TryMove(mo, mo->x + mo->momx, min(v1.y, v2.y) - mo->radius, true);
|
P_TryMove(mo, mo->x + mo->momx, min(v1.y, v2.y) - mo->radius, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (mo->y - mo->radius >= max(v1.y, v2.y))
|
else if (sinradius && mo->y - mo->radius >= max(v1.y, v2.y))
|
||||||
{
|
{
|
||||||
mo->momy = 0;
|
mo->momy = 0;
|
||||||
P_TryMove(mo, mo->x + mo->momx, max(v1.y, v2.y) + mo->radius, true);
|
P_TryMove(mo, mo->x + mo->momx, max(v1.y, v2.y) + mo->radius, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (mo->x + mo->radius <= min(v1.x, v2.x))
|
else if (cosradius && mo->x + mo->radius <= min(v1.x, v2.x))
|
||||||
{
|
{
|
||||||
mo->momx = 0;
|
mo->momx = 0;
|
||||||
P_TryMove(mo, min(v1.x, v2.x) - mo->radius, mo->y + mo->momy, true);
|
P_TryMove(mo, min(v1.x, v2.x) - mo->radius, mo->y + mo->momy, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (mo->x - mo->radius >= max(v1.x, v2.x))
|
else if (cosradius && mo->x - mo->radius >= max(v1.x, v2.x))
|
||||||
{
|
{
|
||||||
mo->momx = 0;
|
mo->momx = 0;
|
||||||
P_TryMove(mo, max(v1.x, v2.x) + mo->radius, mo->y + mo->momy, true);
|
P_TryMove(mo, max(v1.x, v2.x) + mo->radius, mo->y + mo->momy, true);
|
||||||
|
|
Loading…
Reference in a new issue