- Added 3 new properties and 3 functions to control them.

- Rippers will rip through anything with an equivalent ripper level, or if their level is between or on the min and max ranges.
- If no min or max is defined, it simply checks if the monster's ripper level is lower than the missiles.
- Functions: A_SetRipperLevel(int level), A_SetRipMin(int min), A_SetRipMax(int max)
- Properties: RipperLevel, RipLevelMin, and RipLevelMax.
- RipperLevel: Applicable to monsters and projectiles.
- RipLevelMin and RipLevelMax are only useful on monsters.
- By default, all are 0.
This commit is contained in:
MajorCooke 2014-12-30 19:59:31 -06:00
commit 4ddfd0f46a
7 changed files with 97 additions and 2 deletions

View file

@ -1207,7 +1207,17 @@ bool PIT_CheckThing(AActor *thing, FCheckPosition &tm)
{
return true;
}
if (tm.DoRipping && !(thing->flags5 & MF5_DONTRIP))
// Rippers will rip through anything with an equivalent ripper level,
// or if the missile's ripper level is within the min/max range,
// or if there's no min/max range and the missile's ripper level is
// >= the monster's, then let 'er rip!
bool ripmin = (thing->RipLevelMin != 0) ? true : false;
bool ripmax = (thing->RipLevelMax != 0) ? true : false;
if ((tm.DoRipping && !(thing->flags5 & MF5_DONTRIP)) &&
((!(ripmin) && !(ripmax) && (thing->RipperLevel <= tm.thing->RipperLevel)) ||
((thing->RipperLevel == tm.thing->RipperLevel) ||
(thing->RipLevelMin <= tm.thing->RipperLevel) &&
(thing->RipLevelMax >= tm.thing->RipperLevel))))
{
if (!(tm.thing->flags6 & MF6_NOBOSSRIP) || !(thing->flags2 & MF2_BOSS))
{