DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
EmoteManager.c
См. документацию.
2{
4 int m_callbackID; //Animation cmd ID
7
8 void ~EmoteCB()
9 {
10 if (m_Manager)
11 {
12 m_Manager.OnCallbackEnd();
13 }
14
15 if (g_Game && m_player)
16 m_player.RequestHandAnimationStateRefresh();
17 }
18
20 {
21 return false;
22 }
23
25 {
26 return IsGestureCallback();
27 }
28
29 override void OnAnimationEvent(int pEventID)
30 {
31 switch (pEventID)
32 {
34
35 if (g_Game.IsServer())
36 m_Manager.KillPlayer();
37
38 m_Manager.LogSuicide();
39 break;
40
41 case UA_ANIM_EVENT :
42 if (m_callbackID == DayZPlayerConstants.CMD_GESTUREFB_SURRENDERIN)
43 m_Manager.m_ItemToBeCreated = true;
44 break;
45
47 if (g_Game.IsServer())
48 m_Manager.CreateBleedingEffect(m_callbackID);
49 break;
50
52 m_player.DeathDropHandEntity();
53 m_player.StartDeath();
54 break;
55 }
56 }
57
58 override bool IsGestureCallback()
59 {
60 return true;
61 }
62};
63
65{
66 static const int FORCE_NONE = 0;
67 static const int FORCE_DIFFERENT = 1;
68 static const int FORCE_ALL = 2;
69
71 protected bool m_IsStartGuaranteed; //remains in queue until played or canceled directly (logout sit pose etc.)
72 protected bool m_SyncRequestSent;
73 protected int m_ForcePlayEmote;
74 protected int m_ID;
75
76 void EmoteLauncher(int emoteID, bool interrupts_same)
77 {
78 m_ID = emoteID;
79 m_InterruptsSameIDEmote = interrupts_same;
81 m_IsStartGuaranteed = false;
82 m_SyncRequestSent = false;
83 }
84
85 void SetForced(int mode)
86 {
87 m_ForcePlayEmote = mode;
88 }
89
91 {
92 return m_ForcePlayEmote;
93 }
94
95 int GetID()
96 {
97 return m_ID;
98 }
99
100 void SetStartGuaranteed(bool guaranted)
101 {
102 m_IsStartGuaranteed = guaranted;
103 }
104
106 {
107 return m_IsStartGuaranteed;
108 }
109
111 {
112 m_SyncRequestSent = true;
113 }
114
116 {
117 return m_SyncRequestSent;
118 }
119}
120
121class EmoteManager
122{
138 protected bool m_DisconnectEmoteQueued; //reaction to client logging out
139 protected bool m_DeferredEmoteLauncherCleanup; //safe cleanup from the outside
140 protected bool m_ItemToHands; //deprecated
141 protected bool m_ItemIsOn;
142 protected bool m_MouseButtonPressed;
143 protected bool m_PlayerDies;
144 protected bool m_controllsLocked;
146 protected bool m_EmoteLockState;
147 protected int m_DeferredGuaranteedEmoteId; //secondary emote ID to ensure playback
149 protected int m_GestureID;
150 protected int m_PreviousGestureID;
151 protected int m_CurrentGestureID;
152 protected int m_LastMask;
153 protected int m_RPSOutcome;
155 protected const int CALLBACK_CMD_INVALID = -1;
156 protected const int CALLBACK_CMD_END = -2;
157 protected const int CALLBACK_CMD_GESTURE_INTERRUPT = -3;
158 protected const int CALLBACK_CMD_INSTACANCEL = -4;
159 PluginAdminLog m_AdminLog;
161
162 protected ref map<int, ref EmoteBase> m_NameEmoteMap; //<emote_ID,EmoteBase>
163 protected ref array<ref EmoteBase> m_EmoteClassArray; //registered 'EmoteBase' object refs
164 protected ref array<int> m_EmoteIDs; //IDs of registered emotes (found in 'EmoteConstants'). For quick access.
165 protected ref array<int> m_EmoteInputIDs; //input IDs for the registered 'EmoteBase' objects
167
169 {
170 m_Player = player;
171 m_HIC = m_Player.GetInputController();
172 m_ItemIsOn = false;
173 m_controllsLocked = false;
177 m_RPSOutcome = -1;
180
182 m_InterruptInputs.Insert("UAMoveForward");
183 m_InterruptInputs.Insert("UAMoveBack");
184 m_InterruptInputs.Insert("UATurnLeft");
185 m_InterruptInputs.Insert("UATurnRight");
186 m_InterruptInputs.Insert("UAMoveLeft");
187 m_InterruptInputs.Insert("UAMoveRight");
188 m_InterruptInputs.Insert("UAStand");
189 m_InterruptInputs.Insert("UACrouch");
190 m_InterruptInputs.Insert("UAProne");
191 m_InterruptInputs.Insert("UAGetOver");
192
194 m_HandInventoryLocation.SetHands(m_Player, null);
195
196 if (g_Game.IsServer())
197 {
198 m_AdminLog = PluginAdminLog.Cast(GetPlugin(PluginAdminLog));
199 }
200
202 m_ReservationTimer.Run(8, this, "CheckEmoteLockedState", null, true);
203
204 m_HumanSwimSettings = m_Player.GetDayZPlayerType().CommandSwimSettingsW();
205
207 }
208
210 {
211 if (m_ReservationTimer && m_ReservationTimer.IsRunning())
212 m_ReservationTimer.Stop();
213 }
214
216 {
218 if (!m_NameEmoteMap)
219 {
224 int inputID;
225 int count = m_NameEmoteMap.Count();
226 UAInput inp;
227
228 for (int i = 0; i < count; i++)
229 {
230 m_EmoteClassArray.Insert(m_NameEmoteMap.GetElement(i));
231 m_EmoteIDs.Insert(m_NameEmoteMap.GetElement(i).GetID());
232 inp = GetUApi().GetInputByName(m_NameEmoteMap.GetElement(i).GetInputActionName());
233 inputID = inp.ID();
234 m_EmoteInputIDs.Insert(inputID);
235 }
236
237 if (m_EmoteInputIDs.Count() != m_EmoteClassArray.Count())
238 {
239 ErrorEx("Faulty emote data detected in 'ConstructData' method!",ErrorExSeverity.WARNING);
240 }
241 }
242 }
243
244 void SetGesture(int id)
245 {
246 m_GestureID = id;
247 }
248
250 {
251 return m_GestureID;
252 }
253
255 {
256 int count = m_EmoteInputIDs.Count();
257 for (int i = 0; i < count; ++i)
258 {
259 if (GetUApi().GetInputByID(m_EmoteInputIDs[i]).LocalPress())
260 {
261 return m_EmoteIDs[i];
262 }
263 }
264
265 return 0;
266 }
267
269 bool DetermineEmoteData(EmoteBase emote, out int callback_ID, out int stancemask, out bool is_fullbody)
270 {
271 if (emote.DetermineOverride(callback_ID, stancemask, is_fullbody))
272 {
273 return emote.EmoteFBStanceCheck(stancemask);
274 }
275 else if (emote.GetAdditiveCallbackUID() != 0 && m_Player.IsPlayerInStance(emote.GetStanceMaskAdditive()))
276 {
277 callback_ID = emote.GetAdditiveCallbackUID();
278 stancemask = emote.GetStanceMaskAdditive();
279 is_fullbody = false;
280 return true;
281 }
282 else if (emote.GetFullbodyCallbackUID() != 0 && emote.EmoteFBStanceCheck(emote.GetStanceMaskFullbody()))
283 {
284 callback_ID = emote.GetFullbodyCallbackUID();
285 stancemask = emote.GetStanceMaskFullbody();
286 is_fullbody = true;
287 return true;
288 }
289
290 return false;
291 }
292
293 void SetPending(bool state)
294 {
296 }
297
298 //Called from players commandhandler each frame, checks input
299 void Update(float deltaT)
300 {
301 // no updates on restrained characters
302 if (m_Player.IsRestrained())
303 return;
304
306 {
307 if (g_Game.IsServer() && m_Callback && !m_Player.GetItemInHands())
308 {
309 m_Player.GetHumanInventory().CreateInHands("SurrenderDummyItem");
310 }
311 m_ItemToBeCreated = false;
312 }
313
314 int gestureSlot = 0;
315 #ifndef SERVER
316 gestureSlot = DetermineGestureIndex();
317 #endif
318
319 //nuclear solution to inventory question
320 if (g_Game.IsClient() && g_Game.GetUIManager().FindMenu(MENU_INVENTORY) && IsEmotePlaying())
321 m_Player.CloseInventoryMenu();
322
323 //deferred emote cancel
324 if (m_InstantCancelEmote) //'hard' cancel
325 {
326 if (m_Callback)
327 m_Callback.Cancel();
328
331 m_InstantCancelEmote = false;
332 SetPending(false);
333
334 if (m_IsSurrendered)
336 else
337 SetEmoteLockState(false);
338 }
339 else if (m_CancelEmote) //'soft' cancel
340 {
341 SetPending(false);
342 m_CancelEmote = false;
343
344 if (m_IsSurrendered)
346 else if (m_Callback)
347 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_INTERRUPT);
348 }
349
351 {
352 ClearEmoteLauncher(true);
354 }
355
356 //if (m_DisconnectEmoteQueued && (!m_bEmoteIsPlaying && !m_bEmoteIsRequestPending))
358 {
359 if (!m_MenuEmote || !m_MenuEmote.IsStartGuaranteed())
360 {
363 m_MenuEmote.SetStartGuaranteed(true);
364
365 EmoteBase emote = EmoteBase.Cast(m_NameEmoteMap.Get(m_MenuEmote.GetID()));
366 int stanceIdx = DayZPlayerUtils.ConvertStanceMaskToStanceIdx(emote.GetStanceMaskFullbody());
367
368 //if the emote cannot be played, don't sent a request to server
369 if (!DayZPlayerUtils.PlayerCanChangeStance(m_Player, stanceIdx))
370 {
371 m_MenuEmote = null; //setting this to null also ensures that the forcedEmotQueuedClient below is also false
373 }
374 }
375 }
376
377 bool forcedEmoteQueuedClient = m_MenuEmote && !m_MenuEmote.WasSynced() && m_MenuEmote.GetForced() > EmoteLauncher.FORCE_NONE && !g_Game.IsDedicatedServer();
378 if (forcedEmoteQueuedClient) //regular forced emote playing
379 {
381 }
382 else if (m_Callback)
383 {
384 bool uiGesture = false;
385 if (!g_Game.IsDedicatedServer())
386 {
387 uiGesture = g_Game.GetUIManager().IsMenuOpen(MENU_GESTURES);
388
390 {
392 }
393
395 {
397 }
398 }
399
400 if (gestureSlot > 0 || m_GestureInterruptInput || (m_HIC.IsSingleUse() && !uiGesture) || (m_HIC.IsContinuousUseStart() && !uiGesture) || (m_Callback.m_IsFullbody && !uiGesture && m_HIC.IsWeaponRaised()))
401 {
403 {
404 if (m_Callback.GetState() == m_Callback.STATE_LOOP_LOOP)
405 {
407 }
408 else
409 {
410 return;
411 }
412 }
414 {
415 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_ACTION);
416 }
418 {
419 if (m_RPSOutcome != -1)
420 {
421 if (m_RPSOutcome == 0)
422 {
423 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_RPS_ROCK);
424 }
425 else if (m_RPSOutcome == 1)
426 {
427 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_RPS_PAPER);
428 }
429 else if (m_RPSOutcome == 2)
430 {
431 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_RPS_SCISSORS);
432 }
433 m_RPSOutcome = -1;
434 }
435 else
436 {
437 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_END);
438 }
439 }
441 {
443 }
445 {
447 }
448 }
449
450 if (m_LastMask != -1 && m_Player.IsPlayerInStance(DayZPlayerConstants.STANCEMASK_PRONE))
451 {
452 m_Callback.Cancel();
453 }
454
455 if (m_MenuEmote && !m_MenuEmote.IsStartGuaranteed() && m_bEmoteIsPlaying)
456 {
458 }
459
461 {
463 }
464
466 {
468 }
469 }
470 //no m_Callback exists
471 else
472 {
473 if (m_bEmoteIsRequestPending && (m_Player.IsUnconscious() || !m_Player.IsAlive()))
474 {
475 SetPending(false);
476 }
477
479 {
480 OnEmoteEnd();
481 }
482 else if (!m_Player.GetItemInHands() && m_IsSurrendered && !m_ItemToBeCreated && (!m_MenuEmote || m_MenuEmote.GetForced() != EmoteLauncher.FORCE_NONE)) //play only when there is time to do so
483 {
484 PlaySurrenderInOut(false);
485 return;
486 }
487 // getting out of surrender state
488 else if (m_IsSurrendered && m_Player.GetItemInHands() && (m_HIC.IsSingleUse() || m_HIC.IsContinuousUseStart() || m_HIC.IsWeaponRaised()))
489 {
490 if (m_Player.GetItemInHands())
491 m_Player.GetItemInHands().DeleteSafe();//Note, this keeps item 'alive' until it is released by all the systems (inventory swapping etc.)
492 return;
493 }
494 // fallback in case lock does not end properly
495 else if (m_IsSurrendered && (!m_Player.GetItemInHands() || (m_Player.GetItemInHands() && m_Player.GetItemInHands().GetType() != "SurrenderDummyItem" && m_EmoteLockState)))
496 {
498 return;
499 }
500 //actual emote launch
502 {
504 //m_DeferredGuaranteedEmoteId = CALLBACK_CMD_INVALID;
505 }
507 {
510 }
511 //client-side emote launcher
512 else if (!m_bEmoteIsPlaying && m_MenuEmote && !m_MenuEmote.WasSynced() && !g_Game.IsDedicatedServer())
513 {
515 }
516 else if (!m_MenuEmote && gestureSlot > 0)
517 {
518 CreateEmoteCBFromMenu(gestureSlot,true); //translation no longer needed
519 }
520 }
521 }
522
524 {
526
527 if (m_PlayerDies)
528 {
529 m_Player.SetHealth(0.0);
530 return;
531 }
532
534 m_bEmoteIsPlaying = false;
535 SetPending(false);
536
537 if (m_IsSurrendered)
538 return;
539
541 SetEmoteLockState(false);
542
543 // back to the default - shoot from camera - if not set already
544 if (!m_Player.IsShootingFromCamera())
545 m_Player.OverrideShootFromCamera(true);
546 }
547
548 //server-side
549 bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
550 {
551 if (userDataType == INPUT_UDT_GESTURE)
552 {
553 int forced = EmoteLauncher.FORCE_NONE;
554 int gestureID = -1;
555 int cancelID = 0;
556 int random = -1;
557 bool guaranteed = false;
558
559 if (!ctx.Read(gestureID))
560 {
561 cancelID = CALLBACK_CMD_INSTACANCEL; //fallback solution in case of severe data corruption
562 }
563 else
564 {
565 ctx.Read(forced);
566 ctx.Read(guaranteed);
567 if (ctx.Read(random))
568 m_RPSOutcome = random;
569 //server-side check, sends CALLBACK_CMD_INSTACANCEL as a fail
570 bool canPlay = CanPlayEmote(gestureID);
571 if (!canPlay && (forced == EmoteLauncher.FORCE_NONE || !m_Player.GetCommand_Move())) //HOTFIX for swim and such
572 {
573 gestureID = CALLBACK_CMD_INVALID;
574 cancelID = CALLBACK_CMD_INSTACANCEL;
575 }
576 }
577
579 pCtx.Write(gestureID);
580 pCtx.Write(cancelID);
581 pCtx.Write(forced);
582 pCtx.Write(guaranteed);
584 SetPending(true);
585
586 return true;
587 }
588 return false;
589 }
590
591 //server and client
592 void OnSyncJuncture(int pJunctureID, ParamsReadContext pCtx)
593 {
594 int gestureID;
595 int cancelID;
596 int forced;
597 bool guaranteed;
598
599 if (!m_CancelEmote)
600 {
601 pCtx.Read(gestureID);
602 pCtx.Read(cancelID);
603 pCtx.Read(forced);
604 pCtx.Read(guaranteed);
605
606 if (gestureID != 0)
607 {
608 // Check if player's state has changed since request was sent
609 if (m_Player.IsSwimming())
610 {
611 // Player is now in water - reject the emote
612 gestureID = CALLBACK_CMD_INVALID;
613 cancelID = CALLBACK_CMD_INSTACANCEL;
617 // Notify server about it
618 if (g_Game.IsClient())
619 {
620 SendEmoteRequestSync(CALLBACK_CMD_INSTACANCEL); // Tell server we're cancelling
621 }
622 return;
623 }
624 }
625
626 EmoteBase emoteData;
627 if ((m_Callback || m_IsSurrendered) && (forced == EmoteLauncher.FORCE_ALL || (forced == EmoteLauncher.FORCE_DIFFERENT && m_CurrentGestureID != gestureID)))
628 {
629 if (m_Callback)
630 {
631 if (m_NameEmoteMap.Find(m_CurrentGestureID,emoteData) && emoteData.CanBeCanceledNormally(m_Callback))
632 m_CancelEmote = true;
633 else
634 return;
635 }
636 m_CancelEmote = true;
637 }
638
639 if (cancelID == CALLBACK_CMD_INSTACANCEL)
640 {
641 if (m_Callback)
642 {
643 if (m_NameEmoteMap.Find(m_CurrentGestureID,emoteData) && !emoteData.CanBeCanceledNormally(m_Callback))
644 {
645 m_InstantCancelEmote = false;
646 return;
647 }
648 }
650 }
651
652 if (guaranteed)
653 m_DeferredGuaranteedEmoteId = gestureID;
654 m_DeferredEmoteExecution = gestureID;
655 }
656 else
657 m_CancelEmote = false;
658 }
659
661 {
662 EmoteBase emoteData;
663 if (m_NameEmoteMap.Find(m_CurrentGestureID,emoteData))
664 emoteData.OnCallbackEnd();
665 }
666
668 {
669 if (m_Player.GetItemInHands() && SurrenderDummyItem.Cast(m_Player.GetItemInHands()))
670 m_Player.GetItemInHands().Delete();
671 }
672
673 bool PlayEmote(int id)
674 {
679 SetPending(false);
680
681 //if (CanPlayEmote(id))
682 {
683 EmoteBase emote;
684 m_NameEmoteMap.Find(id,emote);
685
686 if (m_AdminLog)
687 m_AdminLog.OnEmote(m_Player, emote);
688
691 if (id > 0)
692 {
693 if (emote)
694 {
695 int callback_ID;
696 int stancemask;
697 bool is_fullbody;
698 if (DetermineEmoteData(emote,callback_ID,stancemask,is_fullbody))
699 {
700 if (!emote.EmoteStartOverride(EmoteCB,callback_ID,stancemask,is_fullbody))
701 {
702 emote.OnBeforeStandardCallbackCreated(callback_ID,stancemask,is_fullbody);
703 CreateEmoteCallback(EmoteCB,callback_ID,stancemask,is_fullbody);
704 }
705
706 if (emote.GetHideItemInHands())
707 {
709 }
710 }
711 else
712 {
713 ErrorEx("EmoteManager | DetermineEmoteData failed!");
714 }
715 }
716 }
717 }
718
720 return m_bEmoteIsPlaying;
721 }
722
723 //creates Emote callback
724 protected void CreateEmoteCallback(typename callbacktype, int id, int mask, bool fullbody)
725 {
726 if (m_Player)
727 {
728 m_LastMask = -1;
729
730 if (fullbody)
731 {
732 Class.CastTo(m_Callback, m_Player.StartCommand_Action(id,callbacktype,mask));
733 m_Callback.m_IsFullbody = true;
734 m_Callback.EnableCancelCondition(true);
735 }
736 else if (m_Player.IsPlayerInStance(mask))
737 {
738 m_LastMask = mask; //character is probably not prone now
739 Class.CastTo(m_Callback, m_Player.AddCommandModifier_Action(id,callbacktype));
740 }
741
742 if (m_Callback)
743 {
744 m_bEmoteIsPlaying = true;
745 m_Callback.m_callbackID = id;
746 m_Callback.m_player = m_Player;
747 m_Callback.m_Manager = this;
748 }
749 }
750 }
751
752 protected void HideItemInHands()
753 {
754 m_item = m_Player.GetItemInHands();
755 if (m_Callback && m_item)
756 {
757 m_Player.TryHideItemInHands(true);
758 }
759 }
760
761 protected void ShowItemInHands()
762 {
763 if (m_item)
764 {
765 m_Player.TryHideItemInHands(false);
766 }
767 }
768
770 {
771 if (!g_Game.IsClient())
773 }
774
775 protected void CommitSuicide()
776 {
777 Weapon_Base weapon;
778 WeaponEventBase weapon_event = new WeaponEventTrigger;
779
780 if (Weapon_Base.CastTo(weapon,m_Player.GetItemInHands()))
781 {
782 if (weapon.CanFire())
783 {
784 m_Callback.RegisterAnimationEvent("Simulation_End",EmoteConstants.EMOTE_SUICIDE_SIMULATION_END);
785 m_Player.SetSuicide(true);
786 weapon.ProcessWeaponEvent(weapon_event);
787 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_FINISH);
788 if (m_Player.IsAlive())
789 {
790 EntityAI helm = m_Player.FindAttachmentBySlotName("Headgear");
791 if (helm && g_Game.IsServer())
792 {
793 float damage = helm.GetMaxHealth("","");
794 helm.AddHealth("","", -damage/2);
795 }
796 g_Game.GetCallQueue(CALL_CATEGORY_GAMEPLAY).Call(this.KillPlayer);
797 if (m_AdminLog)
798 {
799 m_AdminLog.Suicide(m_Player);
800 }
801 }
802 }
803 else
804 {
805 if (!weapon.IsDamageDestroyed())
806 {
807 weapon.ProcessWeaponEvent(weapon_event);
808 }
809 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_END);
810 }
811 }
812 else if (m_Player.GetItemInHands() && m_Player.GetItemInHands().ConfigIsExisting("suicideAnim"))
813 {
814 m_Callback.RegisterAnimationEvent("Death",EmoteConstants.EMOTE_SUICIDE_DEATH);
815 m_Callback.RegisterAnimationEvent("Bleed",EmoteConstants.EMOTE_SUICIDE_BLEED);
816 m_Callback.RegisterAnimationEvent("Simulation_End",EmoteConstants.EMOTE_SUICIDE_SIMULATION_END);
817 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_FINISH);
818 m_Player.SetSuicide(true);
819 }
820 else
821 {
822 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_FINISH);
823 }
824 }
825
827 {
828 if (g_Game.IsServer())
829 {
830 m_Player.SetHealth(0);
831 }
832 }
833
835 {
836 if (g_Game.IsServer())
837 {
838 PlayerIdentity identity = m_Player.GetIdentity();
839 if (identity)
840 {
841 if (m_AdminLog)
842 m_AdminLog.Suicide(m_Player);
843 }
844 }
845 }
846
847 void CreateEmoteCBFromMenu(int id, bool interrupts_same = false)
848 {
849 if (ClearEmoteLauncher())
850 m_MenuEmote = new EmoteLauncher(id,interrupts_same);
851 }
852
853 protected bool ClearEmoteLauncher(bool forced = false)
854 {
855 if (!forced && m_MenuEmote && m_MenuEmote.IsStartGuaranteed())
856 return false;
857
858 m_MenuEmote = null;
859 return true;
860 }
861
862 protected bool ClearDeferredExecution()
863 {
865 return true;
866 }
867
869 {
870 return m_MenuEmote;
871 }
872
874 {
875 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_INTERRUPT);
876
879 }
880
882 {
884 {
885 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_INTERRUPT);
886 }
887 else
888 {
889 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_END);
890 }
891
894 }
895
896 //sends request (client)
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 }
972
974 protected void SendEmoteRequestSyncEx(notnull EmoteLauncher launcher)
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 }
1053
1055 {
1056 return m_controllsLocked;
1057 }
1058
1059 bool CanPlayEmote(int id)
1060 {
1061 //special cases
1063 {
1064 return true;
1065 }
1066
1067 if (!m_Player || !m_Player.IsAlive() || (!IsEmotePlaying() && (m_Player.GetCommand_Action() || m_Player.GetCommandModifier_Action())) || m_Player.GetThrowing().IsThrowingModeEnabled())
1068 {
1069 return false;
1070 }
1071
1072 ItemBase item = m_Player.GetItemInHands();
1073 if (item)
1074 {
1075 if (item.IsHeavyBehaviour() && id != EmoteConstants.ID_EMOTE_SURRENDER)
1076 {
1077 return false;
1078 }
1079
1080 SurrenderDummyItem sda;
1081 if (m_Player.IsItemsToDelete() && Class.CastTo(sda,item) && !sda.IsSetForDeletion())
1082 {
1083 return false;
1084 }
1085 }
1086
1087 if ((m_Player.GetWeaponManager() && m_Player.GetWeaponManager().IsRunning()) || (m_Player.GetActionManager() && m_Player.GetActionManager().GetRunningAction()))
1088 {
1089 return false;
1090 }
1091
1092 if (m_HIC.IsWeaponRaised() || m_Player.IsRolling() || m_Player.IsClimbing() || m_Player.IsRestrainStarted() || m_Player.IsFighting() || m_Player.IsSwimming() || m_Player.IsClimbingLadder() || m_Player.IsFalling() || m_Player.IsUnconscious() || m_Player.IsJumpInProgress() || m_Player.IsRestrained()) // rework conditions into something better?
1093 {
1094 return false;
1095 }
1096
1097 if (m_Player.GetCommand_Vehicle())
1098 {
1099 return false;
1100 }
1101
1102 HumanCommandMove cm = m_Player.GetCommand_Move();
1103 if (cm)
1104 {
1105 if (cm.IsOnBack() && id != EmoteConstants.ID_EMOTE_SURRENDER)
1106 return false;
1107 if (cm.IsChangingStance())
1108 return false;
1109 }
1110
1111 //"locks" player in surrender state
1113 {
1114 return false;
1115 }
1116
1117 if (m_Player.GetDayZPlayerInventory().IsProcessing())
1118 {
1119 return false;
1120 }
1121
1122 EmoteBase emote;
1123 if (m_NameEmoteMap.Find(id,emote))
1124 {
1125 int callback_ID;
1126 int stancemask;
1127 bool is_fullbody;
1128 if (DetermineEmoteData(emote,callback_ID,stancemask,is_fullbody) && emote.EmoteCondition(stancemask))
1129 {
1130 return true;
1131 }
1132 }
1133
1134 return false;
1135 }
1136
1138 {
1139 if (!g_Game.IsClient())
1140 return true;
1141
1142 if (g_Game.GetUIManager().FindMenu(MENU_INVENTORY))
1143 {
1144 return false;
1145 }
1146
1147 return true;
1148 }
1149
1150 // is player able to perform the animation at the moment
1151 /*bool CanPerformEmoteAnimation(int id)
1152 {
1153
1154 }*/
1155
1156 void PlaySurrenderInOut(bool state)
1157 {
1160
1161 if (state)
1162 {
1163 ItemBase item = m_Player.GetItemInHands();
1164 if (item)
1165 {
1166 if (!m_Player.CanDropEntity(item))
1167 return;
1168
1169 if (m_Player.GetInventory().HasInventoryReservation(null, m_HandInventoryLocation))
1170 m_Player.GetInventory().ClearInventoryReservationEx(null, m_HandInventoryLocation);
1171
1172 if (g_Game.IsMultiplayer())
1173 {
1174 if (g_Game.IsServer())
1175 m_Player.ServerDropEntity(item);
1176 }
1177 else
1178 {
1179 m_Player.PhysicalPredictiveDropItem(item); //SP only
1180 }
1181 }
1182
1183 CreateEmoteCallback(EmoteCB,DayZPlayerConstants.CMD_GESTUREFB_SURRENDERIN,DayZPlayerConstants.STANCEMASK_ALL,true);
1184
1185 if (m_Callback)
1186 {
1187 m_Callback.RegisterAnimationEvent("ActionExec", UA_ANIM_EVENT);
1188 }
1189 }
1190 else
1191 {
1192 if (m_Player.IsAlive() && !m_Player.IsUnconscious())
1193 {
1194 CreateEmoteCallback(EmoteCB,DayZPlayerConstants.CMD_GESTUREFB_SURRENDEROUT,DayZPlayerConstants.STANCEMASK_ALL,true);
1195 }
1196 else
1197 {
1198 OnEmoteEnd();
1199 }
1200 }
1201 }
1202
1204 void SetEmoteLockState(bool state)
1205 {
1206 //separate inventory access locking
1207 if (state != m_InventoryAccessLocked)
1208 {
1209 m_Player.SetInventorySoftLock(state);
1211 }
1212
1213 if (g_Game.IsClient() && m_InventoryAccessLocked && g_Game.GetUIManager().FindMenu(MENU_INVENTORY))
1214 m_Player.CloseInventoryMenu();
1215
1216 //Movement lock in fullbody anims
1217 if (state && m_Callback && m_Callback.m_IsFullbody)
1218 m_controllsLocked = true;
1219 else
1220 m_controllsLocked = false;
1221
1222 if (state == m_EmoteLockState)
1223 return;
1224
1226 {
1228 m_HandInventoryLocation.SetHands(m_Player,null);
1229 }
1230
1231 if (!state)
1232 {
1233 if (m_Player.GetInventory().HasInventoryReservation(null, m_HandInventoryLocation))
1234 m_Player.GetInventory().ClearInventoryReservationEx(null, m_HandInventoryLocation);
1235
1236 if (m_Player.GetActionManager())
1237 m_Player.GetActionManager().EnableActions(true);
1238 }
1239 else
1240 {
1241 if (!m_Player.GetInventory().HasInventoryReservation(null, m_HandInventoryLocation))
1242 m_Player.GetInventory().AddInventoryReservationEx(null, m_HandInventoryLocation, GameInventory.c_InventoryReservationTimeoutMS);
1243
1244 if (m_Player.GetActionManager())
1245 m_Player.GetActionManager().EnableActions(false);
1246 }
1247 m_EmoteLockState = state;
1248 }
1249
1251 {
1252 if (!m_Player.GetItemInHands() || (m_Player.GetItemInHands() && !SurrenderDummyItem.Cast(m_Player.GetItemInHands())))
1253 return;
1254
1255 //refreshes reservation in case of unwanted timeout
1257 {
1258 m_Player.GetInventory().ExtendInventoryReservationEx(null, m_HandInventoryLocation, 10000);
1259 }
1260 }
1261
1264 {
1265 if (m_IsSurrendered && data)
1266 {
1268 data.End();
1269 }
1270 }
1271
1272 void SetClientLoggingOut(bool state)
1273 {
1275
1276 if (!state)
1277 {
1278 if (m_MenuEmote)
1280 }
1281 }
1282
1284 protected void ClearSurrenderState()
1285 {
1286 if (m_IsSurrendered)
1287 {
1288 SurrenderDummyItem dummyItem = SurrenderDummyItem.Cast(m_Player.GetItemInHands());
1289 if (dummyItem)
1290 dummyItem.DeleteSafe();
1291
1292 m_IsSurrendered = false;
1293 SetEmoteLockState(false);
1294 m_ItemToBeCreated = false;
1295 }
1296 }
1297
1298 void ForceSurrenderState(bool state)
1299 {
1300 m_IsSurrendered = state;
1302 }
1303
1306 {
1307 if ((g_Game.IsMultiplayer() && g_Game.IsServer()) || !g_Game.IsMultiplayer())
1308 {
1312 m_Player.SendSyncJuncture(DayZPlayerSyncJunctures.SJ_GESTURE_REQUEST, pCtx);
1313 }
1314 }
1315
1316 //sent from server to cancel generic emote callback
1324
1326 {
1327 //init pass
1329 {
1332
1333 for (int i = 0; i < m_InterruptInputsCount; i++)
1334 {
1335 m_InterruptInputDirect.Insert(GetUApi().GetInputByName(m_InterruptInputs[i]).GetPersistentWrapper());
1336 }
1337 }
1338
1339 //interrupts any callback if restrain action is in progress, takes priority
1340 if (!m_Callback.m_IsFullbody)
1341 return false;
1342
1343 for (int idx = 0; idx < m_InterruptInputsCount; idx++)
1344 {
1345 if (m_InterruptInputDirect[idx].InputP().LocalPress())
1346 {
1347 return true;
1348 }
1349 }
1350
1351 return false;
1352 }
1353
1355 {
1356 float waterLevel = m_Player.GetCurrentWaterLevel();
1357
1358 if (m_Player.IsPlayerInStance(DayZPlayerConstants.STANCEMASK_PRONE | DayZPlayerConstants.STANCEMASK_RAISEDPRONE) && waterLevel >= m_HumanSwimSettings.m_fToCrouchLevel)
1359 {
1360 return true;
1361 }
1362 else if (m_Player.IsPlayerInStance(DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEIDX_RAISEDCROUCH) && waterLevel >= m_HumanSwimSettings.m_fToErectLevel)
1363 {
1364 return true;
1365 }
1366
1367 return m_Player.GetModifiersManager() && m_Player.GetModifiersManager().IsModifierActive(eModifiers.MDF_DROWNING);
1368 }
1369
1374
1379
1380 void CreateBleedingEffect(int Callback_ID)
1381 {
1382 if (g_Game.IsServer() && m_Player.IsAlive())
1383 {
1384 switch (Callback_ID)
1385 {
1386 case DayZPlayerConstants.CMD_SUICIDEFB_1HD :
1387 m_Player.GetBleedingManagerServer().AttemptAddBleedingSourceBySelection("Neck");
1388 break;
1389
1390 case DayZPlayerConstants.CMD_SUICIDEFB_FIREAXE :
1391 m_Player.GetBleedingManagerServer().AttemptAddBleedingSourceBySelection("LeftForeArmRoll");
1392 break;
1393
1394 case DayZPlayerConstants.CMD_SUICIDEFB_PITCHFORK :
1395 m_Player.GetBleedingManagerServer().AttemptAddBleedingSourceBySelection("Spine2");
1396 break;
1397
1398 case DayZPlayerConstants.CMD_SUICIDEFB_SWORD :
1399 m_Player.GetBleedingManagerServer().AttemptAddBleedingSourceBySelection("Spine2");
1400 break;
1401
1402 case DayZPlayerConstants.CMD_SUICIDEFB_SPEAR :
1403 m_Player.GetBleedingManagerServer().AttemptAddBleedingSourceBySelection("Head");
1404 break;
1405
1406 case DayZPlayerConstants.CMD_SUICIDEFB_WOODAXE :
1407 m_Player.GetBleedingManagerServer().AttemptAddBleedingSourceBySelection("LeftForeArmRoll");
1408 break;
1409
1410 default :
1411 ErrorEx("EmoteManager.c | CreateBleedingEffect | WRONG ID",ErrorExSeverity.INFO);
1412 break;
1413 }
1414 }
1415 }
1416
1419 protected void PickEmote(int gestureslot)
1420 {
1421 }
1422};
1423
1425{
1427 void End();
1428}
1429
1430/**@class ChainedDropAndKillPlayerLambda
1431 * @brief drops weapon in hands to ground and then calls kill
1432 **/
1434{
1436
1437 void ChainedDropAndKillPlayerLambda (EntityAI old_item, string new_item_type, PlayerBase player)
1438 {
1439 m_Player = player;
1441 vector mtx[4];
1442 old_item.GetTransform(mtx);
1443 gnd.SetGround(old_item, mtx);
1444
1445 OverrideNewLocation(gnd);
1446 }
1447
1448 override void Execute (HumanInventoryWithFSM fsm_to_notify = null)
1449 {
1450 if (PrepareLocations())
1451 {
1452 vector transform[4];
1453
1454 m_Player.GetInventory().TakeToDst(InventoryMode.SERVER, m_OldLocation, m_NewLocation);
1455 m_Player.OnItemInHandsChanged();
1456 }
1457
1458 m_Player.SetHealth(0);
1459
1460 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[syncinv] player=" + Object.GetDebugName(m_Player) + " STS = " + m_Player.GetSimulationTimeStamp() + " ChainedDropAndKillPlayerLambda");
1461 }
1462}
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
const int INPUT_UDT_GESTURE
map m_Player
DayZGame g_Game
Определения DayZGame.c:3942
void DayZPlayerUtils()
cannot be instantiated
Определения DayZPlayerUtils.c:465
override void OnCallbackEnd()
Определения EmoteClasses.c:866
void ChainedDropAndKillPlayerLambda(EntityAI old_item, string new_item_type, PlayerBase player)
Определения EmoteManager.c:1437
bool m_ItemToHands
Определения EmoteManager.c:140
bool m_DisconnectEmoteQueued
Определения EmoteManager.c:138
EmoteCB m_Callback
Определения EmoteManager.c:125
ref Timer m_ReservationTimer
Определения EmoteManager.c:160
ref array< int > m_EmoteInputIDs
Определения EmoteManager.c:165
bool ClearDeferredExecution()
Определения EmoteManager.c:862
const int CALLBACK_CMD_END
Определения EmoteManager.c:156
void ForceSurrenderState(bool state)
Определения EmoteManager.c:1298
void RequestCommitSuicide()
Определения EmoteManager.c:769
int m_InterruptInputsCount
Определения EmoteManager.c:154
void HideItemInHands()
Определения EmoteManager.c:752
void CheckEmoteLockedState()
Определения EmoteManager.c:1250
bool m_controllsLocked
Определения EmoteManager.c:144
void EmoteManager(PlayerBase player)
Определения EmoteManager.c:168
int m_RPSOutcome
Определения EmoteManager.c:153
void CreateEmoteCBFromMenu(int id, bool interrupts_same=false)
Определения EmoteManager.c:847
void AfterStoreLoad()
Определения EmoteManager.c:667
const int CALLBACK_CMD_INVALID
Определения EmoteManager.c:155
int m_CurrentGestureID
Определения EmoteManager.c:151
ref array< string > m_InterruptInputs
Определения EmoteManager.c:127
bool m_CancelEmote
Определения EmoteManager.c:135
bool CanPlayEmoteClientCheck(int id)
Определения EmoteManager.c:1137
ref array< int > m_EmoteIDs
Определения EmoteManager.c:164
bool CanPlayEmote(int id)
Определения EmoteManager.c:1059
int m_DeferredEmoteExecution
Определения EmoteManager.c:148
bool IsControllsLocked()
Определения EmoteManager.c:1054
bool m_DeferredEmoteLauncherCleanup
Определения EmoteManager.c:139
void ShowItemInHands()
Определения EmoteManager.c:761
int m_DeferredGuaranteedEmoteId
Определения EmoteManager.c:147
ItemBase m_item
Определения EmoteManager.c:124
PluginAdminLog m_AdminLog
Определения EmoteManager.c:159
ref InventoryLocation m_HandInventoryLocation
Определения EmoteManager.c:129
void InterruptCallbackCommand()
Определения EmoteManager.c:873
void SetPending(bool state)
Определения EmoteManager.c:293
void ConstructData()
Определения EmoteManager.c:215
void PostSurrenderRequestServer()
server only
Определения EmoteManager.c:1305
int m_LastMask
Определения EmoteManager.c:152
void PlaySurrenderInOut(bool state)
Определения EmoteManager.c:1156
int DetermineGestureIndex()
Определения EmoteManager.c:254
void CreateBleedingEffect(int Callback_ID)
Определения EmoteManager.c:1380
void SendEmoteRequestSyncEx(notnull EmoteLauncher launcher)
To avoid mixing m_MenuEmote with exceptional sync commands.
Определения EmoteManager.c:974
void SetGesture(int id)
Определения EmoteManager.c:244
map< int, ref EmoteBase > GetNameEmoteMap()
Определения EmoteManager.c:1375
void CommitSuicide()
Определения EmoteManager.c:775
bool m_GestureInterruptInput
Определения EmoteManager.c:137
void ClearSurrenderState()
Queues item deletion only, surrender state cleared from item event directly.
Определения EmoteManager.c:1284
bool m_InventoryAccessLocked
Определения EmoteManager.c:145
bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
Определения EmoteManager.c:549
const int CALLBACK_CMD_INSTACANCEL
Определения EmoteManager.c:158
void SetClientLoggingOut(bool state)
Определения EmoteManager.c:1272
void KillPlayer()
Определения EmoteManager.c:826
void OnEmoteEnd()
Определения EmoteManager.c:523
void ServerRequestEmoteCancel()
Определения EmoteManager.c:1317
void ~EmoteManager()
Определения EmoteManager.c:209
void EndSurrenderRequest(SurrenderData data=null)
directly force-ends surrender state AND requests hard cancel
Определения EmoteManager.c:1263
void SetEmoteLockState(bool state)
Определения EmoteManager.c:1204
bool ClearEmoteLauncher(bool forced=false)
Определения EmoteManager.c:853
ref EmoteLauncher m_MenuEmote
Определения EmoteManager.c:130
void CreateEmoteCallback(typename callbacktype, int id, int mask, bool fullbody)
Определения EmoteManager.c:724
bool InterruptGestureCheck()
Определения EmoteManager.c:1325
bool m_PlayerDies
Определения EmoteManager.c:143
bool InterruptWaterCheck()
Определения EmoteManager.c:1354
void OnSyncJuncture(int pJunctureID, ParamsReadContext pCtx)
Определения EmoteManager.c:592
int m_GestureID
Определения EmoteManager.c:149
void PickEmote(int gestureslot)
Deprecated.
Определения EmoteManager.c:1419
bool IsEmotePlaying()
Определения EmoteManager.c:1370
bool DetermineEmoteData(EmoteBase emote, out int callback_ID, out int stancemask, out bool is_fullbody)
Also includes a stance check for FB callbacks.
Определения EmoteManager.c:269
bool m_EmoteLockState
Определения EmoteManager.c:146
SHumanCommandSwimSettings m_HumanSwimSettings
Определения EmoteManager.c:166
override void Execute(HumanInventoryWithFSM fsm_to_notify=null)
Определения EmoteManager.c:1448
bool m_ItemToBeCreated
Определения EmoteManager.c:134
bool m_IsSurrendered
Определения EmoteManager.c:133
const int CALLBACK_CMD_GESTURE_INTERRUPT
Определения EmoteManager.c:157
ref map< int, ref EmoteBase > m_NameEmoteMap
Определения EmoteManager.c:162
HumanInputController m_HIC
Определения EmoteManager.c:126
ref array< ref EmoteBase > m_EmoteClassArray
Определения EmoteManager.c:163
void EndCallbackCommand()
Определения EmoteManager.c:881
bool m_bEmoteIsPlaying
Определения EmoteManager.c:132
void LogSuicide()
Определения EmoteManager.c:834
bool m_MouseButtonPressed
Определения EmoteManager.c:142
bool m_InstantCancelEmote
Определения EmoteManager.c:136
EmoteLauncher GetEmoteLauncher()
Определения EmoteManager.c:868
bool m_bEmoteIsRequestPending
Определения EmoteManager.c:131
bool m_ItemIsOn
Определения EmoteManager.c:141
void SendEmoteRequestSync(int id)
Определения EmoteManager.c:897
int m_PreviousGestureID
Определения EmoteManager.c:150
int GetGesture()
Определения EmoteManager.c:249
bool PlayEmote(int id)
Определения EmoteManager.c:673
ref array< UAIDWrapper > m_InterruptInputDirect
Определения EmoteManager.c:128
void hndDebugPrint(string s)
Определения HandFSM.c:1
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:325
proto native UAInputAPI GetUApi()
drops weapon in hands to ground and then calls kill
Определения EmoteManager.c:1425
Super root of all classes in Enforce script.
Определения EnScript.c:11
static const int SJ_GESTURE_REQUEST
Определения DayZPlayerSyncJunctures.c:22
void OnCallbackEnd()
bool EmoteFBStanceCheck(int stancemask)
Checks for valid stance mask.
Определения EmoteBase.c:23
bool CanBeCanceledNormally(notnull EmoteCB callback)
Определения EmoteBase.c:17
bool DetermineOverride(out int callback_ID, out int stancemask, out bool is_fullbody)
Определения EmoteBase.c:39
int GetAdditiveCallbackUID()
Определения EmoteBase.c:85
int GetFullbodyCallbackUID()
Определения EmoteBase.c:90
int GetStanceMaskAdditive()
Определения EmoteBase.c:75
bool EmoteStartOverride(typename callbacktype, int id, int mask, bool fullbody)
Определения EmoteBase.c:47
int GetStanceMaskFullbody()
Определения EmoteBase.c:80
bool EmoteCondition(int stancemask)
Определения EmoteBase.c:12
void OnBeforeStandardCallbackCreated(int callback_ID, int stancemask, bool is_fullbody)
bool GetHideItemInHands()
Определения EmoteBase.c:95
Определения EmoteBase.c:2
bool IsEmoteCallback()
Определения EmoteManager.c:24
EmoteManager m_Manager
Определения EmoteManager.c:6
override void OnAnimationEvent(int pEventID)
Определения EmoteManager.c:29
void ~EmoteCB()
Определения EmoteManager.c:8
bool m_IsFullbody
Определения EmoteManager.c:3
PlayerBase m_player
Определения EmoteManager.c:5
bool CancelCondition()
Определения EmoteManager.c:19
override bool IsGestureCallback()
Определения EmoteManager.c:58
int m_callbackID
Определения EmoteManager.c:4
Определения EmoteManager.c:2
bool ConstructEmotes(PlayerBase player, out map< int, ref EmoteBase > emoteMap)
Определения EmoteConstructor.c:3
static const int FORCE_ALL
Определения EmoteManager.c:68
static const int FORCE_NONE
Определения EmoteManager.c:66
void VerifySyncRequest()
Определения EmoteManager.c:110
bool m_SyncRequestSent
Определения EmoteManager.c:72
void SetStartGuaranteed(bool guaranted)
Определения EmoteManager.c:100
int GetID()
Определения EmoteManager.c:95
bool IsStartGuaranteed()
Определения EmoteManager.c:105
void SetForced(int mode)
Определения EmoteManager.c:85
int m_ID
Определения EmoteManager.c:74
bool m_IsStartGuaranteed
Определения EmoteManager.c:71
bool m_InterruptsSameIDEmote
Определения EmoteManager.c:70
static const int FORCE_DIFFERENT
Определения EmoteManager.c:67
bool WasSynced()
Определения EmoteManager.c:115
int GetForced()
Определения EmoteManager.c:90
int m_ForcePlayEmote
Определения EmoteManager.c:73
void EmoteLauncher(int emoteID, bool interrupts_same)
Определения EmoteManager.c:76
Определения EmoteManager.c:65
const int c_InventoryReservationTimeoutMS
reservations
script counterpart to engine's class Inventory
proto native bool IsOnBack()
return true if prone is on back
proto native bool IsChangingStance()
returns true if character is changing stance
Определения human.c:434
Определения human.c:18
HumanInventory... with FSM (synchronous, no anims)
Определения HumanInventoryWithFSM.c:6
proto native void SetGround(EntityAI e, vector mat[4])
sets current inventory location type to Ground with transformation mat
InventoryLocation.
Определения InventoryLocation.c:30
static bool IsInventoryHFSMLogEnable()
Определения 3_Game/DayZ/tools/Debug.c:766
Определения EnMath.c:7
Определения ObjectTyped.c:2
Определения PlayerBaseClient.c:2
The class that will be instanced (moddable)
Определения gameplay.c:389
base class for transformation operations (creating one item from another)
Определения ReplaceItemWithNewLambdaBase.c:5
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
Определения gameplay.c:152
proto bool Write(void value_out)
proto bool Read(void value_in)
void End()
called on surrender end request end
Определения EmoteManager.c:1425
Определения DayZPlayerImplement.c:39
proto native UAInput GetInputByName(string sInputName)
proto native int ID()
Определения UAInput.c:24
shorthand
Определения BoltActionRifle_Base.c:6
signalize mechanism manipulation
Определения Events.c:35
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Определения CachedEquipmentStorage.c:4
Определения EnConvert.c:119
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
eModifiers
Определения eModifiers.c:2
Serializer ParamsReadContext
Определения gameplay.c:15
const int EMOTE_SUICIDE_SIMULATION_END
Определения 3_Game/DayZ/constants.c:410
const int EMOTE_SUICIDE_BLEED
Определения 3_Game/DayZ/constants.c:409
const int EMOTE_SUICIDE_DEATH
Определения 3_Game/DayZ/constants.c:408
ErrorExSeverity
Определения EnDebug.c:62
enum ShapeType ErrorEx
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_SURRENDER
Определения 3_Game/DayZ/constants.c:399
const int ID_EMOTE_SITA
Определения 3_Game/DayZ/constants.c:373
const int ID_EMOTE_THUMB
Определения 3_Game/DayZ/constants.c:368
const int ID_EMOTE_DANCE
Определения 3_Game/DayZ/constants.c:371
const int ID_EMOTE_RPS_S
Определения 3_Game/DayZ/constants.c:395
const int ID_EMOTE_SUICIDE
Определения 3_Game/DayZ/constants.c:370
const int ID_EMOTE_RPS_R
Определения 3_Game/DayZ/constants.c:393
const int ID_EMOTE_THUMBDOWN
Определения 3_Game/DayZ/constants.c:375
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
const int MENU_GESTURES
Определения 3_Game/DayZ/constants.c:194
const int MENU_INVENTORY
Определения 3_Game/DayZ/constants.c:180
const int CALL_CATEGORY_GAMEPLAY
Определения 3_Game/DayZ/tools/tools.c:10
const int UA_ANIM_EVENT
Определения 3_Game/DayZ/constants.c:476
proto native volatile void Update()
Определения PlayerSoundManager.c:125