Implementing feature request bug #19545...
...by applying the patch provided and adding an additional break condition to prevent infinite looping.
This commit is contained in:
parent
55e2307be7
commit
9a0e5cbb9e
1 changed files with 5 additions and 2 deletions
|
@ -2385,9 +2385,12 @@ WML_HANDLER_FUNCTION(unstore_unit, /*event_info*/, cfg)
|
|||
}
|
||||
|
||||
const int side = controller->current_side();
|
||||
if (advance &&
|
||||
unit_helper::will_certainly_advance(resources::units->find(loc)))
|
||||
uint loop_limit = 5;
|
||||
while ( advance
|
||||
&& unit_helper::will_certainly_advance(resources::units->find(loc))
|
||||
&& (loop_limit > 0) )
|
||||
{
|
||||
loop_limit--;
|
||||
int total_opt = unit_helper::number_of_possible_advances(u);
|
||||
bool use_dialog = side == u.side() &&
|
||||
(*resources::teams)[side - 1].is_human();
|
||||
|
|
Loading…
Add table
Reference in a new issue