Don't desync while the world is disposing

This commit is contained in:
abcdefg30
2021-09-04 11:21:03 +02:00
committed by teinarss
parent 1dc0a603c7
commit 69248132ad

View File

@@ -194,7 +194,10 @@ namespace OpenRA
finally
{
inUnsyncedCode = false;
if (sync != world.SyncHash())
// When the world is disposing all actors and effects have been removed
// So do not check the hash for a disposing world since it definitively has changed
if (!world.Disposing && sync != world.SyncHash())
throw new InvalidOperationException("RunUnsynced: sync-changing code may not run here");
}
}