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

◆ SendEmoteRequestSync()

void SendEmoteRequestSync ( int id)
protected

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

797 {
798 int forced = EmoteLauncher.FORCE_NONE;
799 if (m_MenuEmote)
800 {
801 forced = m_MenuEmote.GetForced();
802 }
803
804 m_RPSOutcome = -1;
805 switch (id)
806 {
809 break;
810
812 m_RPSOutcome = 0;
813 break;
814
816 m_RPSOutcome = 1;
817 break;
818
820 m_RPSOutcome = 2;
821 break;
822 }
823
825 if (GetGame().IsMultiplayer() && GetGame().IsClient())
826 {
827 bool canProceed = true; //running callbacks in certain state can block additional actions
829 if (m_Callback && emoteData)
830 {
831 canProceed = emoteData.CanBeCanceledNormally(m_Callback);
832 }
833
834 if (ctx.CanStoreInputUserData() && ((CanPlayEmote(id) && CanPlayEmoteClientCheck(id)) || forced) && canProceed)
835 {
837 ctx.Write(id);
838 ctx.Write(forced);
839 if (m_RPSOutcome != -1)
840 {
841 ctx.Write(m_RPSOutcome);
842 }
843 ctx.Send();
845 }
846 else
847 {
849 }
850 m_MenuEmote = NULL;
852 }
853 else if (!GetGame().IsMultiplayer())
854 {
855 if (id == CALLBACK_CMD_END)
856 {
858 }
859 else if (id == CALLBACK_CMD_GESTURE_INTERRUPT)
860 {
862 }
863 else if (CanPlayEmote(id) && CanPlayEmoteClientCheck(id))
864 {
865 PlayEmote(id);
866 }
867 else
868 {
870 }
871 m_MenuEmote = NULL;
872 }
873 }
const int INPUT_UDT_GESTURE
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:967
bool CanPlayEmote(int id)
Определения EmoteManager.c:880
int m_DeferredEmoteExecution
Определения EmoteManager.c:131
void SetEmoteLockState(bool state)
Определения EmoteManager.c:1030
ref EmoteLauncher m_MenuEmote
Определения EmoteManager.c:116
bool IsEmotePlaying()
Определения EmoteManager.c:1183
const int CALLBACK_CMD_GESTURE_INTERRUPT
Определения EmoteManager.c:140
ref map< int, ref EmoteBase > m_NameEmoteMap
Определения EmoteManager.c:145
void EndCallbackCommand()
Определения EmoteManager.c:779
bool m_bEmoteIsRequestPending
Определения EmoteManager.c:117
bool PlayEmote(int id)
Определения EmoteManager.c:588
bool CanBeCanceledNormally(notnull EmoteCB callback)
Определения EmoteBase.c:17
Определения EmoteBase.c:2
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
Определения 3_Game/constants.c:394
const int ID_EMOTE_RPS
Определения 3_Game/constants.c:383
const int ID_EMOTE_RPS_S
Определения 3_Game/constants.c:395
const int ID_EMOTE_RPS_R
Определения 3_Game/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().