DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ UpdatePos()

void ScriptedWidgetEventHandler::UpdatePos ( )
inlineprotected

Function updating the position of the tracker widget.

Currently tracks using GetScreenPos() on the position of the player.

См. определение в файле CTObjectFollower.c строка 90

91 {
92 vector relativePos;
93
94 relativePos = g_Game.GetScreenPosRelative( GetPosition() );
95
96 if( relativePos[0] >= 1 || relativePos[0] == 0 || relativePos[1] >= 1 || relativePos[1] == 0 )
97 {
98 m_FollowerRoot.Show( false );
99 return;
100 }
101 else if( relativePos[2] < 0 )
102 {
103 m_FollowerRoot.Show( false );
104 return;
105 }
106 else
107 {
108 m_FollowerRoot.Show( true );
109 }
110
111 float x, y;
112 m_FollowerRoot.GetSize( x, y );
113
114 m_FollowerRoot.SetPos( relativePos[0], relativePos[1] );
115 }
DayZGame g_Game
Определения DayZGame.c:3942
Icon x
Icon y
vector GetPosition()
Определения CTKeyframe.c:97
Widget m_FollowerRoot
Определения CTObjectFollower.c:3

Перекрестные ссылки g_Game, GetPosition(), m_FollowerRoot, x и y.

Используется в SetPosition(), SetRotation() и Update().