Fix #4350 - Spy not disappearing
Spy now calls .Destroy() and is removed from minnimap upon infiltration
This commit is contained in:
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.RA.Activities
|
|||||||
foreach (var t in target.Actor.TraitsImplementing<IAcceptInfiltrator>())
|
foreach (var t in target.Actor.TraitsImplementing<IAcceptInfiltrator>())
|
||||||
t.OnInfiltrate(target.Actor, self);
|
t.OnInfiltrate(target.Actor, self);
|
||||||
|
|
||||||
self.World.AddFrameEndTask(w => { if (!self.Destroyed) w.Remove(self); });
|
self.Destroy();
|
||||||
|
|
||||||
if (target.Actor.HasTrait<Building>())
|
if (target.Actor.HasTrait<Building>())
|
||||||
Sound.PlayToPlayer(self.Owner, "bldginf1.aud");
|
Sound.PlayToPlayer(self.Owner, "bldginf1.aud");
|
||||||
|
|||||||
Reference in New Issue
Block a user