aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp62
1 files changed, 30 insertions, 32 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index ee18c90e468..cee19b7b0e0 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -14795,38 +14795,36 @@ void Unit::SetControlled(bool apply, UnitState state)
switch(state)
{
- case UNIT_STAT_STUNNED:
- {
- addUnitState(state);
- SetStunned(true);
- CastStop();
- }
- break;
- case UNIT_STAT_ROOT:
- if (!hasUnitState(UNIT_STAT_STUNNED))
- {
- addUnitState(state);
- SetRooted(true);
- }
- break;
- case UNIT_STAT_CONFUSED:
- if (!hasUnitState(UNIT_STAT_STUNNED))
- {
- addUnitState(state);
- SetConfused(true);
- CastStop();
- }
- break;
- case UNIT_STAT_FLEEING:
- if (!hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_CONFUSED))
- {
- addUnitState(state);
- SetFeared(true);
- CastStop();
- }
- break;
- default:
- break;
+ case UNIT_STAT_STUNNED:
+ addUnitState(state);
+ SetStunned(true);
+ CastStop();
+ break;
+ case UNIT_STAT_ROOT:
+ if (!hasUnitState(UNIT_STAT_STUNNED))
+ {
+ addUnitState(state);
+ SetRooted(true);
+ }
+ break;
+ case UNIT_STAT_CONFUSED:
+ if (!hasUnitState(UNIT_STAT_STUNNED))
+ {
+ addUnitState(state);
+ SetConfused(true);
+ CastStop();
+ }
+ break;
+ case UNIT_STAT_FLEEING:
+ if (!hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_CONFUSED))
+ {
+ addUnitState(state);
+ SetFeared(true);
+ CastStop();
+ }
+ break;
+ default:
+ break;
}
}
else