#155 captured buildings confusing queries

This commit is contained in:
Chris Forbes
2010-04-16 20:54:33 +12:00
parent a4e2407d8e
commit 0664a34465

View File

@@ -44,7 +44,13 @@ namespace OpenRA.Mods.RA.Activities
{ {
if (target.Health - EngineerCapture.EngineerDamage <= 0) if (target.Health - EngineerCapture.EngineerDamage <= 0)
{ {
target.Owner = self.Owner; target.World.AddFrameEndTask(w =>
{ // momentarily remove from world so the ownership queries don't get confused
w.Remove(target);
target.Owner = self.Owner;
w.Add(target);
});
target.InflictDamage(self, target.Health - EngineerCapture.EngineerDamage, null); target.InflictDamage(self, target.Health - EngineerCapture.EngineerDamage, null);
} }
else else