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

Method IssueCommand

engine/Poseidon/UI/InGame/InGameUI.cpp:1333–1697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1331 SetCursorDirection(_worldCursor);
1332
1333 // _timeSendLoad = UITIME_MAX;
1334
1335 _lastCmdId = -1;
1336}
1337
1338void InGameUI::OnWeaponRemoved(int slot)
1339{
1340 AIUnit* unit = GWorld->FocusOn();
1341 if (!unit)
1342 {
1343 return;
1344 }
1345 SelectWeapon(unit, unit->GetVehicle()->FirstWeapon());
1346}
1347
1348void InGameUI::ResetHUD()
1349{
1350 _target = nullptr;
1351 _lockTarget = nullptr;
1352
1353 _lockAimValidUntil = Glob.uiTime - 60;
1354
1355 // _curWeapon = -1;
1356
1357 _modeAuto = _mode = UIFire;
1358 _groundPointValid = false;
1359
1360 ClearSelectedUnits();
1361 ClearTeams();
1362
1363 _menuType = MTNone;
1364 _menuCurrent = _menuMain;
1365
1366 _dragging = false;
1367 _mouseDown = false;
1368
1369 _visibleListTemp.Clear();
1370
1371 // _timeSendLoad = UITIME_MAX;
1372
1373 _hint->SetHint("");
1374
1375 _lastCmdId = -1;
1376}
1377
1378DEFINE_ENUM_BEG(VCommand)
1379VCFire, VCMove, VCCancelFire,
1380 VCCancelMove DEFINE_ENUM_END(VCommand)
1381
1382 void InGameUI::IssueVCommand(EntityAI* vehicle, VCommand cmd)
1383{
1384 AIUnit* unit = GWorld->FocusOn();
1385 Transport* transport = dyn_cast<Transport>(vehicle);
1386 if (!transport)
1387 {
1388 return;
1389 }
1390 if (transport->CommanderUnit() != unit)

Callers

nothing calls this directly

Calls 15

ClearSelectedUnitsFunction · 0.85
SetSelectedUnitFunction · 0.85
ListSelectedUnitsFunction · 0.85
IsEmptySelectedUnitsFunction · 0.85
GetSelectedUnitFunction · 0.85
FocusOnMethod · 0.80
IsKeyDownMethod · 0.80
SendStateMethod · 0.80
FindHealPositionMethod · 0.80
FindRepairPositionMethod · 0.80
IsSoldierMethod · 0.80
MainSubgroupMethod · 0.80

Tested by

no test coverage detected