Fix LeavesTrails add effect at where actor removed
This commit is contained in:
@@ -64,7 +64,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
|||||||
public override object Create(ActorInitializer init) { return new LeavesTrails(this); }
|
public override object Create(ActorInitializer init) { return new LeavesTrails(this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class LeavesTrails : ConditionalTrait<LeavesTrailsInfo>, ITick
|
public class LeavesTrails : ConditionalTrait<LeavesTrailsInfo>, ITick, INotifyAddedToWorld
|
||||||
{
|
{
|
||||||
BodyOrientation body;
|
BodyOrientation body;
|
||||||
IFacing facing;
|
IFacing facing;
|
||||||
@@ -156,5 +156,10 @@ namespace OpenRA.Mods.Common.Traits.Render
|
|||||||
{
|
{
|
||||||
cachedPosition = self.CenterPosition;
|
cachedPosition = self.CenterPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void INotifyAddedToWorld.AddedToWorld(Actor self)
|
||||||
|
{
|
||||||
|
cachedPosition = self.CenterPosition;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user