mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-20 08:31:11 +00:00
Expose OF_Transient to actors as bNoSaveGame
This commit is contained in:
parent
9f24d8babc
commit
e61ab4cbe2
3 changed files with 8 additions and 0 deletions
|
@ -604,6 +604,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;
|
||||
|
|
|
@ -396,6 +396,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…
Reference in a new issue