diff --git a/source/core/actorinfo.cpp b/source/core/actorinfo.cpp index 0cacb321b..9416ff662 100644 --- a/source/core/actorinfo.cpp +++ b/source/core/actorinfo.cpp @@ -77,7 +77,14 @@ public: void InitializeValue(void *addr, const void *def) const override { - new(addr) FActorInfo; + if (def == nullptr) + { + new(addr) FActorInfo; + } + else + { + new(addr) FActorInfo(*(const FActorInfo*)def); + } } void DestroyValue(void *addr) const override diff --git a/source/core/actorinfo.h b/source/core/actorinfo.h index db19e1f31..3c1cc67d5 100644 --- a/source/core/actorinfo.h +++ b/source/core/actorinfo.h @@ -50,7 +50,17 @@ struct FActorInfo TArray SpriteSetNames; FActorInfo() = default; - FActorInfo(const FActorInfo & other) = delete; + FActorInfo(const FActorInfo& other) + { + // only copy the fields that get inherited + TypeNum = other.TypeNum; + DefaultFlags = other.DefaultFlags; + DefaultCstat = other.DefaultCstat; + defsprite = other.defsprite; + PicName = other.PicName; + SpriteSetNames = other.SpriteSetNames; + } + void ResolveTextures(const char* clsname); };