mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-31 21:20:39 +00:00
- fix construction of FActorInfo.
For some reason this lost the copy constructing part from GZDoom resulting in bad data.
This commit is contained in:
parent
5fea500f92
commit
5aac77784a
2 changed files with 19 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -50,7 +50,17 @@ struct FActorInfo
|
|||
TArray<FString> 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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue