additional checks to avoid giving dead actors a rank sign

closes #4134
This commit is contained in:
Matthias Mailänder
2013-11-17 15:20:13 +01:00
parent 5d3987dee3
commit 8a13cd6c6a
4 changed files with 16 additions and 13 deletions

View File

@@ -76,8 +76,12 @@ 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 && !self.Destroyed)
self.World.AddFrameEndTask(w => w.Add(new Rank(self)));
if (Level == 1)
self.World.AddFrameEndTask(w =>
{
if (!self.IsDead())
w.Add(new Rank(self));
});
}
}