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

Method IssueAction

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

Source from the content-addressed store, hash-verified

1966 RevealTarget(tgt, 0.3);
1967
1968 _timeSendTarget = Glob.uiTime + 1.0;
1969 _lockAimValidUntil = Glob.uiTime - 60;
1970}
1971
1972#define CameraFrame() GScene->GetCamera()
1973// #define CameraFrame() GWorld->CameraOn()
1974
1975void InGameUI::SetCursorMode(bool world)
1976{
1977 if (_cursorWorld == world)
1978 {
1979 return;
1980 }
1981 _cursorWorld = world;
1982 const FrameBase* cam = CameraFrame();
1983 PoseidonAssert(cam);
1984 if (cam)
1985 {
1986 if (!_cursorWorld)
1987 { // convert from world cursor
1988 Matrix4Val invTransform = cam->GetInvTransform();
1989 _modelCursor = invTransform.Rotate(_worldCursor);
1990 }
1991 else
1992 { // convert to world cursor
1993 _worldCursor = cam->DirectionModelToWorld(_modelCursor);
1994 }
1995 }
1996}
1997
1998bool InGameUI::GetCursorMode() const
1999{
2000 return _cursorWorld;
2001}
2002
2003Vector3 InGameUI::GetWorldCursor() const
2004{
2005 return _worldCursor;
2006}
2007void InGameUI::SetWorldCursor(Vector3Par dir)
2008{
2009 _worldCursor = dir;
2010}

Callers

nothing calls this directly

Calls 7

GetSelectedUnitFunction · 0.85
ClearSelectedUnitsFunction · 0.85
SendAutoCommandToUnitMethod · 0.80
GetVehicleMethod · 0.45
PositionMethod · 0.45
GetGroupMethod · 0.45
StartActionProcessingMethod · 0.45

Tested by

no test coverage detected