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

◆ SendEmoteRequestSync()

void SendEmoteRequestSync ( int id)
protected

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

865 {
866 int forced = EmoteLauncher.FORCE_NONE;
867 bool guaranteedLaunch = false;
868
869 m_RPSOutcome = -1;
870 switch (id)
871 {
874 break;
875
877 m_RPSOutcome = 0;
878 break;
879
881 m_RPSOutcome = 1;
882 break;
883
885 m_RPSOutcome = 2;
886 break;
887 }
888
890 if (g_Game.IsMultiplayer() && g_Game.IsClient())
891 {
892 bool canProceed = true; //running callbacks in certain state can block additional actions
894 if (m_Callback && emoteData)
895 {
896 canProceed = emoteData.CanBeCanceledNormally(m_Callback);
897 }
898
899 if (ctx.CanStoreInputUserData() && ((CanPlayEmote(id) && CanPlayEmoteClientCheck(id)) || forced) && canProceed)
900 {
902 ctx.Write(id);
903 ctx.Write(forced);
904 ctx.Write(guaranteedLaunch);
905 if (m_RPSOutcome != -1)
906 {
907 ctx.Write(m_RPSOutcome);
908 }
909 ctx.Send();
910 SetPending(true);
911 }
912 else
913 {
914 SetPending(false);
915 }
916
918 }
919 else if (!g_Game.IsMultiplayer())
920 {
921 if (id == CALLBACK_CMD_END)
922 {
924 }
925 else if (id == CALLBACK_CMD_GESTURE_INTERRUPT)
926 {
928 }
929 else if (CanPlayEmote(id) && CanPlayEmoteClientCheck(id))
930 {
931 PlayEmote(id);
932 }
933 else
934 {
936 }
937 }
938 }
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 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
static const int FORCE_NONE
Определения EmoteManager.c:61
Определения EmoteManager.c:60
Определения 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(), 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().