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

Private Member Functions

void DamageSoundEvents ()
 
override bool CanPlay (PlayerBase player)
 
override bool HasPriorityOverCurrent (PlayerBase player, EPlayerSoundEventID other_state_id, EPlayerSoundEventType type_other)
 
void DrowningEvents ()
 
override bool CanPlay (PlayerBase player)
 
override bool HasPriorityOverCurrent (PlayerBase player, EPlayerSoundEventID other_state_id, EPlayerSoundEventType type_other)
 
void HeatComfortEventsBase ()
 
override bool HasPriorityOverCurrent (PlayerBase player, EPlayerSoundEventID other_state_id, EPlayerSoundEventType type_other)
 
void HoldBreathSoundEventBase ()
 
override bool HasHoldBreathException ()
 
void InjurySoundEvents ()
 
override bool CanPlay (PlayerBase player)
 
override bool HasPriorityOverCurrent (PlayerBase player, EPlayerSoundEventID other_state_id, EPlayerSoundEventType type_other)
 
override bool HasPriorityOverCurrent (PlayerBase player, EPlayerSoundEventID other_state_id, EPlayerSoundEventType type_other)
 
override bool CanPlay (PlayerBase player)
 
override void OnPlay (PlayerBase player)
 
override void OnEnd ()
 
void MeleeAttackSoundEvents ()
 
override bool CanPlay (PlayerBase player)
 
override bool HasPriorityOverCurrent (PlayerBase player, EPlayerSoundEventID other_state_id, EPlayerSoundEventType type_other)
 
override void OnEnd ()
 
void PickupHeavySoundEvent ()
 
void StaminaSoundEventBase ()
 
override bool HasPriorityOverCurrent (PlayerBase player, EPlayerSoundEventID other_state_id, EPlayerSoundEventType type_other)
 
override void OnPlay (PlayerBase player)
 
void SymptomSoundEventBase ()
 
override bool HasPriorityOverCurrent (PlayerBase player, EPlayerSoundEventID other_state_id, EPlayerSoundEventType type_other)
 

Private Attributes

const int MAX_VOLUME = 4
 

Detailed Description

Definition at line 1 of file DamageEvents.c.

Member Function Documentation

◆ CanPlay() [1/5]

override bool PlayerSoundEventBase::CanPlay ( PlayerBase player)
inlineprivate

Definition at line 10 of file DamageEvents.c.

11 {
12 return true;
13 }

◆ CanPlay() [2/5]

override bool PlayerSoundEventBase::CanPlay ( PlayerBase player)
inlineprivate

Definition at line 9 of file DrowningEvents.c.

10 {
11 return true;
12 }

◆ CanPlay() [3/5]

override bool PlayerSoundEventBase::CanPlay ( PlayerBase player)
inlineprivate

Definition at line 10 of file InjuryEvents.c.

11 {
12 return true;
13 }

◆ CanPlay() [4/5]

override bool PlayerSoundEventBase::CanPlay ( PlayerBase player)
inlineprivate

Definition at line 8 of file JumpEvents.c.

9 {
10 if (!super.CanPlay(player))
11 return false;
12 return true;
13 }

◆ CanPlay() [5/5]

override bool PlayerSoundEventBase::CanPlay ( PlayerBase player)
inlineprivate

Definition at line 9 of file MeleeAttack.c.

10 {
11 return true;
12 }

◆ DamageSoundEvents()

void PlayerSoundEventBase::DamageSoundEvents ( )
inlineprivate

Definition at line 4 of file DamageEvents.c.

5 {
6 m_HasPriorityOverTypes = -1;//-1 for all
8 }
eBleedingSourceType m_Type
EPlayerSoundEventType
EPlayerSoundEventType m_HasPriorityOverTypes

References m_HasPriorityOverTypes, and m_Type.

◆ DrowningEvents()

void PlayerSoundEventBase::DrowningEvents ( )
inlineprivate

Definition at line 3 of file DrowningEvents.c.

4 {
5 m_HasPriorityOverTypes = -1;//-1 for all
7 }

References m_HasPriorityOverTypes, and m_Type.

◆ HasHoldBreathException()

override bool PlayerSoundEventBase::HasHoldBreathException ( )
inlineprivate

Definition at line 8 of file HoldBreathEvents.c.

9 {
10 return true;
11 }

Referenced by CanPlay().

◆ HasPriorityOverCurrent() [1/8]

override bool PlayerSoundEventBase::HasPriorityOverCurrent ( PlayerBase player,
EPlayerSoundEventID other_state_id,
EPlayerSoundEventType type_other )
inlineprivate

Definition at line 15 of file DamageEvents.c.

16 {
17 return true;
18 }

◆ HasPriorityOverCurrent() [2/8]

override bool PlayerSoundEventBase::HasPriorityOverCurrent ( PlayerBase player,
EPlayerSoundEventID other_state_id,
EPlayerSoundEventType type_other )
inlineprivate

Definition at line 14 of file DrowningEvents.c.

15 {
16 return true;
17 }

◆ HasPriorityOverCurrent() [3/8]

override bool PlayerSoundEventBase::HasPriorityOverCurrent ( PlayerBase player,
EPlayerSoundEventID other_state_id,
EPlayerSoundEventType type_other )
inlineprivate

Definition at line 10 of file HeatComfortEvents.c.

11 {
12 return true;
13 }

◆ HasPriorityOverCurrent() [4/8]

override bool PlayerSoundEventBase::HasPriorityOverCurrent ( PlayerBase player,
EPlayerSoundEventID other_state_id,
EPlayerSoundEventType type_other )
inlineprivate

Definition at line 15 of file InjuryEvents.c.

16 {
17 return true;
18 }

◆ HasPriorityOverCurrent() [5/8]

override bool PlayerSoundEventBase::HasPriorityOverCurrent ( PlayerBase player,
EPlayerSoundEventID other_state_id,
EPlayerSoundEventType type_other )
inlineprivate

Definition at line 3 of file JumpEvents.c.

4 {
5 return true;
6 }

◆ HasPriorityOverCurrent() [6/8]

override bool PlayerSoundEventBase::HasPriorityOverCurrent ( PlayerBase player,
EPlayerSoundEventID other_state_id,
EPlayerSoundEventType type_other )
inlineprivate

Definition at line 14 of file MeleeAttack.c.

15 {
17 return false;
18 return true;
19 }

◆ HasPriorityOverCurrent() [7/8]

override bool PlayerSoundEventBase::HasPriorityOverCurrent ( PlayerBase player,
EPlayerSoundEventID other_state_id,
EPlayerSoundEventType type_other )
inlineprivate

Definition at line 10 of file StaminaEvents.c.

11 {
12 return false;
13 }

◆ HasPriorityOverCurrent() [8/8]

override bool PlayerSoundEventBase::HasPriorityOverCurrent ( PlayerBase player,
EPlayerSoundEventID other_state_id,
EPlayerSoundEventType type_other )
inlineprivate

Definition at line 9 of file SymptomEvents.c.

10 {
11 return true;
12 }

◆ HeatComfortEventsBase()

void PlayerSoundEventBase::HeatComfortEventsBase ( )
inlineprivate

Definition at line 4 of file HeatComfortEvents.c.

References m_HasPriorityOverTypes, and m_Type.

◆ HoldBreathSoundEventBase()

void PlayerSoundEventBase::HoldBreathSoundEventBase ( )
inlineprivate

Definition at line 3 of file HoldBreathEvents.c.

4 {
6 }

References m_HasPriorityOverTypes.

◆ InjurySoundEvents()

void PlayerSoundEventBase::InjurySoundEvents ( )
inlineprivate

Definition at line 4 of file InjuryEvents.c.

5 {
6 m_HasPriorityOverTypes = -1;//-1 for all
8 }

References m_HasPriorityOverTypes, and m_Type.

◆ MeleeAttackSoundEvents()

void PlayerSoundEventBase::MeleeAttackSoundEvents ( )
inlineprivate

Definition at line 3 of file MeleeAttack.c.

References m_HasPriorityOverTypes, and m_Type.

◆ OnEnd() [1/2]

override void PlayerSoundEventBase::OnEnd ( )
inlineprivate

Definition at line 22 of file JumpEvents.c.

23 {
24 super.OnEnd();
25 //m_Player.GetStaminaSoundHandlerClient().PostponeStamina(1000);
26 if (m_Player)
27 StaminaSoundHandlerClient.Cast(m_Player.m_PlayerSoundManagerClient.GetHandler(eSoundHandlers.STAMINA)).PostponeStamina(1300);
28 }
DayZPlayer m_Player
Definition Hand_Events.c:42
eSoundHandlers

References m_Player.

Referenced by Play(), and ~PlayerSoundEventBase().

◆ OnEnd() [2/2]

override void PlayerSoundEventBase::OnEnd ( )
inlineprivate

Definition at line 21 of file MeleeAttack.c.

22 {
23 super.OnEnd();
24 if (m_Player)
25 StaminaSoundHandlerClient.Cast(m_Player.m_PlayerSoundManagerClient.GetHandler(eSoundHandlers.STAMINA)).PostponeStamina(800);
26 }

References m_Player.

◆ OnPlay() [1/2]

override void PlayerSoundEventBase::OnPlay ( PlayerBase player)
inlineprivate

Definition at line 15 of file JumpEvents.c.

16 {
17 super.OnPlay(player);
18 if (player.CanSpawnBreathVaporEffect())
19 player.SpawnBreathVaporEffect();
20 }

◆ OnPlay() [2/2]

override void PlayerSoundEventBase::OnPlay ( PlayerBase player)
inlineprivate

!! beware of the ifdef above , most likely you want to put your code above it, otherwise it might not get executed !!!

Definition at line 15 of file StaminaEvents.c.

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 rel_volume = Math.Lerp(MAX_VOLUME, 1, mask.GetFilterQuantity01());
26 }
27
30
31#ifdef DIAG_DEVELOPER
32 if (!DiagMenu.GetBool(DiagMenuIDs.MISC_BREATH_VAPOR_LVL))//disabled in debug, do not spawn particles
33 return;
34#endif
35
36 if (player.CanSpawnBreathVaporEffect())
37 player.SpawnBreathVaporEffect();
38
39
41
42 }
DiagMenuIDs
Definition EDiagMenuIDs.c:2
AbstractWave m_SoundSetCallback
Definition SoundEvents.c:80
proto void SetVolumeRelative(float value)
provides access to slot configuration
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
Definition EnMath.c:7
static proto bool GetBool(int id, bool reverse=false)
Get value as bool from the given script id.
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.

References DiagMenu::GetBool(), InventorySlots::GetSlotIdFromString(), Math::Lerp(), m_SoundSetCallback, MAX_VOLUME, and AbstractWave::SetVolumeRelative().

◆ PickupHeavySoundEvent()

void PlayerSoundEventBase::PickupHeavySoundEvent ( )
inlineprivate

Definition at line 3 of file MiscEvents.c.

4 {
5 m_HasPriorityOverTypes = -1;//-1 for all
7 m_ID = EPlayerSoundEventID.PICKUP_HEAVY;
9 }
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
int m_SoundVoiceAnimEventClassID
Definition SoundEvents.c:83

References m_HasPriorityOverTypes, m_ID, m_SoundVoiceAnimEventClassID, and m_Type.

◆ StaminaSoundEventBase()

void PlayerSoundEventBase::StaminaSoundEventBase ( )
inlineprivate

Definition at line 4 of file StaminaEvents.c.

References m_HasPriorityOverTypes, and m_Type.

◆ SymptomSoundEventBase()

void PlayerSoundEventBase::SymptomSoundEventBase ( )
inlineprivate

Definition at line 3 of file SymptomEvents.c.

4 {
7 }

References m_HasPriorityOverTypes, and m_Type.

Member Data Documentation

◆ MAX_VOLUME

const int PlayerSoundEventBase::MAX_VOLUME = 4
private

Definition at line 3 of file StaminaEvents.c.


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