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

Function VehTarget

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

Source from the content-addressed store, hash-verified

1341DEFINE_COMMAND(Watch)
1342
1343GameValue VehTarget(const GameState* state, GameValuePar oper1, GameValuePar oper2, bool silent)
1344{
1345 PackedBoolArray list;
1346 AIGroup* grp = GetUnits(state, oper1, list);
1347 if (!grp)
1348 {
1349 return NOTHING;
1350 }
1351 Vector3 pos;
1352 Target* tgt = nullptr;
1353 Object* obj = GetObject(oper2);
1354 EntityAI* veh = dyn_cast<EntityAI>(obj);
1355 if (veh)
1356 {
1357 tgt = FindTargetReveal(grp, veh);
1358 }
1359
1360 grp->SendTarget(tgt, false, false, list, silent);
1361 return NOTHING;
1362}
1363
1364DEFINE_COMMAND(Target)
1365

Callers

nothing calls this directly

Calls 4

GetUnitsFunction · 0.85
FindTargetRevealFunction · 0.85
GetObjectFunction · 0.70
SendTargetMethod · 0.45

Tested by

no test coverage detected