Use World.(AddTo|RemoveFrom)Maps in Immobile/Building.

This commit is contained in:
Paul Chote
2017-12-03 20:55:23 +00:00
committed by reaperrr
parent 9e18ec7314
commit 373aaee004
2 changed files with 4 additions and 14 deletions

View File

@@ -54,16 +54,12 @@ namespace OpenRA.Mods.Common.Traits
void INotifyAddedToWorld.AddedToWorld(Actor self)
{
self.World.ActorMap.AddInfluence(self, this);
self.World.ActorMap.AddPosition(self, this);
self.World.ScreenMap.Add(self);
self.World.AddToMaps(self, this);
}
void INotifyRemovedFromWorld.RemovedFromWorld(Actor self)
{
self.World.ActorMap.RemoveInfluence(self, this);
self.World.ActorMap.RemovePosition(self, this);
self.World.ScreenMap.Remove(self);
self.World.RemoveFromMaps(self, this);
}
}
}