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

@@ -38,7 +38,7 @@ namespace OpenRA
public readonly uint ActorID;
public Player Owner { get; set; }
public Player Owner { get; internal set; }
public bool IsInWorld { get; internal set; }
public bool Disposed { get; private set; }

View File

@@ -240,6 +240,11 @@ namespace OpenRA
rc.Metadata = new ReplayMetadata(gameInfo);
}
public void SetWorldOwner(Player p)
{
WorldActor.Owner = p;
}
public Actor CreateActor(string name, TypeDictionary initDict)
{
return CreateActor(true, name, initDict);