scripts/4_World/Classes/EmoteManager.c
//Called from players commandhandler each frame, checks input
Called from players commandhandler each frame, checks input
Called from players commandhandler each frame checks input
void Update( float deltaT )
	{
		if ( m_Callback ) 
		{
			bool uiGesture = false;
			if( !GetGame().IsMultiplayer() || GetGame().IsClient() )
			{
				uiGesture = GetGame().GetUIManager().IsMenuOpen(MENU_GESTURES);
			}
			if( (m_HIC.IsGestureSlot() > 0) || uiGesture || (m_HIC.IsSingleUse() && !uiGesture) || (m_HIC.IsContinuousUseStart() && !uiGesture) || (m_Callback.m_IsFullbody && !uiGesture && m_HIC.IsWeaponRaised()) ) 
			{
				if (m_CurrentGestureID == ID_EMOTE_SUICIDE  && m_HIC.IsSingleUse() )
				{
					if (m_Callback.GetState() == m_Callback.STATE_LOOP_LOOP)
					{
						CommitSuicide();
					}
					else
					{
						return;
					}
				}
				else if (m_CurrentGestureID == ID_EMOTE_THUMB && m_HIC.IsSingleUse())
				{
					m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_ACTION);
				}
				else
				{
					m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_END);
				}
				if ( m_HIC.IsGestureSlot() && m_PreviousGestureID != m_HIC.IsGestureSlot() )
				{
					m_BelayedEmote = true;
					m_BelayedEmoteID = m_HIC.IsGestureSlot();
				}
			}
		}
		else
		{
			if( m_bEmoteIsPlaying)
			{
				m_bEmoteIsPlaying = false;
				OnEmoteEnd();
			}
			else if( !m_HIC.IsWeaponRaised() && !m_Player.IsSwimming() && !m_Player.IsClimbingLadder() ) 	
			{
				PickEmote();
			}
		}
	}
void Update ( float deltaT ) { if ( m_Callback ) { bool uiGesture = false ; if ( ! GetGame ( ) . IsMultiplayer ( ) || GetGame ( ) . IsClient ( ) ) { uiGesture = GetGame ( ) . GetUIManager ( ) . IsMenuOpen ( MENU_GESTURES ) ; } if ( ( m_HIC . IsGestureSlot ( ) > 0 ) || uiGesture || ( m_HIC . IsSingleUse ( ) && ! uiGesture ) || ( m_HIC . IsContinuousUseStart ( ) && ! uiGesture ) || ( m_Callback . m_IsFullbody && ! uiGesture && m_HIC . IsWeaponRaised ( ) ) ) { if ( m_CurrentGestureID == ID_EMOTE_SUICIDE && m_HIC . IsSingleUse ( ) ) { if ( m_Callback . GetState ( ) == m_Callback . STATE_LOOP_LOOP ) { CommitSuicide ( ) ; } else { return ; } } else if ( m_CurrentGestureID == ID_EMOTE_THUMB && m_HIC . IsSingleUse ( ) ) { m_Callback . InternalCommand ( DayZPlayerConstants . CMD_ACTIONINT_ACTION ) ; } else { m_Callback . InternalCommand ( DayZPlayerConstants . CMD_ACTIONINT_END ) ; } if ( m_HIC . IsGestureSlot ( ) && m_PreviousGestureID != m_HIC . IsGestureSlot ( ) ) { m_BelayedEmote = true ; m_BelayedEmoteID = m_HIC . IsGestureSlot ( ) ; } } } else { if ( m_bEmoteIsPlaying ) { m_bEmoteIsPlaying = false ; OnEmoteEnd ( ) ; } else if ( ! m_HIC . IsWeaponRaised ( ) && ! m_Player . IsSwimming ( ) && ! m_Player . IsClimbingLadder ( ) ) { PickEmote ( ) ; } } }
Called from players commandhandler each frame, checks input
Called from players commandhandler each frame checks input
//jtomasik - asi bych nemel checkovat jestli hrac klika v menu nebo ve scene tady, ale mel by to vedet input manager? /*m_MouseButtonPressed*/ //m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_END); //TODO rework conditions into something better?