class ZedSpawnerRepLink extends ReplicationInfo; var public ZedSpawner ZS; var public E_LogLevel LogLevel; var public Array > CustomZeds; var private int Recieved; replication { if (bNetInitial && Role == ROLE_Authority) LogLevel; } public simulated function bool SafeDestroy() { return (bPendingDelete || bDeleteMe || Destroy()); } public reliable client function ClientSync(class CustomZed) { `Log_Trace(`Location); `Log_Debug("Received:" @ CustomZed); CustomZeds.AddItem(CustomZed); ServerSync(); } public reliable client function SyncFinished() { local class CustomZed; `Log_Trace(`Location); foreach CustomZeds(CustomZed) { `Log_Debug("Preload Content for" @ CustomZed); CustomZed.static.PreloadContent(); } SafeDestroy(); } public reliable server function ServerSync() { `Log_Trace(`Location); if (bPendingDelete || bDeleteMe) return; if (CustomZeds.Length == Recieved || WorldInfo.NetMode == NM_StandAlone) { `Log_Debug("Sync finished"); SyncFinished(); if (!ZS.DestroyRepLink(Controller(Owner))) { SafeDestroy(); } } else { `Log_Debug("Sync:" @ CustomZeds[Recieved]); ClientSync(CustomZeds[Recieved++]); } } defaultproperties { bAlwaysRelevant = false; bOnlyRelevantToOwner = true; bSkipActorPropertyReplication = false; Recieved = 0 }