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

◆ SendEmoteRequestSyncEx()

void SendEmoteRequestSyncEx ( notnull EmoteLauncher launcher)
protected

To avoid mixing m_MenuEmote with exceptional sync commands.

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

975 {
976 int id = launcher.GetID();
977 int forced = launcher.GetForced();
978 bool guaranteedLaunch = launcher.IsStartGuaranteed();
979
980 m_RPSOutcome = -1;
981 switch (id)
982 {
985 break;
986
988 m_RPSOutcome = 0;
989 break;
990
992 m_RPSOutcome = 1;
993 break;
994
996 m_RPSOutcome = 2;
997 break;
998 }
999
1001 if (g_Game.IsMultiplayer() && g_Game.IsClient())
1002 {
1003 bool canProceed = true; //running callbacks in certain state can block additional actions
1005 if (m_Callback && emoteData)
1006 {
1007 canProceed = emoteData.CanBeCanceledNormally(m_Callback);
1008 }
1009
1010 if (ctx.CanStoreInputUserData() && ((CanPlayEmote(id) && CanPlayEmoteClientCheck(id)) || forced) && canProceed)
1011 {
1013 ctx.Write(id);
1014 ctx.Write(forced);
1015 ctx.Write(guaranteedLaunch);
1016 if (m_RPSOutcome != -1)
1017 {
1018 ctx.Write(m_RPSOutcome);
1019 }
1020 ctx.Send();
1021 launcher.VerifySyncRequest();
1022 SetPending(true);
1023 }
1024 else
1025 {
1026 SetPending(false);
1027 }
1028
1029 if (launcher == m_MenuEmote)
1032 }
1033 else if (!g_Game.IsMultiplayer())
1034 {
1035 if (id == CALLBACK_CMD_END)
1036 {
1038 }
1039 else if (id == CALLBACK_CMD_GESTURE_INTERRUPT)
1040 {
1042 }
1043 else if (CanPlayEmote(id) && CanPlayEmoteClientCheck(id))
1044 {
1045 PlayEmote(id);
1046 }
1047
1048 if (launcher == m_MenuEmote)
1051 }
1052 }
const int INPUT_UDT_GESTURE
DayZGame g_Game
Определения DayZGame.c:3942
EmoteCB m_Callback
Определения EmoteManager.c:125
const int CALLBACK_CMD_END
Определения EmoteManager.c:156
int m_RPSOutcome
Определения EmoteManager.c:153
int m_CurrentGestureID
Определения EmoteManager.c:151
bool CanPlayEmoteClientCheck(int id)
Определения EmoteManager.c:1137
bool CanPlayEmote(int id)
Определения EmoteManager.c:1059
int m_DeferredEmoteExecution
Определения EmoteManager.c:148
void SetPending(bool state)
Определения EmoteManager.c:293
void SetEmoteLockState(bool state)
Определения EmoteManager.c:1204
bool ClearEmoteLauncher(bool forced=false)
Определения EmoteManager.c:853
ref EmoteLauncher m_MenuEmote
Определения EmoteManager.c:130
bool IsEmotePlaying()
Определения EmoteManager.c:1370
const int CALLBACK_CMD_GESTURE_INTERRUPT
Определения EmoteManager.c:157
ref map< int, ref EmoteBase > m_NameEmoteMap
Определения EmoteManager.c:162
void EndCallbackCommand()
Определения EmoteManager.c:881
bool PlayEmote(int id)
Определения EmoteManager.c:673
bool CanBeCanceledNormally(notnull EmoteCB callback)
Определения EmoteBase.c:17
Определения EmoteBase.c:2
Определения 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)
const int ID_EMOTE_RPS_P
Определения 3_Game/DayZ/constants.c:394
const int ID_EMOTE_RPS
Определения 3_Game/DayZ/constants.c:383
const int ID_EMOTE_RPS_S
Определения 3_Game/DayZ/constants.c:395
const int ID_EMOTE_RPS_R
Определения 3_Game/DayZ/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(), ClearEmoteLauncher(), EndCallbackCommand(), g_Game, EmoteConstants::ID_EMOTE_RPS, EmoteConstants::ID_EMOTE_RPS_P, EmoteConstants::ID_EMOTE_RPS_R, EmoteConstants::ID_EMOTE_RPS_S, INPUT_UDT_GESTURE, IsEmotePlaying(), m_Callback, m_CurrentGestureID, m_DeferredEmoteExecution, m_MenuEmote, m_NameEmoteMap, m_RPSOutcome, PlayEmote(), Math::RandomInt(), ScriptInputUserData::Send(), SetEmoteLockState(), SetPending() и Serializer::Write().

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