mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Readability changes
This commit is contained in:
parent
306779fac0
commit
bed9dff077
1 changed files with 14 additions and 14 deletions
28
src/p_map.c
28
src/p_map.c
|
@ -976,7 +976,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
&& ((!(tmthing->eflags & MFE_VERTICALFLIP) && abs(thing->z + thing->height - tmthing->z) < (thing->height>>2))
|
||||
|| (tmthing->eflags & MFE_VERTICALFLIP && abs(tmthing->z + tmthing->height - thing->z) < (thing->height>>2))))
|
||||
{
|
||||
thing->flags &= ~MF_PUSHABLE;
|
||||
thing->flags &= ~MF_PUSHABLE; // prevent riding player from applying pushable movement logic
|
||||
P_SetTarget(&thing->target, tmthing);
|
||||
P_ResetPlayer(tmthing->player);
|
||||
P_SetPlayerMobjState(tmthing, S_PLAY_WALK);
|
||||
|
@ -991,10 +991,21 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
if (tmthing->z > thing->z + thing->height || thing->z > tmthing->z + tmthing->height || !thing->health)
|
||||
return true;
|
||||
|
||||
if (thing == tmthing->target)
|
||||
if (thing == tmthing->target) // don't collide with rider
|
||||
return true;
|
||||
|
||||
if (thing->flags & MF_SPRING) // bounce on springs
|
||||
{
|
||||
P_DoSpring(thing, tmthing);
|
||||
return true;
|
||||
}
|
||||
else if (thing->flags & (MF_MONITOR|MF_SHOOTABLE) == (MF_MONITOR|MF_SHOOTABLE) && !(tmthing->flags & MF_PUSHABLE)) // pop monitors while carrying a player
|
||||
{
|
||||
P_KillMobj(thing, tmthing, tmthing->target, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (thing->type == tmthing->type)
|
||||
if (thing->type == tmthing->type) // bounce against other rollout rocks
|
||||
{
|
||||
fixed_t tempmomx = thing->momx, tempmomy = thing->momy;
|
||||
thing->momx = tmthing->momx;
|
||||
|
@ -1002,17 +1013,6 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
tmthing->momx = tempmomx;
|
||||
tmthing->momy = tempmomy;
|
||||
}
|
||||
|
||||
if (thing->flags & MF_SPRING)
|
||||
{
|
||||
P_DoSpring(thing, tmthing);
|
||||
return true;
|
||||
}
|
||||
else if (thing->flags & MF_MONITOR && thing->flags & MF_SHOOTABLE && !(tmthing->flags & MF_PUSHABLE)) // carrying a player
|
||||
{
|
||||
P_KillMobj(thing, tmthing, tmthing->target, 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (thing->type == MT_PTERABYTE && tmthing->player)
|
||||
|
|
Loading…
Reference in a new issue