- replaced MIN/MAX in all non-common code.
This commit is contained in:
parent
226666ce7f
commit
1d0aed219e
43 changed files with 147 additions and 146 deletions
|
|
@ -2357,7 +2357,7 @@ bool P_TryMove(AActor *thing, const DVector2 &pos,
|
|||
// This is so that it does not walk off of things onto a drop off.
|
||||
if (thing->flags2 & MF2_ONMOBJ)
|
||||
{
|
||||
floorz = MAX(thing->Z(), tm.floorz);
|
||||
floorz = max(thing->Z(), tm.floorz);
|
||||
}
|
||||
|
||||
if (floorz - tm.dropoffz > thing->MaxDropOffHeight &&
|
||||
|
|
@ -4035,8 +4035,8 @@ struct aim_t
|
|||
floorportalstate = false;
|
||||
}
|
||||
}
|
||||
if (ceilingportalstate) EnterSectorPortal(sector_t::ceiling, 0, lastsector, toppitch, MIN<DAngle>(0., bottompitch));
|
||||
if (floorportalstate) EnterSectorPortal(sector_t::floor, 0, lastsector, MAX<DAngle>(0., toppitch), bottompitch);
|
||||
if (ceilingportalstate) EnterSectorPortal(sector_t::ceiling, 0, lastsector, toppitch, min<DAngle>(0., bottompitch));
|
||||
if (floorportalstate) EnterSectorPortal(sector_t::floor, 0, lastsector, max<DAngle>(0., toppitch), bottompitch);
|
||||
|
||||
FPathTraverse it(lastsector->Level, startpos.X, startpos.Y, aimtrace.X, aimtrace.Y, PT_ADDLINES | PT_ADDTHINGS | PT_COMPATIBLE | PT_DELTA, startfrac);
|
||||
intercept_t *in;
|
||||
|
|
@ -4114,11 +4114,11 @@ struct aim_t
|
|||
// check portal in backsector when aiming up/downward is possible, the line doesn't have portals on both sides and there's actually a portal in the backsector
|
||||
if ((planestocheck & aim_up) && toppitch < 0 && open.top != LINEOPEN_MAX && !entersec->PortalBlocksMovement(sector_t::ceiling))
|
||||
{
|
||||
EnterSectorPortal(sector_t::ceiling, in->frac, entersec, toppitch, MIN<DAngle>(0., bottompitch));
|
||||
EnterSectorPortal(sector_t::ceiling, in->frac, entersec, toppitch, min<DAngle>(0., bottompitch));
|
||||
}
|
||||
if ((planestocheck & aim_down) && bottompitch > 0 && open.bottom != LINEOPEN_MIN && !entersec->PortalBlocksMovement(sector_t::floor))
|
||||
{
|
||||
EnterSectorPortal(sector_t::floor, in->frac, entersec, MAX<DAngle>(0., toppitch), bottompitch);
|
||||
EnterSectorPortal(sector_t::floor, in->frac, entersec, max<DAngle>(0., toppitch), bottompitch);
|
||||
}
|
||||
continue; // shot continues
|
||||
}
|
||||
|
|
@ -6663,7 +6663,7 @@ void PIT_CeilingRaise(AActor *thing, FChangePosition *cpos)
|
|||
AActor *onmobj;
|
||||
if (!P_TestMobjZ(thing, true, &onmobj) && onmobj->Z() <= thing->Z())
|
||||
{
|
||||
thing->SetZ(MIN(thing->ceilingz - thing->Height, onmobj->Top()));
|
||||
thing->SetZ(min(thing->ceilingz - thing->Height, onmobj->Top()));
|
||||
thing->UpdateRenderSectorList();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue