You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
UDS: Default value propagation fix.
#codereview Nick.Whiting, Robert.Manuszewski [CL 2228481 by Maciej Mroz in Main branch]
This commit is contained in:
@@ -62,18 +62,21 @@ void UUserDefinedStruct::SerializeTaggedProperties(FArchive& Ar, uint8* Data, US
|
||||
|
||||
auto UDDefaultsStruct = Cast<UUserDefinedStruct>(DefaultsStruct);
|
||||
|
||||
const bool bDuplicate = (0 != (Ar.GetPortFlags() & PPF_Duplicate));
|
||||
|
||||
/* When saving delta, we want the difference between current data and true structure's default values.
|
||||
When Defaults is NULL then zeroed data will be used for comparison.*/
|
||||
const bool bUseNewDefaults = !Defaults
|
||||
&& UDDefaultsStruct
|
||||
&& Ar.DoDelta()
|
||||
&& Ar.IsSaving()
|
||||
&& (0 == (Ar.GetPortFlags() & PPF_Duplicate))
|
||||
&& !bDuplicate
|
||||
&& !Ar.IsCooking();
|
||||
|
||||
/* Object serialized from delta will have missing properties filled with zeroed data,
|
||||
we want structure's default data instead */
|
||||
const bool bLoadDefaultFirst = UDDefaultsStruct
|
||||
&& !bDuplicate
|
||||
&& Ar.IsLoading()
|
||||
&& Ar.IsPersistent();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user