Resolve Issue 7398: Crash on Attack with Planning Mode
The game crashes when the player clicks the Attack button with planning mode with a console error about a failed assert on line 164 of src/whiteboard/attack.cpp. The assert uses > but it looks like it should be >=. This commit switches from > to >= and appears to resolve the issue.
This commit is contained in:
parent
8bb7dace3f
commit
373f8a4245
1 changed files with 1 additions and 1 deletions
|
@ -161,7 +161,7 @@ void attack::apply_temp_modifier(unit_map& unit_map)
|
|||
unit& unit = *get_unit();
|
||||
DBG_WB << unit.name() << " [" << unit.id()
|
||||
<< "] has " << unit.attacks_left() << " attacks, decreasing by " << attack_count_;
|
||||
assert(unit.attacks_left() > attack_count_);
|
||||
assert(unit.attacks_left() >= attack_count_);
|
||||
|
||||
//Calculate movement to subtract
|
||||
temp_movement_subtracted_ = unit.movement_left() >= attack_movement_cost_ ? attack_movement_cost_ : 0 ;
|
||||
|
|
Loading…
Add table
Reference in a new issue