mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
Readability changes
This commit is contained in:
parent
7850d43725
commit
306779fac0
1 changed files with 26 additions and 31 deletions
25
src/p_map.c
25
src/p_map.c
|
@ -963,9 +963,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
P_DamageMobj(thing, tmthing, tmthing, 1, 0);
|
||||
}
|
||||
|
||||
if (thing->type == MT_ROLLOUTROCK)
|
||||
{
|
||||
if (tmthing->player)
|
||||
if (thing->type == MT_ROLLOUTROCK && tmthing->player)
|
||||
{
|
||||
if (tmthing->player->powers[pw_carry] == CR_ROLLOUT)
|
||||
{
|
||||
|
@ -988,18 +986,6 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
return true;
|
||||
}
|
||||
}
|
||||
else if (tmthing->type == thing->type)
|
||||
{
|
||||
if (tmthing->z > thing->z + thing->height || thing->z > tmthing->z + tmthing->height)
|
||||
return true;
|
||||
|
||||
fixed_t tempmomx = thing->momx, tempmomy = thing->momy;
|
||||
thing->momx = tmthing->momx;
|
||||
thing->momy = tmthing->momy;
|
||||
tmthing->momx = tempmomx;
|
||||
tmthing->momy = tempmomy;
|
||||
}
|
||||
}
|
||||
else if (tmthing->type == MT_ROLLOUTROCK)
|
||||
{
|
||||
if (tmthing->z > thing->z + thing->height || thing->z > tmthing->z + tmthing->height || !thing->health)
|
||||
|
@ -1008,6 +994,15 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
if (thing == tmthing->target)
|
||||
return true;
|
||||
|
||||
if (thing->type == tmthing->type)
|
||||
{
|
||||
fixed_t tempmomx = thing->momx, tempmomy = thing->momy;
|
||||
thing->momx = tmthing->momx;
|
||||
thing->momy = tmthing->momy;
|
||||
tmthing->momx = tempmomx;
|
||||
tmthing->momy = tempmomy;
|
||||
}
|
||||
|
||||
if (thing->flags & MF_SPRING)
|
||||
{
|
||||
P_DoSpring(thing, tmthing);
|
||||
|
|
Loading…
Reference in a new issue