File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -622,7 +622,7 @@ void BattlescapeGame::handleNonTargetAction()
622622 _parentState->warning (_currentAction.result );
623623 _currentAction.result = " " ;
624624 }
625- if (_currentAction.type == BA_PRIME && _currentAction.value > -1 )
625+ else if (_currentAction.type == BA_PRIME && _currentAction.value > -1 )
626626 {
627627 if (_currentAction.actor ->spendTimeUnits (_currentAction.TU ))
628628 {
@@ -634,22 +634,19 @@ void BattlescapeGame::handleNonTargetAction()
634634 _parentState->warning (" STR_NOT_ENOUGH_TIME_UNITS" );
635635 }
636636 }
637- if (_currentAction.type == BA_USE || _currentAction.type == BA_LAUNCH )
637+ else if (_currentAction.type == BA_USE || _currentAction.type == BA_LAUNCH )
638638 {
639639 _save->reviveUnconsciousUnits ();
640640 }
641- if (_currentAction.type == BA_HIT )
641+ else if (_currentAction.type == BA_HIT )
642642 {
643- if (_currentAction.result . empty ( ))
643+ if (_currentAction.actor -> spendTimeUnits (_currentAction. TU ))
644644 {
645- if (_currentAction.actor ->spendTimeUnits (_currentAction.TU ))
646- {
647- statePushBack (new MeleeAttackBState (this , _currentAction));
648- }
649- else
650- {
651- _parentState->warning (" STR_NOT_ENOUGH_TIME_UNITS" );
652- }
645+ statePushBack (new MeleeAttackBState (this , _currentAction));
646+ }
647+ else
648+ {
649+ _parentState->warning (" STR_NOT_ENOUGH_TIME_UNITS" );
653650 }
654651 }
655652 _currentAction.type = BA_NONE ;
You can’t perform that action at this time.
0 commit comments