| 1157 | } |
| 1158 | |
| 1159 | GameValue VehMove(const GameState* state, GameValuePar oper1, GameValuePar oper2, bool silent) |
| 1160 | { |
| 1161 | PackedBoolArray list; |
| 1162 | AIGroup* grp = GetUnits(state, oper1, list); |
| 1163 | if (!grp) |
| 1164 | { |
| 1165 | return NOTHING; |
| 1166 | } |
| 1167 | Vector3 pos; |
| 1168 | if (!GetPos(state, pos, oper2)) |
| 1169 | { |
| 1170 | return NOTHING; |
| 1171 | } |
| 1172 | Command cmd; |
| 1173 | cmd._message = Command::Move; |
| 1174 | cmd._destination = pos; |
| 1175 | cmd._discretion = Command::Undefined; |
| 1176 | cmd._context = Command::CtxMission; |
| 1177 | if (silent) |
| 1178 | { |
| 1179 | cmd._id = grp->GetNextCmdId(); |
| 1180 | grp->IssueCommand(cmd, list); |
| 1181 | } |
| 1182 | else |
| 1183 | { |
| 1184 | grp->SendCommand(cmd, list); |
| 1185 | } |
| 1186 | |
| 1187 | return NOTHING; |
| 1188 | } |
| 1189 | |
| 1190 | DEFINE_COMMAND(Move) |
| 1191 |
nothing calls this directly
no test coverage detected