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

Function VehFire

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

Source from the content-addressed store, hash-verified

1190DEFINE_COMMAND(Move)
1191
1192GameValue VehFire(const GameState* state, GameValuePar oper1, GameValuePar oper2, bool silent)
1193{
1194 PackedBoolArray list;
1195 AIGroup* grp = GetUnits(state, oper1, list);
1196 if (!grp)
1197 {
1198 return NOTHING;
1199 }
1200
1201 Object* obj = GetObject(oper2);
1202 EntityAI* veh = dyn_cast<EntityAI>(obj);
1203
1204 Target* tgt = veh ? FindTargetReveal(grp, veh) : nullptr;
1205 grp->SendState(new RadioMessageTarget(grp, list, tgt, false, true), silent);
1206 return NOTHING;
1207}
1208
1209DEFINE_COMMAND(Fire)
1210

Callers

nothing calls this directly

Calls 4

GetUnitsFunction · 0.85
FindTargetRevealFunction · 0.85
SendStateMethod · 0.80
GetObjectFunction · 0.70

Tested by

no test coverage detected