Isolate gameplay map state from the map cache. Fixes #4937.
This commit is contained in:
@@ -103,10 +103,12 @@ namespace OpenRA
|
||||
{
|
||||
LoadScreen.Display();
|
||||
|
||||
var map = MapCache[uid].Map;
|
||||
if (map == null)
|
||||
if (MapCache[uid].Status != MapStatus.Available)
|
||||
throw new InvalidDataException("Invalid map uid: {0}".F(uid));
|
||||
|
||||
// Operate on a copy of the map to avoid gameplay state leaking into the cache
|
||||
var map = new Map(MapCache[uid].Map.Path);
|
||||
|
||||
LoadTranslations(map);
|
||||
|
||||
// Reinit all our assets
|
||||
|
||||
Reference in New Issue
Block a user