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