DayZ 1.24
Loading...
Searching...
No Matches
EmoteCB Class Reference
Inheritance diagram for EmoteCB:
[legend]
Collaboration diagram for EmoteCB:
[legend]

Private Member Functions

void ~EmoteCB ()
 
bool CancelCondition ()
 
bool IsEmoteCallback ()
 
override void OnAnimationEvent (int pEventID)
 
override bool IsGestureCallback ()
 
- Private Member Functions inherited from HumanCommandActionCallback
void PluginDayzPlayerActionCallback ()
 
void ~PluginDayzPlayerActionCallback ()
 
override void OnFinish (bool pCanceled)
 
bool CancelCondition ()
 
override void OnAnimationEvent (int pEventID)
 
override void OnStateChange (int pOldState, int pCurrentState)
 

Private Attributes

bool m_IsFullbody
 
int m_callbackID
 
PlayerBase m_player
 
EmoteManager m_Manager
 
- Private Attributes inherited from HumanCommandActionCallback
float m_fTimeStart
 
TextWidget m_pStateWidget
 
TextWidget m_pAnimEventWidget
 
TextListboxWidget m_EventsHistory
 

Additional Inherited Members

- Static Private Attributes inherited from HumanCommandActionCallback
static ref set< stringm_AnimEventMapping
 

Detailed Description

Definition at line 1 of file EmoteManager.c.

Constructor & Destructor Documentation

◆ ~EmoteCB()

void EmoteCB::~EmoteCB ( )
inlineprivate

Definition at line 8 of file EmoteManager.c.

9 {
10 if (m_Manager)
11 m_Manager.OnCallbackEnd();
12
13 if (GetGame() && m_player)
14 m_player.RequestHandAnimationStateRefresh();
15 }
EmoteManager m_Manager
Definition EmoteManager.c:6
PlayerBase m_player
Definition EmoteManager.c:5
proto native CGame GetGame()

References GetGame(), m_Manager, and m_player.

Member Function Documentation

◆ CancelCondition()

bool EmoteCB::CancelCondition ( )
inlineprivate

Definition at line 17 of file EmoteManager.c.

18 {
19 return false;
20 }

◆ IsEmoteCallback()

bool EmoteCB::IsEmoteCallback ( )
inlineprivate

Definition at line 22 of file EmoteManager.c.

23 {
24 return IsGestureCallback();
25 }
override bool IsGestureCallback()

References IsGestureCallback().

◆ IsGestureCallback()

override bool EmoteCB::IsGestureCallback ( )
inlineprivate

Definition at line 73 of file EmoteManager.c.

74 {
75 return true;
76 }

Referenced by IsEmoteCallback().

◆ OnAnimationEvent()

override void EmoteCB::OnAnimationEvent ( int pEventID)
inlineprivate

Definition at line 27 of file EmoteManager.c.

28 {
29 switch (pEventID)
30 {
32
33 if (GetGame().IsServer())
34 m_Manager.KillPlayer();
35
36 m_Manager.LogSuicide();
37 break;
38
39 case UA_ANIM_EVENT :
40 if (GetGame().IsServer())
41 {
42 if (m_player.GetItemInHands() && SurrenderDummyItem.Cast(m_player.GetItemInHands()))
43 m_player.GetItemInHands().DeleteSafe(); //Note, this keeps item 'alive' until it is released by all the systems (inventory swapping etc.)
44
45 if (m_player.GetItemInHands())
46 m_player.PhysicalPredictiveDropItem(m_player.GetItemInHands());
47 }
48 m_Manager.m_ItemToBeCreated = true;
49 break;
50
52 if (GetGame().IsServer())
53 m_Manager.CreateBleedingEffect(m_callbackID);
54 break;
55
57 if (GetGame().IsServer())
58 {
59 EntityAI itemInHands = m_player.GetHumanInventory().GetEntityInHands();
60 if (itemInHands)
61 {
62 vector m4[4];
63 itemInHands.GetTransform(m4);
64 m_player.GetInventory().DropEntityWithTransform(InventoryMode.SERVER, m_player, itemInHands, m4);
65 }
66 }
67
68 m_player.StartDeath();
69 break;
70 }
71 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
Definition Inventory.c:22
int m_callbackID
Definition EmoteManager.c:4
const int EMOTE_SUICIDE_SIMULATION_END
Definition constants.c:400
const int EMOTE_SUICIDE_BLEED
Definition constants.c:399
const int EMOTE_SUICIDE_DEATH
Definition constants.c:398
const int UA_ANIM_EVENT
Definition constants.c:443

References EmoteConstants::EMOTE_SUICIDE_BLEED, EmoteConstants::EMOTE_SUICIDE_DEATH, EmoteConstants::EMOTE_SUICIDE_SIMULATION_END, GetGame(), m_callbackID, m_Manager, m_player, and UA_ANIM_EVENT.

Member Data Documentation

◆ m_callbackID

int EmoteCB::m_callbackID
private

Definition at line 4 of file EmoteManager.c.

Referenced by CreateEmoteCallback(), and OnAnimationEvent().

◆ m_IsFullbody

bool EmoteCB::m_IsFullbody
private

◆ m_Manager

EmoteManager EmoteCB::m_Manager
private

Definition at line 6 of file EmoteManager.c.

Referenced by CreateEmoteCallback(), OnAnimationEvent(), and ~EmoteCB().

◆ m_player

PlayerBase EmoteCB::m_player
private

Definition at line 5 of file EmoteManager.c.

Referenced by CreateEmoteCallback(), OnAnimationEvent(), and ~EmoteCB().


The documentation for this class was generated from the following file: