Add EditorPlayer to all mods
To prevent the editor from loading unnecessary or even incompatible player traits.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user