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

◆ Update()

void Update ( float deltaT)
protected

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

287 {
288 // no updates on restrained characters
289 if (m_Player.IsRestrained())
290 return;
291
292 int gestureSlot = 0;
293 #ifndef SERVER
294 gestureSlot = DetermineGestureIndex();
295 #endif
296
297 //nuclear solution to inventory question
298 #ifndef NO_GUI
299 if (g_Game.IsClient() && g_Game.GetUIManager().FindMenu(MENU_INVENTORY) && IsEmotePlaying())
300 m_Player.CloseInventoryMenu();
301 #endif
302
303 //deferred emote cancel
304 if (m_InstantCancelEmote) //'hard' cancel
305 {
306 if (m_Callback)
307 m_Callback.Cancel();
308
311 m_InstantCancelEmote = false;
312 SetPending(false);
313
314 if (m_Player.IsSurrendered())
316 else
317 SetEmoteLockState(false);
318 }
319 else if (m_CancelEmote) //'soft' cancel
320 {
321 SetPending(false);
322 m_CancelEmote = false;
323
324 if (m_Player.IsSurrendered())
326 else if (m_Callback)
327 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_INTERRUPT);
328 }
329
331 {
332 ClearEmoteLauncher(true);
334 }
335
336 //if (m_DisconnectEmoteQueued && (!m_bEmoteIsPlaying && !m_bEmoteIsRequestPending))
338 {
339 if (!m_MenuEmote || !m_MenuEmote.IsStartGuaranteed())
340 {
343 m_MenuEmote.SetStartGuaranteed(true);
344
345 EmoteBase emote = EmoteBase.Cast(m_NameEmoteMap.Get(m_MenuEmote.GetID()));
346 int stanceIdx = DayZPlayerUtils.ConvertStanceMaskToStanceIdx(emote.GetStanceMaskFullbody());
347
348 //if the emote cannot be played, don't sent a request to server
349 if (!DayZPlayerUtils.PlayerCanChangeStance(m_Player, stanceIdx))
350 {
351 m_MenuEmote = null; //setting this to null also ensures that the forcedEmotQueuedClient below is also false
353 }
354 }
355 }
356
357 bool forcedEmoteQueuedClient = m_MenuEmote && !m_MenuEmote.WasSynced() && m_MenuEmote.GetForced() > EmoteLauncher.FORCE_NONE && !g_Game.IsDedicatedServer();
358 if (forcedEmoteQueuedClient) //regular forced emote playing
359 {
361 }
362 else if (m_Callback)
363 {
364 bool uiGesture = false;
365 if (!g_Game.IsHeadlessOrDedicatedServer())
366 {
367 uiGesture = g_Game.GetUIManager().IsMenuOpen(MENU_GESTURES);
368
370 {
372 }
373
375 {
377 }
378 }
379
380 if (gestureSlot > 0 || m_GestureInterruptInput || (m_HIC.IsSingleUse() && !uiGesture) || (m_HIC.IsContinuousUseStart() && !uiGesture) || (m_Callback.m_IsFullbody && !uiGesture && m_HIC.IsWeaponRaised()))
381 {
383 {
384 if (m_Callback.GetState() == m_Callback.STATE_LOOP_LOOP)
385 {
387 }
388 else
389 {
390 return;
391 }
392 }
394 {
395 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_ACTION);
396 }
398 {
399 if (m_RPSOutcome != -1)
400 {
401 if (m_RPSOutcome == 0)
402 {
403 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_RPS_ROCK);
404 }
405 else if (m_RPSOutcome == 1)
406 {
407 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_RPS_PAPER);
408 }
409 else if (m_RPSOutcome == 2)
410 {
411 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_RPS_SCISSORS);
412 }
413 m_RPSOutcome = -1;
414 }
415 else
416 {
417 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_END);
418 }
419 }
421 {
423 }
425 {
427 }
428 }
429
430 if (m_LastMask != -1 && m_Player.IsPlayerInStance(DayZPlayerConstants.STANCEMASK_PRONE))
431 {
432 m_Callback.Cancel();
433 }
434
435 if (m_MenuEmote && !m_MenuEmote.IsStartGuaranteed() && m_bEmoteIsPlaying)
436 {
438 }
439
441 {
443 }
444
446 {
448 }
449 }
450 //no m_Callback exists
451 else
452 {
453 if (m_bEmoteIsRequestPending && (m_Player.IsUnconscious() || !m_Player.IsAlive()))
454 {
455 SetPending(false);
456 }
457
459 {
460 OnEmoteEnd();
461 }
462 // getting out of surrender state
463 else if (m_Player.IsSurrendered() && (m_HIC.IsSingleUse() || m_HIC.IsContinuousUseStart() || m_HIC.IsWeaponRaised()))
464 {
466 return;
467 }
468 //actual emote launch
470 {
472 //m_DeferredGuaranteedEmoteId = CALLBACK_CMD_INVALID;
473 }
475 {
478 }
479 //client-side emote launcher
480 else if (!m_bEmoteIsPlaying && m_MenuEmote && !m_MenuEmote.WasSynced() && !g_Game.IsDedicatedServer())
481 {
483 }
484 else if (!m_MenuEmote && gestureSlot > 0)
485 {
486 CreateEmoteCBFromMenu(gestureSlot,true); //translation no longer needed
487 }
488 }
489 }
DayZGame g_Game
Определения DayZGame.c:4074
void DayZPlayerUtils()
cannot be instantiated
Определения DayZPlayerUtils.c:465
bool m_DisconnectEmoteQueued
Определения EmoteManager.c:131
EmoteCB m_Callback
Определения EmoteManager.c:120
bool ClearDeferredExecution()
Определения EmoteManager.c:829
const int CALLBACK_CMD_END
Определения EmoteManager.c:149
int m_RPSOutcome
Определения EmoteManager.c:146
void CreateEmoteCBFromMenu(int id, bool interrupts_same=false)
Определения EmoteManager.c:814
const int CALLBACK_CMD_INVALID
Определения EmoteManager.c:148
int m_CurrentGestureID
Определения EmoteManager.c:144
bool m_CancelEmote
Определения EmoteManager.c:128
int m_DeferredEmoteExecution
Определения EmoteManager.c:141
bool m_DeferredEmoteLauncherCleanup
Определения EmoteManager.c:132
int m_DeferredGuaranteedEmoteId
Определения EmoteManager.c:140
void InterruptCallbackCommand()
Определения EmoteManager.c:840
void SetPending(bool state)
Определения EmoteManager.c:280
int m_LastMask
Определения EmoteManager.c:145
int DetermineGestureIndex()
Определения EmoteManager.c:241
void SendEmoteRequestSyncEx(notnull EmoteLauncher launcher)
To avoid mixing m_MenuEmote with exceptional sync commands.
Определения EmoteManager.c:941
void CommitSuicide()
Определения EmoteManager.c:742
bool m_GestureInterruptInput
Определения EmoteManager.c:130
void ClearSurrenderState()
Surrender state cleared.
Определения EmoteManager.c:1246
const int CALLBACK_CMD_INSTACANCEL
Определения EmoteManager.c:151
void OnEmoteEnd()
Определения EmoteManager.c:491
void SetEmoteLockState(bool state)
Определения EmoteManager.c:1165
bool ClearEmoteLauncher(bool forced=false)
Определения EmoteManager.c:820
ref EmoteLauncher m_MenuEmote
Определения EmoteManager.c:125
bool InterruptGestureCheck()
Определения EmoteManager.c:1283
bool InterruptWaterCheck()
Определения EmoteManager.c:1312
bool IsEmotePlaying()
Определения EmoteManager.c:1328
const int CALLBACK_CMD_GESTURE_INTERRUPT
Определения EmoteManager.c:150
ref map< int, ref EmoteBase > m_NameEmoteMap
Определения EmoteManager.c:154
HumanInputController m_HIC
Определения EmoteManager.c:121
void EndCallbackCommand()
Определения EmoteManager.c:848
bool m_bEmoteIsPlaying
Определения EmoteManager.c:127
bool m_InstantCancelEmote
Определения EmoteManager.c:129
bool m_bEmoteIsRequestPending
Определения EmoteManager.c:126
void SendEmoteRequestSync(int id)
Определения EmoteManager.c:864
bool PlayEmote(int id)
Определения EmoteManager.c:640
DayZPlayer m_Player
Определения Hand_Events.c:42
int GetStanceMaskFullbody()
Определения EmoteBase.c:80
Определения EmoteBase.c:2
static const int FORCE_NONE
Определения EmoteManager.c:61
static const int FORCE_DIFFERENT
Определения EmoteManager.c:62
Определения EmoteManager.c:60
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
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_SITA
Определения 3_Game/DayZ/constants.c:381
const int ID_EMOTE_THUMB
Определения 3_Game/DayZ/constants.c:376
const int ID_EMOTE_RPS_S
Определения 3_Game/DayZ/constants.c:403
const int ID_EMOTE_SUICIDE
Определения 3_Game/DayZ/constants.c:378
const int ID_EMOTE_RPS_R
Определения 3_Game/DayZ/constants.c:401
const int ID_EMOTE_THUMBDOWN
Определения 3_Game/DayZ/constants.c:383
const int MENU_GESTURES
Определения 3_Game/DayZ/constants.c:200
const int MENU_INVENTORY
Определения 3_Game/DayZ/constants.c:186

Перекрестные ссылки CALLBACK_CMD_END, CALLBACK_CMD_GESTURE_INTERRUPT, CALLBACK_CMD_INSTACANCEL, CALLBACK_CMD_INVALID, ClearDeferredExecution(), ClearEmoteLauncher(), ClearSurrenderState(), CommitSuicide(), CreateEmoteCBFromMenu(), DayZPlayerUtils(), DetermineGestureIndex(), EndCallbackCommand(), EmoteLauncher::FORCE_DIFFERENT, EmoteLauncher::FORCE_NONE, g_Game, EmoteBase::GetStanceMaskFullbody(), EmoteConstants::ID_EMOTE_RPS, EmoteConstants::ID_EMOTE_RPS_P, EmoteConstants::ID_EMOTE_RPS_R, EmoteConstants::ID_EMOTE_RPS_S, EmoteConstants::ID_EMOTE_SITA, EmoteConstants::ID_EMOTE_SUICIDE, EmoteConstants::ID_EMOTE_THUMB, EmoteConstants::ID_EMOTE_THUMBDOWN, InterruptCallbackCommand(), InterruptGestureCheck(), InterruptWaterCheck(), IsEmotePlaying(), m_bEmoteIsPlaying, m_bEmoteIsRequestPending, m_Callback, m_CancelEmote, m_CurrentGestureID, m_DeferredEmoteExecution, m_DeferredEmoteLauncherCleanup, m_DeferredGuaranteedEmoteId, m_DisconnectEmoteQueued, m_GestureInterruptInput, m_HIC, m_InstantCancelEmote, m_LastMask, m_MenuEmote, m_NameEmoteMap, m_Player, m_RPSOutcome, MENU_GESTURES, MENU_INVENTORY, OnEmoteEnd(), PlayEmote(), SendEmoteRequestSync(), SendEmoteRequestSyncEx(), SetEmoteLockState() и SetPending().