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

Method IssueWatch

engine/Poseidon/UI/Map/UIMapMain.cpp:1949–1968  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1947}
1948
1949void CStaticMapMain::IssueWatch(float x, float y)
1950{
1951 AIUnit* me = GetMyUnit();
1952 AIGroup* myGroup = me ? me->GetGroup() : nullptr;
1953 if (!myGroup)
1954 {
1955 return;
1956 }
1957
1958 PackedBoolArray list = Poseidon::ListSelectedUnits();
1959 if (me == myGroup->Leader() && !list.IsEmpty())
1960 {
1961 // command for units
1962 Vector3 pos;
1963 pos = ScreenToWorld(DrawCoord(x, y));
1964 pos[1] = GLOB_LAND->RoadSurfaceYAboveWater(pos[0], pos[2]);
1965 myGroup->SendState(new RadioMessageWatchPos(myGroup, list, pos));
1966 Poseidon::ClearSelectedUnits();
1967 }
1968}
1969
1970void CStaticMapMain::IssueAttack(TargetType* target)
1971{

Callers

nothing calls this directly

Calls 7

ListSelectedUnitsFunction · 0.85
ClearSelectedUnitsFunction · 0.85
SendStateMethod · 0.80
GetGroupMethod · 0.45
LeaderMethod · 0.45
IsEmptyMethod · 0.45

Tested by

no test coverage detected