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

◆ SendEmoteRequestSync()

void SendEmoteRequestSync ( int id)
protected

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

898 {
899 int forced = EmoteLauncher.FORCE_NONE;
900 bool guaranteedLaunch = false;
901
902 m_RPSOutcome = -1;
903 switch (id)
904 {
907 break;
908
910 m_RPSOutcome = 0;
911 break;
912
914 m_RPSOutcome = 1;
915 break;
916
918 m_RPSOutcome = 2;
919 break;
920 }
921
923 if (g_Game.IsMultiplayer() && g_Game.IsClient())
924 {
925 bool canProceed = true; //running callbacks in certain state can block additional actions
927 if (m_Callback && emoteData)
928 {
929 canProceed = emoteData.CanBeCanceledNormally(m_Callback);
930 }
931
932 if (ctx.CanStoreInputUserData() && ((CanPlayEmote(id) && CanPlayEmoteClientCheck(id)) || forced) && canProceed)
933 {
935 ctx.Write(id);
936 ctx.Write(forced);
937 ctx.Write(guaranteedLaunch);
938 if (m_RPSOutcome != -1)
939 {
940 ctx.Write(m_RPSOutcome);
941 }
942 ctx.Send();
943 SetPending(true);
944 }
945 else
946 {
947 SetPending(false);
948 }
949
951 }
952 else if (!g_Game.IsMultiplayer())
953 {
954 if (id == CALLBACK_CMD_END)
955 {
957 }
958 else if (id == CALLBACK_CMD_GESTURE_INTERRUPT)
959 {
961 }
962 else if (CanPlayEmote(id) && CanPlayEmoteClientCheck(id))
963 {
964 PlayEmote(id);
965 }
966 else
967 {
969 }
970 }
971 }
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 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
static const int FORCE_NONE
Определения EmoteManager.c:66
Определения EmoteManager.c:65
Определения 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(), EndCallbackCommand(), EmoteLauncher::FORCE_NONE, 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_NameEmoteMap, m_RPSOutcome, PlayEmote(), Math::RandomInt(), ScriptInputUserData::Send(), SetEmoteLockState(), SetPending() и Serializer::Write().

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