| 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 | |
| 1975 | void 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 | |
| 1998 | bool InGameUI::GetCursorMode() const |
| 1999 | { |
| 2000 | return _cursorWorld; |
| 2001 | } |
| 2002 | |
| 2003 | Vector3 InGameUI::GetWorldCursor() const |
| 2004 | { |
| 2005 | return _worldCursor; |
| 2006 | } |
| 2007 | void InGameUI::SetWorldCursor(Vector3Par dir) |
| 2008 | { |
| 2009 | _worldCursor = dir; |
| 2010 | } |
nothing calls this directly
no test coverage detected