Merge pull request #4076 from Mailaender/rank-crash

Additional checks to avoid ranks on destroyed actors
This commit is contained in:
Paul Chote
2013-11-04 00:34:25 -08:00

View File

@@ -78,7 +78,7 @@ namespace OpenRA.Mods.RA
Sound.PlayNotification(self.Owner, "Sounds", "LevelUp", self.Owner.Country.Race);
self.World.AddFrameEndTask(w => w.Add(new CrateEffect(self, "levelup")));
if (Level == 1)
if (Level == 1 && !self.Destroyed)
self.World.AddFrameEndTask(w => w.Add(new Rank(self)));
}
}