Expose OF_Transient to actors as bNoSaveGame
This commit is contained in:
parent
b0d6d82dfd
commit
847f80391b
3 changed files with 8 additions and 0 deletions
|
|
@ -601,6 +601,8 @@ void FSerializer::WriteObjects()
|
|||
{
|
||||
auto obj = w->mDObjects[i];
|
||||
|
||||
if(obj->ObjectFlags & OF_Transient) continue;
|
||||
|
||||
BeginObject(nullptr);
|
||||
w->Key("classtype");
|
||||
w->String(obj->GetClass()->TypeName.GetChars());
|
||||
|
|
|
|||
|
|
@ -440,6 +440,10 @@ DObject *PClass::CreateNew()
|
|||
I_Error("Attempt to instantiate abstract class %s.", TypeName.GetChars());
|
||||
}
|
||||
ConstructNative (mem);
|
||||
|
||||
if (Defaults != nullptr)
|
||||
((DObject *)mem)->ObjectFlags |= ((DObject *)Defaults)->ObjectFlags & OF_Transient;
|
||||
|
||||
((DObject *)mem)->SetClass (const_cast<PClass *>(this));
|
||||
InitializeSpecials(mem, Defaults, &PClass::SpecialInits);
|
||||
return (DObject *)mem;
|
||||
|
|
|
|||
|
|
@ -392,6 +392,8 @@ static FFlagDef ActorFlagDefs[]=
|
|||
DEFINE_FLAG2(BOUNCE_NotOnShootables, DONTBOUNCEONSHOOTABLES, AActor, BounceFlags),
|
||||
DEFINE_FLAG2(BOUNCE_BounceOnUnrips, BOUNCEONUNRIPPABLES, AActor, BounceFlags),
|
||||
DEFINE_FLAG2(BOUNCE_NotOnSky, DONTBOUNCEONSKY, AActor, BounceFlags),
|
||||
|
||||
DEFINE_FLAG2(OF_Transient, NOSAVEGAME, AActor, ObjectFlags),
|
||||
};
|
||||
|
||||
// These won't be accessible through bitfield variables
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue