division by zero wegen post-kampfzaubern, die die unit->number veraendern.

This commit is contained in:
Enno Rehling 2006-10-15 12:05:07 +00:00
parent cd35467899
commit 6eaca764fe
2 changed files with 2 additions and 2 deletions

View File

@ -2929,7 +2929,7 @@ make_fighter(battle * b, unit * u, side * s1, boolean attack)
} }
/* Illusionen und Zauber kaempfen nicht */ /* Illusionen und Zauber kaempfen nicht */
if (fval(u->race, RCF_ILLUSIONARY) || idle(u->faction)) if (fval(u->race, RCF_ILLUSIONARY) || idle(u->faction) || u->number==0)
return NULL; return NULL;
if (s1==NULL) { if (s1==NULL) {

View File

@ -1561,7 +1561,7 @@ heal_fighters(cvector *fgs, int * power, boolean heal_monsters)
if (healhp<=0) break; if (healhp<=0) break;
/* Untote kann man nicht heilen */ /* Untote kann man nicht heilen */
if (fval(df->unit->race, RCF_NOHEAL)) continue; if (df->unit->number==0 || fval(df->unit->race, RCF_NOHEAL)) continue;
/* wir heilen erstmal keine Monster */ /* wir heilen erstmal keine Monster */
if (heal_monsters || playerrace(df->unit->race)) { if (heal_monsters || playerrace(df->unit->race)) {