MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / VehMove

Function VehMove

engine/Poseidon/Game/Commands/GameStateExtGrp.cpp:1159–1188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1157}
1158
1159GameValue 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
1190DEFINE_COMMAND(Move)
1191

Callers

nothing calls this directly

Calls 5

GetUnitsFunction · 0.85
GetPosFunction · 0.85
GetNextCmdIdMethod · 0.80
SendCommandMethod · 0.80
IssueCommandMethod · 0.45

Tested by

no test coverage detected