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

◆ PlaySurrenderInOut()

void PlaySurrenderInOut ( bool state)
protected

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

982 {
985
986 if (state)
987 {
988 ItemBase item = m_Player.GetItemInHands();
989 if (item)
990 {
991 if (!m_Player.CanDropEntity(item))
992 return;
993
994 if (m_Player.GetInventory().HasInventoryReservation(null, m_HandInventoryLocation))
995 m_Player.GetInventory().ClearInventoryReservationEx(null, m_HandInventoryLocation);
996
997 if (GetGame().IsMultiplayer())
998 {
999 if (GetGame().IsServer())
1000 m_Player.ServerDropEntity(item);
1001 }
1002 else
1003 {
1004 m_Player.PhysicalPredictiveDropItem(item); //SP only
1005 }
1006 }
1007
1008 CreateEmoteCallback(EmoteCB,DayZPlayerConstants.CMD_GESTUREFB_SURRENDERIN,DayZPlayerConstants.STANCEMASK_ALL,true);
1009
1010 if (m_Callback)
1011 {
1012 m_Callback.RegisterAnimationEvent("ActionExec", UA_ANIM_EVENT);
1013 m_IsSurrendered = true; //sets state immediately on anim start
1014 }
1015 }
1016 else
1017 {
1018 if (m_Player.IsAlive() && !m_Player.IsUnconscious())
1019 {
1020 CreateEmoteCallback(EmoteCB,DayZPlayerConstants.CMD_GESTUREFB_SURRENDEROUT,DayZPlayerConstants.STANCEMASK_ALL,true);
1021 }
1022 else
1023 {
1024 OnEmoteEnd();
1025 }
1026 }
1027 }
EmoteCB m_Callback
Определения EmoteManager.c:111
int m_CurrentGestureID
Определения EmoteManager.c:134
ref InventoryLocation m_HandInventoryLocation
Определения EmoteManager.c:115
void OnEmoteEnd()
Определения EmoteManager.c:467
void CreateEmoteCallback(typename callbacktype, int id, int mask, bool fullbody)
Определения EmoteManager.c:636
bool m_IsSurrendered
Определения EmoteManager.c:119
int m_PreviousGestureID
Определения EmoteManager.c:133
DayZPlayer m_Player
Определения Hand_Events.c:42
Определения EmoteManager.c:2
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
proto native CGame GetGame()
const int ID_EMOTE_SURRENDER
Определения 3_Game/constants.c:399
const int UA_ANIM_EVENT
Определения 3_Game/constants.c:473

Перекрестные ссылки CreateEmoteCallback(), GetGame(), EmoteConstants::ID_EMOTE_SURRENDER, m_Callback, m_CurrentGestureID, m_HandInventoryLocation, m_IsSurrendered, m_Player, m_PreviousGestureID, OnEmoteEnd() и UA_ANIM_EVENT.

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