Remove workarounds for querying the PlayerActor in Created
This commit is contained in:
@@ -78,11 +78,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
protected override void Created(Actor self)
|
||||
{
|
||||
// Special case handling is required for the Player actor.
|
||||
// Created is called before Player.PlayerActor is assigned,
|
||||
// so we must query player traits from self, which refers
|
||||
// for bot modules always to the Player actor.
|
||||
requestUnitProduction = self.TraitsImplementing<IBotRequestUnitProduction>().ToArray();
|
||||
requestUnitProduction = self.Owner.PlayerActor.TraitsImplementing<IBotRequestUnitProduction>().ToArray();
|
||||
}
|
||||
|
||||
protected override void TraitEnabled(Actor self)
|
||||
|
||||
Reference in New Issue
Block a user