- cleaned up the RipLevel logic a bit to be less confusing.

This commit is contained in:
Christoph Oelckers 2014-12-31 10:13:15 +01:00
commit c57cc91d7c
2 changed files with 28 additions and 11 deletions

View file

@ -1442,6 +1442,10 @@ DEFINE_PROPERTY(telefogdesttype, S, Actor)
DEFINE_PROPERTY(ripperlevel, I, Actor)
{
PROP_INT_PARM(id, 0);
if (id < 0)
{
I_Error ("RipperLevel must not be negative");
}
defaults->RipperLevel = id;
}
@ -1451,6 +1455,10 @@ DEFINE_PROPERTY(ripperlevel, I, Actor)
DEFINE_PROPERTY(riplevelmin, I, Actor)
{
PROP_INT_PARM(id, 0);
if (id < 0)
{
I_Error ("RipLevelMin must not be negative");
}
defaults->RipLevelMin = id;
}
@ -1460,6 +1468,10 @@ DEFINE_PROPERTY(riplevelmin, I, Actor)
DEFINE_PROPERTY(riplevelmax, I, Actor)
{
PROP_INT_PARM(id, 0);
if (id < 0)
{
I_Error ("RipLevelMax must not be negative");
}
defaults->RipLevelMax = id;
}