allow negative hitpoints to be unstored

the check has been moved and that seems to work
so this is no longer required and it gave trouble for UMC creators
This commit is contained in:
Mark de Wever 2007-04-18 15:33:16 +00:00
parent 74a1402cc8
commit 0810205a4d
2 changed files with 1 additions and 7 deletions

View File

@ -425,8 +425,6 @@ Version 1.3.1:
* max level advancements now raise the advance and post_advance events
* [effect] can now remove attacks with the remove_attacks key
* [unstore_unit] can now try to level a unit and does so by default (bug #7426)
* [unstore_unit] can no longer unstore a unit with a negative amount of
hitpoints. The hitpoints will be set to 1.
* sound
* new or revised sounds: morning star, holy magic.
* add advanced sound tab to pref allowing you to play with sample_rate and

View File

@ -1883,11 +1883,7 @@ bool event_handler::handle_event_command(const queued_event& event_info,
wassert(units != NULL);
wassert(game_map != NULL);
wassert(status_ptr != NULL);
unit u(game_data_ptr,units,game_map,status_ptr,teams,var);
if(u.hitpoints() < 0) {
u.heal(-u.hitpoints());
ERR_NG << "Unstoring a unit with a negative number of hitpoints isn't supported.\n";
}
const unit u(game_data_ptr,units,game_map,status_ptr,teams,var);
preferences::encountered_units().insert(u.id());
gamemap::location loc(var);