mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Alter MF_NOCLIP behavior
- Things with MF_NOCLIP can still run code when touching things, but won't be blocked by them. - Things need both (MF_NOCLIP|MF_NOCLIPTHING) to do a single movement step, since MF_NOCLIP can do thing collision now.
This commit is contained in:
parent
3d33b95094
commit
65e6e54e7d
1 changed files with 13 additions and 4 deletions
17
src/p_map.c
17
src/p_map.c
|
|
@ -2131,9 +2131,6 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y, TryMoveResult_t *re
|
||||||
// reset special lines
|
// reset special lines
|
||||||
numspechit = 0U;
|
numspechit = 0U;
|
||||||
|
|
||||||
if (tm.flags & MF_NOCLIP)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
// Check things first, possibly picking things up.
|
// Check things first, possibly picking things up.
|
||||||
|
|
||||||
// MF_NOCLIPTHING: used by camera to not be blocked by things
|
// MF_NOCLIPTHING: used by camera to not be blocked by things
|
||||||
|
|
@ -2160,6 +2157,15 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y, TryMoveResult_t *re
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tm.flags & MF_NOCLIP)
|
||||||
|
{
|
||||||
|
// Sal 12/19/2022 -- PIT_CheckThing code will still run
|
||||||
|
// with MF_NOCLIP enabled, but they won't be blocked
|
||||||
|
// regardless of the result. This allows for SPBs and
|
||||||
|
// the UFO to collide.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
validcount++;
|
validcount++;
|
||||||
|
|
||||||
// check lines
|
// check lines
|
||||||
|
|
@ -2628,7 +2634,10 @@ increment_move
|
||||||
radius = min(radius, 16*mapobjectscale);
|
radius = min(radius, 16*mapobjectscale);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (thing->flags & MF_NOCLIP)
|
// Sal 12/19/2022 -- PIT_CheckThing code now runs
|
||||||
|
// with MF_NOCLIP enabled, so we want step-by-step
|
||||||
|
// for anything that doesn't have both enabled.
|
||||||
|
if ((thing->flags & (MF_NOCLIP|MF_NOCLIPTHING)) == (MF_NOCLIP|MF_NOCLIPTHING))
|
||||||
{
|
{
|
||||||
tryx = x;
|
tryx = x;
|
||||||
tryy = y;
|
tryy = y;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue