Fix bug: Debug|Kill [have_unit] error

Set the killed units hit points to zero so [have_unit] does not find it.
This commit is contained in:
Gregory A Lundberg 2016-09-19 19:13:07 -05:00
parent 83bd6cdfbf
commit c66325856b

View file

@ -518,6 +518,7 @@ SYNCED_COMMAND_HANDLER_FUNCTION(debug_kill, child, use_undo, /*show*/, /*error_h
unit_display::unit_die(loc, *i);
}
resources::screen->redraw_minimap();
i->set_hitpoints(0);
resources::controller->pump().fire("die", loc, loc);
if (i.valid()) {
resources::units->erase(i);