Skip to content

Commit d2bd120

Browse files
committed
make sure panicked/berserk units re-set.
1 parent 67fced7 commit d2bd120

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/Battlescape/UnitPanicBState.cpp‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ void UnitPanicBState::think()
5353
// reset the unit's time units when all panicking is done
5454
if (_unit)
5555
{
56+
if (!_unit->isOut())
57+
{
58+
_unit->abortTurn(); // set the unit status to standing in case it wasn't otherwise changed from berserk/panicked
59+
}
5660
_unit->setTimeUnits(0);
5761
}
5862
_parent->popState();

0 commit comments

Comments
 (0)