mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Readability changes
This commit is contained in:
parent
7c50193dcb
commit
4b96eeb578
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…
Add table
Reference in a new issue