Hello! We’re using the DemoNetDriver to do serverside recordings of gameplay. One thing we’ve noticed, given our extensive use of GAS for gameplay systems, is that sometimes Gameplay Tags and Gameplay Effects from a previous point in time would persists when scrubbing forward in time. From what I can see, it doesn’t appear FastArrays have much logic at all to properly handle a Checkpoint load, but I do see mentions of replays here and there so I would assume it’s at least supported to some extent?
In any case, the fix we have locally is to write/read a bit in Read/WriteDeltaHeader (in FastArraySerializer.h) as to whether or not it’s serializing data for a checkpoint. Then in FFastArraySerializer::TFastArraySerializeHelper<Type, SerializerType>::PostReceiveCleanup we have this little snippet below the first “if (!Parms.bInternalAck)” if statement. Essentially, it assumes that every indice that isn’t new/changed should be deleted (and since net serialize during a checkpoint will delta check against the initial “empty” state, we never get any deletes in the header).
Does this seem like a reasonable fix to you, and to what extent is GAS expected to work with replays in general?
else if (Parms.bIsReplayCheckpoint)
{
for (int i = 0; i < Items.Num(); i++)
{
// If the item's most recent array replication key is not the same as the header's array replication key
// then it was not part of the change elements, so it is an implicit delete
if (Items[i].MostRecentArrayReplicationKey != Header.ArrayReplicationKey)
{
UE_LOG(LogNetFastTArray, Log, TEXT("Adding replay checkpoint implicit delete for ElementID: %i"), i);
Header.DeletedIndices.Add(i);
}
}
}