Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
staminaevents.c
Go to the documentation of this file.
2 {
3  const int MAX_VOLUME = 4;
5  {
8  }
9 
10  override bool HasPriorityOverCurrent(PlayerBase player, EPlayerSoundEventID other_state_id, EPlayerSoundEventType type_other)
11  {
12  return false;
13  }
14 
15  override void OnPlay(PlayerBase player)
16  {
17  super.OnPlay(player);
18 
19  MaskBase mask = MaskBase.Cast(player.GetInventory().FindAttachment(InventorySlots.GetSlotIdFromString("Mask")));
20 
21  float rel_volume = 1;
22  if (mask)
23  {
24  if (mask.IsExternalFilterAttached() || mask.HasIntegratedFilter())
25  {
26  rel_volume = Math.Lerp(MAX_VOLUME,1,mask.GetFilterQuantity01());
27  }
28  }
29 
31  m_SoundSetCallback.SetVolumeRelative(rel_volume);
32 
33  #ifdef DIAG_DEVELOPER
34  if (!DiagMenu.GetBool(DiagMenuIDs.MISC_BREATH_VAPOR_LVL))//disabled in debug, do not spawn particles
35  return;
36  #endif
37 
38  if ( player.CanSpawnBreathVaporEffect() )
39  player.SpawnBreathVaporEffect();
40 
41 
43 
44  }
45 
46 
47 }
49 {
51  {
52  m_ID = EPlayerSoundEventID.STAMINA_DOWN_LIGHT;
54  }
55 }
56 
58 {
59  void StaminaDownHeavy()
60  {
61  m_ID = EPlayerSoundEventID.STAMINA_DOWN_HEAVY;
63  }
64 }
65 
67 {
69  {
70  m_ID = EPlayerSoundEventID.STAMINA_UP_HEAVY;
72  }
73 }
74 
76 {
77  void StaminaUpLight()
78  {
79  m_ID = EPlayerSoundEventID.STAMINA_UP_LIGHT;
81  }
82 }
83 
85 {
86  void StaminaUpEnd()
87  {
88  m_ID = EPlayerSoundEventID.STAMINA_UP_END;
90  }
91 
92  override bool HasPriorityOverCurrent(PlayerBase player, EPlayerSoundEventID other_state_id, EPlayerSoundEventType type_other)
93  {
94  return false;
95  }
96 }
97 
99 {
100  void StaminaNormalDummy()
101  {
104  m_ID = EPlayerSoundEventID.STAMINA_NORMAL_DUMMY;
105  m_IsDummyType = true;
106  m_DummySoundLength = 3000;//in ms
107  }
108 }
109 
110 
111 // Low filter
113 {
115  {
116  m_ProcessPlaybackEvent = true;
117  }
118 }
119 
121 {
122  void StaminaLowFilterUpper()
123  {
124  m_ID = EPlayerSoundEventID.STAMINA_LOW_FILTER_UPPER;
126  }
127 }
128 
130 {
132  {
133  m_ID = EPlayerSoundEventID.STAMINA_LOW_FILTER_MID;
135  }
136 }
137 
138 class StaminaLowFilterLower extends StaminaLowFilterBase
139 {
140  void StaminaLowFilterLower()
141  {
142  m_ID = EPlayerSoundEventID.STAMINA_LOW_FILTER_LOWER;
144  }
145 }
StaminaNormalDummy
void StaminaNormalDummy()
Definition: staminaevents.c:93
m_IsDummyType
bool m_IsDummyType
Definition: playersoundeventbase.c:35
StaminaUpHeavy
class StaminaDownHeavy extends StaminaSoundEventBase StaminaUpHeavy()
Definition: staminaevents.c:68
StaminaDownHeavy
void StaminaDownHeavy()
Definition: staminaevents.c:2
InventorySlots
provides access to slot configuration
Definition: inventoryslots.c:5
DiagMenu
Definition: endebug.c:232
m_Type
eBleedingSourceType m_Type
Definition: bleedingsource.c:25
m_ProcessPlaybackEvent
bool m_ProcessPlaybackEvent
Definition: playersoundeventbase.c:36
StaminaLowFilterBase
Definition: staminaevents.c:120
m_HasPriorityOverTypes
EPlayerSoundEventType m_HasPriorityOverTypes
Definition: playersoundeventbase.c:40
StaminaUpEnd
class StaminaUpLight extends StaminaSoundEventBase StaminaUpEnd()
Definition: staminaevents.c:86
StaminaLowFilterBase
class StaminaNormalDummy extends StaminaSoundEventBase StaminaLowFilterBase()
Definition: staminaevents.c:114
StaminaSoundEventBase
Definition: staminaevents.c:57
m_SoundSetCallback
AbstractWave m_SoundSetCallback
Definition: soundevents.c:2
StaminaLowFilterUpper
void StaminaLowFilterUpper()
Definition: staminaevents.c:93
MAX_VOLUME
const int MAX_VOLUME
Definition: staminaevents.c:2
DiagMenuIDs
DiagMenuIDs
Definition: ediagmenuids.c:1
PlayerBase
Definition: playerbaseclient.c:1
MaskBase
Definition: airbornemask.c:1
StaminaSoundEventBase
void StaminaSoundEventBase()
Definition: staminaevents.c:3
PlayerSoundEventBase
Definition: damageevents.c:1
StaminaLowFilterMid
class StaminaLowFilterUpper extends StaminaLowFilterBase StaminaLowFilterMid()
Definition: staminaevents.c:131
StaminaDownLight
class StaminaSoundEventBase extends PlayerSoundEventBase StaminaDownLight()
Definition: staminaevents.c:50
EPlayerSoundEventType
EPlayerSoundEventType
Definition: playersoundeventbase.c:1
OnPlay
override void OnPlay(PlayerBase player)
Definition: staminaevents.c:14
Math
Definition: enmath.c:6
EPlayerSoundEventID
EPlayerSoundEventID
Definition: playersoundeventhandler.c:1
StaminaUpLight
void StaminaUpLight()
Definition: staminaevents.c:2
m_ID
protected int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition: effect.c:49
m_DummySoundLength
float m_DummySoundLength
Definition: playersoundeventbase.c:33
HasPriorityOverCurrent
override bool HasPriorityOverCurrent(PlayerBase player, EPlayerSoundEventID other_state_id, EPlayerSoundEventType type_other)
Definition: staminaevents.c:9
m_SoundVoiceAnimEventClassID
int m_SoundVoiceAnimEventClassID
Definition: soundevents.c:5