Prevent mod code from changing Actor.Owner directly.

This commit is contained in:
Paul Chote
2016-10-23 12:21:03 +01:00
parent 8d688ab5f3
commit 635fc9e1e2
4 changed files with 8 additions and 3 deletions

View File

@@ -53,7 +53,7 @@ namespace OpenRA.Mods.Common.Traits
Players = new MapPlayers(w.Map.PlayerDefinitions);
var worldOwner = Players.Players.Select(kvp => kvp.Value).First(p => !p.Playable && p.OwnsWorld);
w.WorldActor.Owner = new Player(w, null, worldOwner);
w.SetWorldOwner(new Player(w, null, worldOwner));
}
public void WorldLoaded(World world, WorldRenderer wr)