[-] Fix bug in KillUnitAt (from Ant's Wyrmgus).

This commit is contained in:
Kyran Jackson 2015-05-19 14:51:04 +10:00
parent 0c4ef0c400
commit a44030db6f

View file

@ -923,7 +923,7 @@ static int CclKillUnitAt(lua_State *l)
|| (unittype == ALL_FOODUNITS && !unit.Type->Building)
|| (unittype == ALL_BUILDINGS && unit.Type->Building)
|| unittype == unit.Type) {
if (plynr == -1 || plynr == unit.Player->Index) {
if ((plynr == -1 || plynr == unit.Player->Index) && unit.IsAlive()) {
LetUnitDie(unit);
++s;
}