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

◆ SendEmoteRequestSyncEx()

void SendEmoteRequestSyncEx ( notnull EmoteLauncher launcher)
protected

To avoid mixing m_MenuEmote with exceptional sync commands.

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

942 {
943 int id = launcher.GetID();
944 int forced = launcher.GetForced();
945 bool guaranteedLaunch = launcher.IsStartGuaranteed();
946
947 m_RPSOutcome = -1;
948 switch (id)
949 {
952 break;
953
955 m_RPSOutcome = 0;
956 break;
957
959 m_RPSOutcome = 1;
960 break;
961
963 m_RPSOutcome = 2;
964 break;
965 }
966
968 if (g_Game.IsMultiplayer() && g_Game.IsClient())
969 {
970 bool canProceed = true; //running callbacks in certain state can block additional actions
972 if (m_Callback && emoteData)
973 {
974 canProceed = emoteData.CanBeCanceledNormally(m_Callback);
975 }
976
977 if (ctx.CanStoreInputUserData() && ((CanPlayEmote(id) && CanPlayEmoteClientCheck(id)) || forced) && canProceed)
978 {
980 ctx.Write(id);
981 ctx.Write(forced);
982 ctx.Write(guaranteedLaunch);
983 if (m_RPSOutcome != -1)
984 {
985 ctx.Write(m_RPSOutcome);
986 }
987 ctx.Send();
988 launcher.VerifySyncRequest();
989 SetPending(true);
990 }
991 else
992 {
993 SetPending(false);
994 }
995
996 if (launcher == m_MenuEmote)
999 }
1000 else if (!g_Game.IsMultiplayer())
1001 {
1002 if (id == CALLBACK_CMD_END)
1003 {
1005 }
1006 else if (id == CALLBACK_CMD_GESTURE_INTERRUPT)
1007 {
1009 }
1010 else if (CanPlayEmote(id) && CanPlayEmoteClientCheck(id))
1011 {
1012 PlayEmote(id);
1013 }
1014
1015 if (launcher == m_MenuEmote)
1018 }
1019 }
const int INPUT_UDT_GESTURE
DayZGame g_Game
Определения DayZGame.c:4074
EmoteCB m_Callback
Определения EmoteManager.c:120
const int CALLBACK_CMD_END
Определения EmoteManager.c:149
int m_RPSOutcome
Определения EmoteManager.c:146
int m_CurrentGestureID
Определения EmoteManager.c:144
bool CanPlayEmoteClientCheck(int id)
Определения EmoteManager.c:1098
bool CanPlayEmote(int id)
Определения EmoteManager.c:1026
int m_DeferredEmoteExecution
Определения EmoteManager.c:141
void SetPending(bool state)
Определения EmoteManager.c:280
void SetEmoteLockState(bool state)
Определения EmoteManager.c:1165
bool ClearEmoteLauncher(bool forced=false)
Определения EmoteManager.c:820
ref EmoteLauncher m_MenuEmote
Определения EmoteManager.c:125
bool IsEmotePlaying()
Определения EmoteManager.c:1328
const int CALLBACK_CMD_GESTURE_INTERRUPT
Определения EmoteManager.c:150
ref map< int, ref EmoteBase > m_NameEmoteMap
Определения EmoteManager.c:154
void EndCallbackCommand()
Определения EmoteManager.c:848
bool PlayEmote(int id)
Определения EmoteManager.c:640
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:402
const int ID_EMOTE_RPS
Определения 3_Game/DayZ/constants.c:391
const int ID_EMOTE_RPS_S
Определения 3_Game/DayZ/constants.c:403
const int ID_EMOTE_RPS_R
Определения 3_Game/DayZ/constants.c:401
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().