| 1226 | } |
| 1227 | |
| 1228 | void BattleUnit::changeOwner(GameState &state, StateRef<Organisation> newOwner) |
| 1229 | { |
| 1230 | if (owner == newOwner) |
| 1231 | { |
| 1232 | return; |
| 1233 | } |
| 1234 | refreshUnitVision(state, true); |
| 1235 | stopAttacking(); |
| 1236 | stopAttackPsi(state); |
| 1237 | cancelMissions(state); |
| 1238 | removeFromSquad(*state.current_battle); |
| 1239 | owner = newOwner; |
| 1240 | assignToSquad(*state.current_battle); |
| 1241 | refreshUnitVisibilityAndVision(state); |
| 1242 | } |
| 1243 | |
| 1244 | void BattleUnit::setReserveShotMode(GameState &state, ReserveShotMode mode) |
| 1245 | { |
no outgoing calls
no test coverage detected