- replaced MIN/MAX in all non-common code.

This commit is contained in:
Christoph Oelckers 2021-10-30 10:16:52 +02:00
commit 1d0aed219e
43 changed files with 147 additions and 146 deletions

View file

@ -90,7 +90,7 @@ void P_TouchSpecialThing (AActor *special, AActor *toucher)
// The pickup is at or above the toucher's feet OR
// The pickup is below the toucher.
if (delta > toucher->Height || delta < MIN(-32., -special->Height))
if (delta > toucher->Height || delta < min(-32., -special->Height))
{ // out of reach
return;
}
@ -1467,7 +1467,7 @@ static int DamageMobj (AActor *target, AActor *inflictor, AActor *source, int da
}
}
const int realdamage = MAX(0, damage);
const int realdamage = max(0, damage);
target->Level->localEventManager->WorldThingDamaged(target, inflictor, source, realdamage, mod, flags, angle);
needevent = false;
@ -1475,7 +1475,7 @@ static int DamageMobj (AActor *target, AActor *inflictor, AActor *source, int da
return realdamage;
}
}
return MAX(0, damage);
return max(0, damage);
}
static int DoDamageMobj(AActor *target, AActor *inflictor, AActor *source, int damage, FName mod, int flags, DAngle angle)
@ -1492,7 +1492,7 @@ static int DoDamageMobj(AActor *target, AActor *inflictor, AActor *source, int d
target->Level->localEventManager->WorldThingDamaged(target, inflictor, source, realdamage, mod, flags, angle);
}
return MAX(0, realdamage);
return max(0, realdamage);
}
DEFINE_ACTION_FUNCTION(AActor, DamageMobj)