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

◆ SendEmoteRequestSync()

void SendEmoteRequestSync ( int id)
protected

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

795 {
796 int forced = EmoteLauncher.FORCE_NONE;
797 if (m_MenuEmote)
798 {
799 forced = m_MenuEmote.GetForced();
800 }
801
802 m_RPSOutcome = -1;
803 switch (id)
804 {
807 break;
808
810 m_RPSOutcome = 0;
811 break;
812
814 m_RPSOutcome = 1;
815 break;
816
818 m_RPSOutcome = 2;
819 break;
820 }
821
823 if (GetGame().IsMultiplayer() && GetGame().IsClient())
824 {
825 bool canProceed = true; //running callbacks in certain state can block additional actions
826 EmoteBase emoteData;
827 if (m_Callback && m_NameEmoteMap.Find(m_CurrentGestureID,emoteData))
828 {
829 canProceed = emoteData.CanBeCanceledNormally(m_Callback);
830 }
831
832 if (ctx.CanStoreInputUserData() && ((CanPlayEmote(id) && CanPlayEmoteClientCheck(id)) || forced) && canProceed)
833 {
835 ctx.Write(id);
836 ctx.Write(forced);
837 if (m_RPSOutcome != -1)
838 {
839 ctx.Write(m_RPSOutcome);
840 }
841 ctx.Send();
843 }
844 else
845 {
847 }
848 m_MenuEmote = NULL;
850 }
851 else if (!GetGame().IsMultiplayer())
852 {
853 if (id == CALLBACK_CMD_END)
854 {
856 }
857 else if (id == CALLBACK_CMD_GESTURE_INTERRUPT)
858 {
860 }
861 else if (CanPlayEmote(id) && CanPlayEmoteClientCheck(id))
862 {
863 PlayEmote(id);
864 }
865 else
866 {
868 }
869 m_MenuEmote = NULL;
870 }
871 }
const int INPUT_UDT_GESTURE
Определения _constants.c:18
EmoteCB m_Callback
Определения EmoteManager.c:111
const int CALLBACK_CMD_END
Определения EmoteManager.c:139
int m_RPSOutcome
Определения EmoteManager.c:136
int m_CurrentGestureID
Определения EmoteManager.c:134
bool CanPlayEmoteClientCheck(int id)
Определения EmoteManager.c:965
bool CanPlayEmote(int id)
Определения EmoteManager.c:878
int m_DeferredEmoteExecution
Определения EmoteManager.c:131
void SetEmoteLockState(bool state)
Определения EmoteManager.c:1014
ref EmoteLauncher m_MenuEmote
Определения EmoteManager.c:116
bool IsEmotePlaying()
Определения EmoteManager.c:1137
const int CALLBACK_CMD_GESTURE_INTERRUPT
Определения EmoteManager.c:140
ref map< int, ref EmoteBase > m_NameEmoteMap
Определения EmoteManager.c:145
void EndCallbackCommand()
Определения EmoteManager.c:777
bool m_bEmoteIsRequestPending
Определения EmoteManager.c:117
bool PlayEmote(int id)
Определения EmoteManager.c:586
bool CanBeCanceledNormally(notnull EmoteCB callback)
Определения EmoteBase.c:17
Определения EmoteBase.c:2
Определения constants.c:359
static const int FORCE_NONE
Определения EmoteManager.c:76
Определения EmoteManager.c:75
Определения EnMath.c:7
proto native void Send()
proto static native bool CanStoreInputUserData()
Returns true when the channel is free, AND the InputBuffer is NOT full (same as '!...
Определения gameplay.c:121
proto bool Write(void value_out)
proto native CGame GetGame()
const int ID_EMOTE_RPS_P
Определения constants.c:394
const int ID_EMOTE_RPS
Определения constants.c:383
const int ID_EMOTE_RPS_S
Определения constants.c:395
const int ID_EMOTE_RPS_R
Определения constants.c:393
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].

Перекрестные ссылки CALLBACK_CMD_END, CALLBACK_CMD_GESTURE_INTERRUPT, EmoteBase::CanBeCanceledNormally(), CanPlayEmote(), CanPlayEmoteClientCheck(), ScriptInputUserData::CanStoreInputUserData(), EndCallbackCommand(), EmoteLauncher::FORCE_NONE, GetGame(), EmoteConstants::ID_EMOTE_RPS, EmoteConstants::ID_EMOTE_RPS_P, EmoteConstants::ID_EMOTE_RPS_R, EmoteConstants::ID_EMOTE_RPS_S, INPUT_UDT_GESTURE, IsEmotePlaying(), m_bEmoteIsRequestPending, m_Callback, m_CurrentGestureID, m_DeferredEmoteExecution, m_MenuEmote, m_NameEmoteMap, m_RPSOutcome, PlayEmote(), Math::RandomInt(), ScriptInputUserData::Send(), SetEmoteLockState() и Serializer::Write().

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