wb: prevent unit id conflics

the wb recruit actions store temp units with fake ids and live longer
than a turn, so resetting the underlying id counter between turns might
result in dublicate id errors in wb recruit actions ( #1517 ), which
might lead to errors later.

With this it is of course possible to get erros when more than 2^31 (or
2^63 on a 64 bit wesnoth version.) fake units are generated during a
game, but that is less likely.
This commit is contained in:
gfgtdf 2018-05-05 21:10:18 +02:00 committed by Charles Dang
parent 8b745095ab
commit 775f3ec995

View file

@ -581,7 +581,6 @@ void play_controller::finish_side_turn()
}
mouse_handler_.deselect_hex();
resources::gameboard->unit_id_manager().reset_fake();
gamestate_->init_side_done() = false;
}