DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл PlayerSoundManager.c

См. исходные тексты.

Структуры данных

class  PlayerSoundManagerBase
 

Перечисления

enum  eSoundHandlers {
  STAMINA , HUNGER , INJURY , THIRST ,
  COUNT
}
 

Функции

void PlayerSoundManagerBase (PlayerBase player)
 
void RegisterHandler (SoundHandlerBase handler)
 
SoundHandlerBase GetHandler (eSoundHandlers id)
 
void Init ()
 Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)
 
void Update ()
 
void PlayerSoundManagerClient (PlayerBase player)
 
void SetAllowUpdate (bool enable)
 
void CheckAllowUpdate ()
 

Переменные

const float SOUNDS_HEARING_DISTANCE = 50
 
enum eSoundHandlers m_Player
 
const int MAX_HANDLERS_COUNT = eSoundHandlers.COUNT
 
ref SoundHandlerBase m_Handlers [MAX_HANDLERS_COUNT]
 
class PlayerSoundManagerServer extends PlayerSoundManagerBase m_ClientCharacterTick = new Timer
 
ref Timer m_ClientCharacterDistanceCheck = new Timer
 
bool m_UpdateTimerRunning
 

Перечисления

◆ eSoundHandlers

Элементы перечислений
STAMINA 
HUNGER 
INJURY 
THIRST 
COUNT 
5{
7 HUNGER,
8 INJURY,
9 THIRST,
10 //FREEZING,
11
12 //------
13 // add stuff above !
14 //------
15 COUNT
16}
@ COUNT
Definition PlayerSoundManager.c:15
@ INJURY
Definition PlayerSoundManager.c:8
@ THIRST
Definition PlayerSoundManager.c:9
@ HUNGER
Definition PlayerSoundManager.c:7
@ STAMINA
Definition PlayerSoundManager.c:6

Функции

◆ CheckAllowUpdate()

void CheckAllowUpdate ( )
142 {
143 if( GetGame().GetPlayer() )
144 {
146
148 {
149 SetAllowUpdate(false);
150 }
152 {
153 SetAllowUpdate(true);
154 }
155 //PrintString("distance:" + vector.Distance(GetGame().GetPlayer().GetPosition(), m_Player.GetPosition()).ToString());
156 }
157 }
PlayerBase GetPlayer()
Definition ModifierBase.c:51
void SetAllowUpdate(bool enable)
Definition PlayerSoundManager.c:111
const float SOUNDS_HEARING_DISTANCE
Definition PlayerSoundManager.c:2
bool m_UpdateTimerRunning
Definition PlayerSoundManager.c:88
enum eSoundHandlers m_Player
class JsonUndergroundAreaTriggerData GetPosition
Definition UndergroundAreaLoader.c:9
Definition EntityAI.c:95
Definition EnConvert.c:106
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
proto native CGame GetGame()

Перекрестные ссылки vector::Distance(), GetGame(), GetPlayer(), GetPosition, m_Player, m_UpdateTimerRunning, SetAllowUpdate() и SOUNDS_HEARING_DISTANCE.

◆ GetHandler()

SoundHandlerBase GetHandler ( eSoundHandlers id)
40 {
41 return m_Handlers[id];
42 }
ref SoundHandlerBase m_Handlers[MAX_HANDLERS_COUNT]
Definition PlayerSoundManager.c:25

Перекрестные ссылки m_Handlers.

◆ Init()

void Init ( )

Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)

45 {
46
47 }

◆ PlayerSoundManagerBase()

void PlayerSoundManagerBase ( PlayerBase player)
28 {
30 Init();
31 }
void Init()
Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside o...
Definition PlayerSoundManager.c:44

Перекрестные ссылки PlayerSoundManagerBase::Init() и m_Player.

◆ PlayerSoundManagerClient()

void PlayerSoundManagerClient ( PlayerBase player)
103 {
104
105 if( !GetGame().IsDedicatedServer() )
106 {
107 m_ClientCharacterDistanceCheck.Run(2, this, "CheckAllowUpdate", null, true);
108 }
109 }
ref Timer m_ClientCharacterDistanceCheck
Definition PlayerSoundManager.c:87

Перекрестные ссылки GetGame() и m_ClientCharacterDistanceCheck.

Используется в ManBase::Init().

◆ RegisterHandler()

void RegisterHandler ( SoundHandlerBase handler)
34 {
35 int index = handler.GetID();
37 }

Перекрестные ссылки m_Handlers.

Используется в PlayerSoundManagerBase::Init().

◆ SetAllowUpdate()

void SetAllowUpdate ( bool enable)
112 {
113 if( enable )
114 {
116 m_ClientCharacterTick.Run(0.03, this, "Update", null, true);
117 }
118 else
119 {
120 m_UpdateTimerRunning = false;
122 }
123 }
class PlayerSoundManagerServer extends PlayerSoundManagerBase m_ClientCharacterTick

Перекрестные ссылки m_ClientCharacterTick и m_UpdateTimerRunning.

Используется в CheckAllowUpdate() и Update().

Переменные

◆ m_ClientCharacterDistanceCheck

ref Timer m_ClientCharacterDistanceCheck = new Timer

Используется в PlayerSoundManagerClient().

◆ m_ClientCharacterTick

Используется в SetAllowUpdate().

◆ m_Handlers

◆ m_Player

enum eSoundHandlers m_Player

Используется в PlayerSoundManagerBase().

◆ m_UpdateTimerRunning

bool m_UpdateTimerRunning

Используется в CheckAllowUpdate() и SetAllowUpdate().

◆ MAX_HANDLERS_COUNT

const int MAX_HANDLERS_COUNT = eSoundHandlers.COUNT

Используется в Update() и PlayerSoundManagerBase::Update().

◆ SOUNDS_HEARING_DISTANCE

const float SOUNDS_HEARING_DISTANCE = 50

Используется в CheckAllowUpdate().