- move the action default propeerties into FActorInfo

This commit is contained in:
Christoph Oelckers 2023-04-30 08:07:10 +02:00
parent 9d43729e8c
commit 960e58cdf2
4 changed files with 7 additions and 8 deletions

View file

@ -32,6 +32,10 @@ struct FActorInfo
int NumMoves = 0;
int FirstAI = -1;
int NumAIs = 0;
FName DefaultAction = NAME_Null; // 'none' is valíd content here so use 'null' as 'not set'.
FName DefaultMove = NAME_Null;
int DefaultMoveflags = 0;
int DefaultFlags = 0;
int DefaultCstat = 0;
FName DamageType = NAME_None; // damage type this item inflicts

View file

@ -100,9 +100,6 @@ struct Baggage
PClassActor *Info;
int Lumpnum;
VersionInfo Version;
FName DefaultAction;
FName DefaultMove;
int moveflags;
FScriptPosition ScriptPosition;
};

View file

@ -674,8 +674,6 @@ void ZCCRazeCompiler::InitDefaults()
bag.Namespace = OutNamespace;
bag.Info = ti;
bag.Lumpnum = c->cls->SourceLump;
bag.DefaultAction = NAME_Null; // 'none' is valíd content here so use 'null' as 'not set'.
bag.DefaultMove = NAME_Null;
// The actual script position needs to be set per property.
for (auto d : c->Defaults)

View file

@ -836,19 +836,19 @@ DEFINE_PROPERTY(ai, SSSi, DukeActor)
DEFINE_PROPERTY(startaction, S, DukeActor)
{
PROP_STRING_PARM(n, 0);
bag.DefaultAction = n;
info->ActorInfo()->DefaultAction = n;
}
DEFINE_PROPERTY(startmove, S, DukeActor)
{
PROP_STRING_PARM(n, 0);
bag.DefaultMove = n;
info->ActorInfo()->DefaultMove = n;
}
DEFINE_PROPERTY(moveflags, I, DukeActor)
{
PROP_INT_PARM(n, 0);
bag.moveflags = n;
info->ActorInfo()->DefaultMoveflags = n;
}
CCMD(changewalltexture)