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

◆ SelectCrossHair()

void SelectCrossHair ( )
protected

firearms

On Continuous Actions

raised hands(bare + non-firearm) + melee cmd

handle unconscious state

default

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

165 {
166 if(!m_AM) return;
167
168 HumanInputController hic = m_Player.GetInputController();
169 ActionBase action = m_AM.GetRunningAction();
170
171 bool firearmInHands = m_Player.GetItemInHands() && m_Player.GetItemInHands().IsWeapon();
172
174 if ( firearmInHands && m_Player.IsRaised() && !m_Player.IsInIronsights() && !m_Player.IsInOptics() && !hic.CameraIsFreeLook() && !m_Player.GetCommand_Melee2() )
175 {
176 ShowCrossHair(GetCrossHairByName("crossT_128x128"));
177 }
179 else if (action && action.GetActionCategory() == AC_CONTINUOUS)
180 {
181 int actionState = m_AM.GetActionState(action);
182
183 if ( actionState != UA_NONE )
184 ShowCrossHair(null);
185 }
187 else if ( m_Player.IsRaised() || m_Player.GetCommand_Melee2() || GetGame().GetUIManager().GetMenu() != null )
188 {
189 ShowCrossHair(null);
190 }
192 else if ( m_Player.GetCommand_Unconscious() )
193 {
194 ShowCrossHair(null);
195 }
197 else
198 {
200 }
201 }
const int AC_CONTINUOUS
Определения _constants.c:3
ActionManagerBase m_AM
Определения CrossHairSelector.c:57
CrossHair GetCrossHairByName(string widgetName)
Определения CrossHairSelector.c:142
void ShowCrossHair(CrossHair crossHair)
Определения CrossHairSelector.c:203
DayZPlayer m_Player
Определения Hand_Events.c:42
int GetActionCategory()
Определения ActionBase.c:278
Определения ActionBase.c:53
proto native bool CameraIsFreeLook()
returns true if freelook is active
Определения human.c:18
proto native CGame GetGame()
const int UA_NONE
Определения constants.c:460

Перекрестные ссылки AC_CONTINUOUS, HumanInputController::CameraIsFreeLook(), ActionBase::GetActionCategory(), GetCrossHairByName(), GetGame(), m_AM, m_Player, ShowCrossHair() и UA_NONE.

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