Merge branch 'master' into scripting
Conflicts: src/actor.h src/thingdef/thingdef_codeptr.cpp
This commit is contained in:
commit
3e4678765b
40 changed files with 342 additions and 159 deletions
|
|
@ -194,6 +194,33 @@ INTBOOL CheckActorFlag(const AActor *owner, FFlagDef *fd)
|
|||
#endif
|
||||
}
|
||||
|
||||
INTBOOL CheckActorFlag(const AActor *owner, const char *flagname, bool printerror)
|
||||
{
|
||||
const char *dot = strchr (flagname, '.');
|
||||
FFlagDef *fd;
|
||||
const PClass *cls = owner->GetClass();
|
||||
|
||||
if (dot != NULL)
|
||||
{
|
||||
FString part1(flagname, dot-flagname);
|
||||
fd = FindFlag (cls, part1, dot+1);
|
||||
}
|
||||
else
|
||||
{
|
||||
fd = FindFlag (cls, flagname, NULL);
|
||||
}
|
||||
|
||||
if (fd != NULL)
|
||||
{
|
||||
return CheckActorFlag(owner, fd);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (printerror) Printf("Unknown flag '%s' in '%s'\n", flagname, cls->TypeName.GetChars());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// HandleDeprecatedFlags
|
||||
|
|
@ -1323,7 +1350,8 @@ DEFINE_PROPERTY(clearflags, 0, Actor)
|
|||
defaults->flags3 =
|
||||
defaults->flags4 =
|
||||
defaults->flags5 =
|
||||
defaults->flags6 = 0;
|
||||
defaults->flags6 =
|
||||
defaults->flags7 = 0;
|
||||
defaults->flags2 &= MF2_ARGSDEFINED; // this flag must not be cleared
|
||||
}
|
||||
|
||||
|
|
@ -2157,9 +2185,8 @@ DEFINE_CLASS_PROPERTY_PREFIX(powerup, strength, F, Inventory)
|
|||
I_Error("\"powerup.strength\" requires an actor of type \"Powerup\"\n");
|
||||
return;
|
||||
}
|
||||
// Puts a percent value in the 0.0..1.0 range
|
||||
PROP_FIXED_PARM(f, 0);
|
||||
*pStrength = f / 100;
|
||||
*pStrength = f;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue