Add EditorPlayer to all mods

To prevent the editor from loading unnecessary or even incompatible
player traits.
This commit is contained in:
reaperrr
2018-03-30 16:32:49 +02:00
parent 563c8ad302
commit 4c16e51f92
8 changed files with 77 additions and 6 deletions

View File

@@ -137,7 +137,8 @@ namespace OpenRA
DisplayFaction = ChooseDisplayFaction(world, pr.Faction);
}
PlayerActor = world.CreateActor("Player", new TypeDictionary { new OwnerInit(this) });
var playerActorType = world.Type == WorldType.Editor ? "EditorPlayer" : "Player";
PlayerActor = world.CreateActor(playerActorType, new TypeDictionary { new OwnerInit(this) });
Shroud = PlayerActor.Trait<Shroud>();
// Enable the bot logic on the host