spells are allowed to have 0 hp

https://bugs.eressea.de/view.php?id=2150
This commit is contained in:
Enno Rehling 2015-11-09 16:39:30 +01:00
parent b43a89e4ec
commit 4790950daf
1 changed files with 1 additions and 1 deletions

View File

@ -812,7 +812,7 @@ void write_unit(struct gamedata *data, const unit * u)
WRITE_SECTION(data->store); WRITE_SECTION(data->store);
write_items(data->store, u->items); write_items(data->store, u->items);
WRITE_SECTION(data->store); WRITE_SECTION(data->store);
if (u->hp == 0) { if (u->hp == 0 && u_race(u)!= get_race(RC_SPELL)) {
log_error("unit %s has 0 hitpoints, adjusting.\n", itoa36(u->no)); log_error("unit %s has 0 hitpoints, adjusting.\n", itoa36(u->no));
((unit *)u)->hp = u->number; ((unit *)u)->hp = u->number;
} }