- 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

@ -5613,3 +5613,45 @@ DEFINE_ACTION_FUNCTION(AActor, A_SwapTeleFog)
self->TeleFogDestType = temp;
}
}
//===========================================================================
//
// A_SetRipperLevel(int level)
//
// Sets the ripper level/requirement of the calling actor.
// Also sets the minimum and maximum levels to rip through.
//===========================================================================
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetRipperLevel)
{
ACTION_PARAM_START(1);
ACTION_PARAM_INT(level, 0);
self->RipperLevel = level;
}
//===========================================================================
//
// A_SetRipMin(int min)
//
// Sets the ripper level/requirement of the calling actor.
// Also sets the minimum and maximum levels to rip through.
//===========================================================================
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetRipMin)
{
ACTION_PARAM_START(1);
ACTION_PARAM_INT(min, 1);
self->RipLevelMin = min;
}
//===========================================================================
//
// A_SetRipMin(int min)
//
// Sets the ripper level/requirement of the calling actor.
// Also sets the minimum and maximum levels to rip through.
//===========================================================================
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetRipMax)
{
ACTION_PARAM_START(1);
ACTION_PARAM_INT(max, 1);
self->RipLevelMax = max;
}