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

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

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

class  WaterLevelSettings
 
class  WaterLevelSnapshot
 
class  Land_Underground_WaterReservoir_Water
 

Функции

void PressureLevelSettings (int pPressureLevel, float pDuration)
 
void Land_Underground_WaterReservoir ()
 
void ~Land_Underground_WaterReservoir ()
 
override void EOnPostSimulate (IEntity other, float timeSlice)
 
override void OnVariablesSynchronized ()
 
override void SetActions ()
 
override bool HasTurnableValveBehavior ()
 
void Init ()
 Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)
 
void LateInit ()
 
void ConfigureValvesAndGaugesCourse ()
 
override bool IsValveTurnable (int pValveIndex)
 
bool IsAnyValveActive ()
 
bool IsValveActive (int pValveIndex)
 
override int GetTurnableValveIndex (int pComponentIndex)
 
void OnValveManipulationStart (int pValveIndex)
 
void OnValveManipulationEnd (int pValveIndex)
 
void OnValveManipulationCanceled (int pValveIndex)
 
array< vectorGetValveAligningPointsWS (int pValveIndex)
 
void SetLastActiveValve (int pValveIndex)
 
void SetWaterLevelHeight (float pHeight)
 
void RegisterValve (string pCompName, int pIndex)
 
void TranslateMemoryPointsToWaterLevels ()
 
float WaterLevelToHeight (int pWaterLevel)
 
int HeightToWaterLevel (float pHeight)
 
float PressureLevelToValue (int pPressureLevel)
 
WaterLevelSettings PreviousWaterLevelStageSettings (int pValveIndex)
 
WaterLevelSettings ActualWaterLevelStageSettings (int pValveIndex)
 
void AdvanceToNextWaterLevelStageSettings (int pValveIndex)
 
PressureLevelSettings PreviousPressureLevelStageSettings (int pValveIndex, bool pDeanimationRequest=false)
 
PressureLevelSettings ActualPressureLevelStageSettings (int pValveIndex, bool pDeanimationRequest=false)
 
void AdvanceToNextPressureLevelStageSettings (int pValveIndex)
 
void SetDefaultPressureLevelStageSettings (int pValveIndex)
 
void AnimateValve (int pValveIndex, float pPhase)
 
void SetValvePressureLevelGauge (int pValveIndex, float pValue)
 
float GetValvePressureLevelGauge (int pValveIndex)
 
bool IsValvePressureLevelGaugeAtBase (int pValveIndex)
 
float AdjustTime (float originalTime)
 
vector GetMemoryPointPosition (string pMemoryPoint)
 
void HandleSoundEffects ()
 
void PlayValveManipulationSound ()
 
void HandleSoundEffectsPipeCreaking ()
 
void HandleSoundEffectsPipeSprinkling ()
 
void HandleSoundEffectsUnderwaterPipeSounds ()
 
void HandleSoundEffectsWaterLevelMovementSounds ()
 
void CleanSoundEffects ()
 
void PlayPipeCreakingSoundOnLocation ()
 
void HandleVisualEffects ()
 
void CleanVisualEffects ()
 
void ResetState ()
 
void SyncValveVariables ()
 
int PackArrayOfBoolStatesIntoBits (array< bool > pStates)
 
array< boolUnpackBitsToArrayOfBoolStates (int pPackedBits, int pArrayLength)
 

Переменные

class WaterLevelSettings PressureLevel
 
float Duration
 
class WaterLevelSnapshot OBJECT_NAME_WATER_PLANE = "Land_Underground_WaterReservoir_Water"
 
const int WL_MIN = 0
 
const int WL_ABOVE_PIPES = 1
 
const int WL_AVERAGE = 2
 
const int WL_MAX = 3
 
const int PL_MIN = 0
 
const int PL_AVERAGE = 1
 
const int PL_MAX = 2
 
const int VALVES_COUNT = 2
 
const int VALVE_INDEX_DRAIN = 0
 
const int VALVE_INDEX_FILL = 1
 
const int PIPES_BROKEN_COUNT = 2
 
const int PIPE_INDEX_BROKEN1 = 0
 
const int PIPE_INDEX_BROKEN2 = 1
 main broken pipe
 
const string ANIM_PHASE_VALVE_GAUGE_DRAIN = "ValveGauge1"
 tighter broken pipe
 
const string ANIM_PHASE_VALVE_GAUGE_FILL = "ValveGauge2"
 
const string ANIM_PHASE_VALVE_DRAIN = "Valve1"
 
const string ANIM_PHASE_VALVE_FILL = "Valve2"
 
const string VALVE_NAME_DRAIN = "valve1"
 
const string VALVE_NAME_FILL = "valve2"
 
const string PIPE_NAME_BROKEN1 = "pipe_broken_1"
 
const string PIPE_NAME_BROKEN2 = "pipe_broken_2"
 
const string PIPE_NAME_LEAKING_DRAIN = "pipe_leaking_1"
 
const string PIPE_NAME_LEAKING_FILL = "pipe_leaking_2"
 
const string SOUND_NAME_PIPE_CREAKING = "WaterObjectUndergroundPipeCreaking_SoundSet"
 
const string SOUND_NAME_VALVE_MANIPULATION = "WaterObjectUndergroundValve_SoundSet"
 
const string SOUND_NAME_PIPE_SPRINKLING_START = "WaterObjectUndergroundPipeSprinkling_Start_SoundSet"
 
const string SOUND_NAME_PIPE_SPRINKLING_END = "WaterObjectUndergroundPipeSprinkling_End_SoundSet"
 
const string SOUND_NAME_PIPE_SPRINKLING_LOOP1 = "WaterObjectUndergroundPipeSprinkling_Loop1_SoundSet"
 
const string SOUND_NAME_PIPE_SPRINKLING_LOOP2 = "WaterObjectUndergroundPipeSprinkling_Loop2_SoundSet"
 
const string SOUND_NAME_UPIPE_SPRINKLING_START = "WaterObjectUndergroundUnderwaterPipe_Start_SoundSet"
 
const string SOUND_NAME_UPIPE_SPRINKLING_END = "WaterObjectUndergroundUnderwaterPipe_End_SoundSet"
 
const string SOUND_NAME_UPIPE_SPRINKLING_LOOP = "WaterObjectUndergroundUnderwaterPipe_Loop_SoundSet"
 
const string SOUND_NAME_WATER_FILL_LOOP = "WaterObjectUndergroundUnderwaterFill_Loop_SoundSet"
 
const string SOUND_NAME_WATER_DRAIN_LOOP = "WaterObjectUndergroundUnderwaterEmpty_Loop_SoundSet"
 
const int PARTICLE_DRAIN_PIPE_MAX_PRESSURE = ParticleList.WATER_SPILLING
 
const int PARTICLE_FILL_PIPE_MAX_PRESSURE = ParticleList.WATER_SPILLING
 
const int PARTICLE_FILL_PIPE_JET = ParticleList.WATER_JET
 
const int PARTICLE_FILL_PIPE_JET_WEAK = ParticleList.WATER_JET_WEAK
 
ref array< ref WaterLevelSettingsm_DrainValveWaterStageSettings
 valve/pipe stages for water and pressure levels
 
ref array< ref PressureLevelSettingsm_DrainValvePressureStageSettings
 
ref array< ref PressureLevelSettingsm_DrainValvePressureDeanimationSettings
 
ref array< ref WaterLevelSettingsm_FillValveWaterStageSettings
 for deanimation purposes
 
ref array< ref PressureLevelSettingsm_FillValvePressureStageSettings
 
ref array< ref PressureLevelSettingsm_FillValvePressureDeanimationSettings
 
ref WaterLevelSnapshot m_WaterLevelSnapshot
 for deanimation purposes
 
int m_DrainValveWaterLevelStageIndex
 pointing to specific stage for each valve/pipe
 
int m_DrainValvePressureLevelStageIndex
 
int m_FillValveWaterLevelStageIndex
 
int m_FillValvePressureLevelStageIndex
 
static const string WATER_LEVEL_MAX = "water_level_max"
 
static const string WATER_LEVEL_AVERAGE = "water_level_average"
 
static const string WATER_LEVEL_ABOVE_PIPES = "water_level_above_pipes"
 
static const string WATER_LEVEL_MIN = "water_level_min"
 
const int WATER_LEVELS_COUNT = 4
 
const string WATER_LEVELS [WATER_LEVELS_COUNT]
 
int m_ValveStatesPacked
 
int m_ValveStatesPackedPrev
 
int m_ValveManipulatedIndex
 
int m_ValveManipulatedIndexPrev
 
ref array< stringm_ValveNames
 
ref array< boolm_ValveStates
 
ref map< string, vectorm_WaterLevelsAvailable
 
int m_WaterLevelActual
 
int m_WaterLevelPrev
 
ref array< boolm_PressureAnimationRequests
 
ref array< boolm_PressureDeanimationRequests
 
ref array< floatm_WaterLevelTimesAccumulated
 
ref array< floatm_PressureTimesAccumulated
 
int m_LastActiveValve
 
Object m_SpawnedWaterObject
 
vector m_WaterLevelDefault
 
float m_WaterLevelHeightActual
 
bool m_ValveManipulationSoundRequested
 VFX/SFX.
 
ref EffectSound m_ValveManipulationSound
 
ref array< EffectSoundm_PipeSounds
 
bool m_PipeCreakingSoundRequested
 
ref EffectSound m_PipeCreakingSounds
 
ref EffectSound m_PipeUnderwaterSound
 
ref EffectSound m_WaterLevelMovementSound
 
const int PIPE_CREAKING_MIN_TIME_DELAY_MS = 10000
 
const int PIPE_CREAKING_MAX_TIME_DELAY_MS = 15000
 
const int PIPE_CREAKING_SOUND_LOCATIONS_COUNT = 4
 
const string PIPE_CREAKING_SOUND_LOCATIONS [PIPE_CREAKING_SOUND_LOCATIONS_COUNT]
 
ref ParticleSourceArray m_ValveParticles
 
ref ParticleSourceArray m_PipeBrokenParticles
 

Функции

◆ ActualPressureLevelStageSettings()

PressureLevelSettings ActualPressureLevelStageSettings ( int pValveIndex,
bool pDeanimationRequest = false )
protected
777 {
779
780 switch (pValveIndex)
781 {
784 {
786 return plStageSettings;
787 }
788
790 break;
791 case VALVE_INDEX_FILL:
793 {
795 return plStageSettings;
796 }
797
799 break;
800 }
801
802 return plStageSettings;
803 }
ref array< ref PressureLevelSettings > m_DrainValvePressureDeanimationSettings
Definition Land_Underground_WaterReservoir.c:83
ref array< ref PressureLevelSettings > m_FillValvePressureStageSettings
Definition Land_Underground_WaterReservoir.c:85
ref array< ref PressureLevelSettings > m_FillValvePressureDeanimationSettings
Definition Land_Underground_WaterReservoir.c:86
int m_DrainValvePressureLevelStageIndex
Definition Land_Underground_WaterReservoir.c:91
ref array< ref PressureLevelSettings > m_DrainValvePressureStageSettings
Definition Land_Underground_WaterReservoir.c:82
const int VALVE_INDEX_DRAIN
Definition Land_Underground_WaterReservoir.c:45
const int VALVE_INDEX_FILL
Definition Land_Underground_WaterReservoir.c:46
int m_FillValvePressureLevelStageIndex
Definition Land_Underground_WaterReservoir.c:93
void PressureLevelSettings(int pPressureLevel, float pDuration)
Definition Land_Underground_WaterReservoir.c:18
Definition EntityAI.c:95

Перекрестные ссылки m_DrainValvePressureDeanimationSettings, m_DrainValvePressureLevelStageIndex, m_DrainValvePressureStageSettings, m_FillValvePressureDeanimationSettings, m_FillValvePressureLevelStageIndex, m_FillValvePressureStageSettings, PressureLevelSettings(), VALVE_INDEX_DRAIN и VALVE_INDEX_FILL.

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

◆ ActualWaterLevelStageSettings()

WaterLevelSettings ActualWaterLevelStageSettings ( int pValveIndex)
protected
690 {
692
693 switch (pValveIndex)
694 {
697 break;
698 case VALVE_INDEX_FILL:
700 break;
701 }
702
703 return wlStageSettings;
704 }
ref array< ref WaterLevelSettings > m_DrainValveWaterStageSettings
valve/pipe stages for water and pressure levels
Definition Land_Underground_WaterReservoir.c:81
ref array< ref WaterLevelSettings > m_FillValveWaterStageSettings
for deanimation purposes
Definition Land_Underground_WaterReservoir.c:84
int m_DrainValveWaterLevelStageIndex
pointing to specific stage for each valve/pipe
Definition Land_Underground_WaterReservoir.c:90
int m_FillValveWaterLevelStageIndex
Definition Land_Underground_WaterReservoir.c:92
Definition Land_Underground_WaterReservoir.c:2

Перекрестные ссылки m_DrainValveWaterLevelStageIndex, m_DrainValveWaterStageSettings, m_FillValveWaterLevelStageIndex, m_FillValveWaterStageSettings, VALVE_INDEX_DRAIN и VALVE_INDEX_FILL.

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

◆ AdjustTime()

float AdjustTime ( float originalTime)
protected
902 {
903 #ifdef DIAG_DEVELOPER
904 float timeAccel = 1;
905 if (FeatureTimeAccel.GetFeatureTimeAccelEnabled(ETimeAccelCategories.UNDERGROUND_RESERVOIR))
906 {
907 timeAccel = FeatureTimeAccel.GetFeatureTimeAccelValue();
908 return originalTime * timeAccel;
909 }
910 #endif
911 return originalTime;
912 }

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

◆ AdvanceToNextPressureLevelStageSettings()

void AdvanceToNextPressureLevelStageSettings ( int pValveIndex)
protected

◆ AdvanceToNextWaterLevelStageSettings()

void AdvanceToNextWaterLevelStageSettings ( int pValveIndex)
protected
707 {
708 switch (pValveIndex)
709 {
712 {
714 }
715 else
716 {
718 }
719 break;
720 case VALVE_INDEX_FILL:
722 {
724 }
725 else
726 {
728 }
729 break;
730 }
731 }

Перекрестные ссылки m_DrainValveWaterLevelStageIndex, m_DrainValveWaterStageSettings, m_FillValveWaterLevelStageIndex, m_FillValveWaterStageSettings, VALVE_INDEX_DRAIN и VALVE_INDEX_FILL.

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

◆ AnimateValve()

void AnimateValve ( int pValveIndex,
float pPhase )
protected
846 {
847 switch (pValveIndex)
848 {
850 SetAnimationPhase(ANIM_PHASE_VALVE_DRAIN, pPhase);
851 break;
852 case VALVE_INDEX_FILL:
853 SetAnimationPhase(ANIM_PHASE_VALVE_FILL, pPhase);
854 break;
855 }
856 }
const string ANIM_PHASE_VALVE_FILL
Definition Land_Underground_WaterReservoir.c:55
const string ANIM_PHASE_VALVE_DRAIN
Definition Land_Underground_WaterReservoir.c:54

Перекрестные ссылки ANIM_PHASE_VALVE_DRAIN, ANIM_PHASE_VALVE_FILL, VALVE_INDEX_DRAIN и VALVE_INDEX_FILL.

Используется в OnValveManipulationCanceled(), OnValveManipulationEnd() и OnValveManipulationStart().

◆ CleanSoundEffects()

void CleanSoundEffects ( )
protected
1085 {
1088 }
ref array< EffectSound > m_PipeSounds
Definition Land_Underground_WaterReservoir.c:130
Manager class for managing Effect (EffectParticle, EffectSound)
Definition EffectManager.c:6
static bool DestroySound(EffectSound sound_effect)
Legacy, backwards compatibility.
Definition EffectManager.c:432

Перекрестные ссылки SEffectManager::DestroySound(), m_PipeSounds, VALVE_INDEX_DRAIN и VALVE_INDEX_FILL.

Используется в ResetState() и ~Land_Underground_WaterReservoir().

◆ CleanVisualEffects()

void CleanVisualEffects ( )
protected
1176 {
1177 for (int valve = 0; valve < VALVES_COUNT; ++valve)
1178 {
1180 {
1181 m_ValveParticles[valve].StopParticle();
1183 }
1184 }
1185
1186 for (int pipe = 0; pipe < m_PipeBrokenParticles.Count(); ++pipe)
1187 {
1189 {
1190 m_PipeBrokenParticles[pipe].StopParticle();
1192 }
1193 }
1194 }
ref ParticleSourceArray m_PipeBrokenParticles
Definition Land_Underground_WaterReservoir.c:151
ref ParticleSourceArray m_ValveParticles
Definition Land_Underground_WaterReservoir.c:150
const int VALVES_COUNT
Definition Land_Underground_WaterReservoir.c:44

Перекрестные ссылки m_PipeBrokenParticles, m_ValveParticles и VALVES_COUNT.

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

◆ ConfigureValvesAndGaugesCourse()

void ConfigureValvesAndGaugesCourse ( )
protected

drain - water level

drain - pressure

for deanimation purposes only while valves activation overllaps

fill - water level

fill - pressure

for deanimation purposes only while valves activation overllaps

411 {
417
423
427
433
439
443 }
const int PL_MAX
Definition Land_Underground_WaterReservoir.c:42
const int WL_MAX
Definition Land_Underground_WaterReservoir.c:38
const int WL_MIN
Definition Land_Underground_WaterReservoir.c:35
const int WL_AVERAGE
Definition Land_Underground_WaterReservoir.c:37
const int PL_MIN
Definition Land_Underground_WaterReservoir.c:40
const int PL_AVERAGE
Definition Land_Underground_WaterReservoir.c:41

Перекрестные ссылки m_DrainValvePressureDeanimationSettings, m_DrainValvePressureStageSettings, m_DrainValveWaterStageSettings, m_FillValvePressureDeanimationSettings, m_FillValvePressureStageSettings, m_FillValveWaterStageSettings, PL_AVERAGE, PL_MAX, PL_MIN, PressureLevelSettings(), WL_AVERAGE, WL_MAX и WL_MIN.

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

◆ EOnPostSimulate()

override void EOnPostSimulate ( IEntity other,
float timeSlice )
protected

In case where one of the valves is already running

  • snapshot values; stop animation of that valve and continue with newly requested

will force that valve to start deanimation of gauge

water level course and animation

stay on the same level

pressure course and animation

stay on the same level

end of deanimation - overlapped activation of valves

167 {
168 #ifndef SERVER
171 #endif
172
173 if (!GetGame().IsServer())
174 {
175 return;
176 }
177
178 int valve;
182
185 for (valve = 0; valve < VALVES_COUNT; ++valve)
186 {
188 {
193 m_ValveStates[valve] = false;
195 break;
196 }
197 }
198
200 for (valve = 0; valve < VALVES_COUNT; ++valve)
201 {
202 if (m_ValveStates[valve] == true)
203 {
206
208 if (wlStageSettings.Duration == -1.0)
209 {
210 m_ValveStates[valve] = false;
214 return;
215 }
216
218 float adjustedDuration = wlStageSettings.Duration;
220 {
222 adjustedDuration = wlStageSettings.Duration + m_WaterLevelSnapshot.RemainingDuration;
223 }
224
226 {
228 float target = WaterLevelToHeight(wlStageSettings.WaterLevel);
231 }
232 else
233 {
237 SetSynchDirty();
238 }
239
241 }
242 else
243 {
246 }
247 }
248
249 int allValvesStates = 0;
250
252 for (valve = 0; valve < VALVES_COUNT; ++valve)
253 {
255 {
259
261 if (plStageSettings.Duration == -1.0)
262 {
266 return;
267 }
268
270 {
271 float plStart = PressureLevelToValue(plStageSettingsPrev.PressureLevel);
272 float plTarget = PressureLevelToValue(plStageSettings.PressureLevel);
275 }
276 else
277 {
281 {
284 }
285 else
286 {
288 SetSynchDirty();
289 }
290 }
291
293 }
294 else
295 {
297 }
298
299
301 if (allValvesStates == false)
302 {
304 }
305 }
306 }
float m_WaterLevelHeightActual
Definition Land_Underground_WaterReservoir.c:125
void SetDefaultPressureLevelStageSettings(int pValveIndex)
Definition Land_Underground_WaterReservoir.c:832
bool IsValvePressureLevelGaugeAtBase(int pValveIndex)
Definition Land_Underground_WaterReservoir.c:886
PressureLevelSettings ActualPressureLevelStageSettings(int pValveIndex, bool pDeanimationRequest=false)
Definition Land_Underground_WaterReservoir.c:776
ref array< bool > m_PressureDeanimationRequests
Definition Land_Underground_WaterReservoir.c:118
WaterLevelSettings ActualWaterLevelStageSettings(int pValveIndex)
Definition Land_Underground_WaterReservoir.c:689
void AdvanceToNextPressureLevelStageSettings(int pValveIndex)
Definition Land_Underground_WaterReservoir.c:805
PressureLevelSettings PreviousPressureLevelStageSettings(int pValveIndex, bool pDeanimationRequest=false)
Definition Land_Underground_WaterReservoir.c:733
void SetWaterLevelHeight(float pHeight)
Definition Land_Underground_WaterReservoir.c:560
ref array< bool > m_ValveStates
Definition Land_Underground_WaterReservoir.c:113
void SetValvePressureLevelGauge(int pValveIndex, float pValue)
Definition Land_Underground_WaterReservoir.c:858
float WaterLevelToHeight(int pWaterLevel)
Definition Land_Underground_WaterReservoir.c:601
ref array< float > m_PressureTimesAccumulated
Definition Land_Underground_WaterReservoir.c:120
WaterLevelSettings PreviousWaterLevelStageSettings(int pValveIndex)
Definition Land_Underground_WaterReservoir.c:655
void AdvanceToNextWaterLevelStageSettings(int pValveIndex)
Definition Land_Underground_WaterReservoir.c:706
void HandleSoundEffects()
Definition Land_Underground_WaterReservoir.c:931
float PressureLevelToValue(int pPressureLevel)
Definition Land_Underground_WaterReservoir.c:640
ref WaterLevelSnapshot m_WaterLevelSnapshot
for deanimation purposes
Definition Land_Underground_WaterReservoir.c:87
float AdjustTime(float originalTime)
Definition Land_Underground_WaterReservoir.c:901
void SyncValveVariables()
Definition Land_Underground_WaterReservoir.c:1221
ref array< float > m_WaterLevelTimesAccumulated
Definition Land_Underground_WaterReservoir.c:119
ref array< bool > m_PressureAnimationRequests
Definition Land_Underground_WaterReservoir.c:117
int m_LastActiveValve
Definition Land_Underground_WaterReservoir.c:121
void HandleVisualEffects()
Definition Land_Underground_WaterReservoir.c:1097
Input value between 0 and 1, returns value adjusted by easing, no automatic clamping of input(do your...
Definition Easing.c:3
static float EaseInOutSine(float t)
Definition Easing.c:14
Definition EnMath.c:7
Definition Land_Underground_WaterReservoir.c:26
const int INDEX_NOT_FOUND
Definition gameplay.c:13
proto native CGame GetGame()
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.

Перекрестные ссылки ActualPressureLevelStageSettings(), ActualWaterLevelStageSettings(), AdjustTime(), AdvanceToNextPressureLevelStageSettings(), AdvanceToNextWaterLevelStageSettings(), Math::Clamp(), Easing::EaseInOutSine(), GetGame(), HandleSoundEffects(), HandleVisualEffects(), INDEX_NOT_FOUND, IsValvePressureLevelGaugeAtBase(), Math::Lerp(), m_LastActiveValve, m_PressureAnimationRequests, m_PressureDeanimationRequests, m_PressureTimesAccumulated, m_ValveStates, m_WaterLevelHeightActual, m_WaterLevelSnapshot, m_WaterLevelTimesAccumulated, PressureLevelSettings(), PressureLevelToValue(), PreviousPressureLevelStageSettings(), PreviousWaterLevelStageSettings(), SetDefaultPressureLevelStageSettings(), SetValvePressureLevelGauge(), SetWaterLevelHeight(), SyncValveVariables(), VALVES_COUNT и WaterLevelToHeight().

◆ GetMemoryPointPosition()

vector GetMemoryPointPosition ( string pMemoryPoint)
protected
915 {
916 vector pos = vector.Zero;
917
918 if (MemoryPointExists(pMemoryPoint))
919 {
920 pos = GetMemoryPointPos(pMemoryPoint);
921 pos = ModelToWorld(pos);
922 }
923 else
924 {
925 ErrorEx(string.Format("Memory point %1 not found, falling back to vector.Zero", pMemoryPoint));
926 }
927
928 return pos;
929 }
Definition EnConvert.c:106
static const vector Zero
Definition EnConvert.c:110
enum ShapeType ErrorEx

Перекрестные ссылки ErrorEx и vector::Zero.

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

◆ GetTurnableValveIndex()

override int GetTurnableValveIndex ( int pComponentIndex)
protected
469 {
470 string targetedValveName = GetActionComponentName(pComponentIndex);
471 for (int i = 0; i < m_ValveNames.Count(); ++i)
472 {
474 {
475 return i;
476 }
477 }
478
479 return INDEX_NOT_FOUND;
480 }
ref array< string > m_ValveNames
Definition Land_Underground_WaterReservoir.c:112

Перекрестные ссылки INDEX_NOT_FOUND и m_ValveNames.

◆ GetValveAligningPointsWS()

array< vector > GetValveAligningPointsWS ( int pValveIndex)
protected

for the animation aligning returns data in order: start point; direction point

533 {
535
536 switch (pValveIndex)
537 {
539 posPoint = GetMemoryPointPosition(string.Format("%1_align_pos", VALVE_NAME_DRAIN));
540 dirPoint = GetMemoryPointPosition(string.Format("%1_align_dir", VALVE_NAME_DRAIN));
541 break;
542 case VALVE_INDEX_FILL:
543 posPoint = GetMemoryPointPosition(string.Format("%1_align_pos", VALVE_NAME_FILL));
544 dirPoint = GetMemoryPointPosition(string.Format("%1_align_dir", VALVE_NAME_FILL));
545 break;
546 }
547
549 valvePositions.Insert(posPoint);
550 valvePositions.Insert(dirPoint);
551
552 return valvePositions;
553 }
const string VALVE_NAME_FILL
Definition Land_Underground_WaterReservoir.c:57
const string VALVE_NAME_DRAIN
Definition Land_Underground_WaterReservoir.c:56
vector GetMemoryPointPosition(string pMemoryPoint)
Definition Land_Underground_WaterReservoir.c:914

Перекрестные ссылки GetMemoryPointPosition(), VALVE_INDEX_DRAIN, VALVE_INDEX_FILL, VALVE_NAME_DRAIN, VALVE_NAME_FILL и vector::Zero.

◆ GetValvePressureLevelGauge()

float GetValvePressureLevelGauge ( int pValveIndex)
protected
872 {
873 switch (pValveIndex)
874 {
876 return GetAnimationPhase(ANIM_PHASE_VALVE_GAUGE_DRAIN);
877 break;
878 case VALVE_INDEX_FILL:
879 return GetAnimationPhase(ANIM_PHASE_VALVE_GAUGE_FILL);
880 break;
881 }
882
883 return 0;
884 }
const string ANIM_PHASE_VALVE_GAUGE_FILL
Definition Land_Underground_WaterReservoir.c:53
const string ANIM_PHASE_VALVE_GAUGE_DRAIN
tighter broken pipe
Definition Land_Underground_WaterReservoir.c:52

Перекрестные ссылки ANIM_PHASE_VALVE_GAUGE_DRAIN, ANIM_PHASE_VALVE_GAUGE_FILL, VALVE_INDEX_DRAIN и VALVE_INDEX_FILL.

Используется в HandleSoundEffectsPipeSprinkling(), HandleVisualEffects() и IsValvePressureLevelGaugeAtBase().

◆ HandleSoundEffects()

void HandleSoundEffects ( )
protected
932 {
937 }
void HandleSoundEffectsWaterLevelMovementSounds()
Definition Land_Underground_WaterReservoir.c:1059
void HandleSoundEffectsUnderwaterPipeSounds()
Definition Land_Underground_WaterReservoir.c:1029
void HandleSoundEffectsPipeCreaking()
Definition Land_Underground_WaterReservoir.c:952
void HandleSoundEffectsPipeSprinkling()
Definition Land_Underground_WaterReservoir.c:973

Перекрестные ссылки HandleSoundEffectsPipeCreaking(), HandleSoundEffectsPipeSprinkling(), HandleSoundEffectsUnderwaterPipeSounds() и HandleSoundEffectsWaterLevelMovementSounds().

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

◆ HandleSoundEffectsPipeCreaking()

void HandleSoundEffectsPipeCreaking ( )
protected
953 {
954 if (IsAnyValveActive())
955 {
957 {
961 }
962 }
963 else
964 {
966 {
967 StopSoundSet(m_PipeCreakingSounds);
969 }
970 }
971 }
void PlayPipeCreakingSoundOnLocation()
Definition Land_Underground_WaterReservoir.c:1090
bool m_PipeCreakingSoundRequested
Definition Land_Underground_WaterReservoir.c:132
const int PIPE_CREAKING_MIN_TIME_DELAY_MS
Definition Land_Underground_WaterReservoir.c:140
bool IsAnyValveActive()
Definition Land_Underground_WaterReservoir.c:450
ref EffectSound m_PipeCreakingSounds
Definition Land_Underground_WaterReservoir.c:133
const int PIPE_CREAKING_MAX_TIME_DELAY_MS
Definition Land_Underground_WaterReservoir.c:141
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8

Перекрестные ссылки CALL_CATEGORY_SYSTEM, GetGame(), IsAnyValveActive(), m_PipeCreakingSoundRequested, m_PipeCreakingSounds, PIPE_CREAKING_MAX_TIME_DELAY_MS, PIPE_CREAKING_MIN_TIME_DELAY_MS, PlayPipeCreakingSoundOnLocation() и Math::RandomInt().

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

◆ HandleSoundEffectsPipeSprinkling()

void HandleSoundEffectsPipeSprinkling ( )
protected

974 {
975 if (!m_PipeSounds || m_PipeSounds.Count() == 0)
976 {
977 return;
978 }
979
982 if (drainPressureLevel >= 0.4 && drainPressureLevel < 0.8)
983 {
985 {
986 PlaySoundSetAtMemoryPoint(sndDrain, SOUND_NAME_PIPE_SPRINKLING_START, VALVE_NAME_DRAIN, false, 0.0, 0.5);
988 StopSoundSet(m_PipeSounds[VALVE_INDEX_DRAIN]);
990 PlaySoundSetAtMemoryPointLooped(sndDrain, SOUND_NAME_PIPE_SPRINKLING_LOOP1, VALVE_NAME_DRAIN, 0.5, 0.5);
992 }
993 }
994
995 if (drainPressureLevel < 0.4)
996 {
998 {
999 StopSoundSet(m_PipeSounds[VALVE_INDEX_DRAIN]);
1001 }
1002 }
1003
1005
1007 if (fillPressureLevel >= 0.4)
1008 {
1010 {
1011 PlaySoundSetAtMemoryPoint(sndFill, SOUND_NAME_PIPE_SPRINKLING_START, VALVE_NAME_FILL, false, 0.0, 0.5);
1012 StopSoundSet(m_PipeSounds[VALVE_INDEX_FILL]);
1014 PlaySoundSetAtMemoryPointLooped(sndFill, SOUND_NAME_PIPE_SPRINKLING_LOOP2, VALVE_NAME_FILL, 0.5, 0.5);
1016 }
1017 }
1018
1019 if (fillPressureLevel < 0.4)
1020 {
1022 {
1023 StopSoundSet(m_PipeSounds[VALVE_INDEX_FILL]);
1025 }
1026 }
1027 }
const string SOUND_NAME_PIPE_SPRINKLING_START
Definition Land_Underground_WaterReservoir.c:65
const string SOUND_NAME_PIPE_SPRINKLING_LOOP2
Definition Land_Underground_WaterReservoir.c:68
float GetValvePressureLevelGauge(int pValveIndex)
Definition Land_Underground_WaterReservoir.c:871
const string SOUND_NAME_PIPE_SPRINKLING_LOOP1
Definition Land_Underground_WaterReservoir.c:67
Wrapper class for managing sound through SEffectManager.
Definition EffectSound.c:5

Перекрестные ссылки GetValvePressureLevelGauge(), m_PipeSounds, SOUND_NAME_PIPE_SPRINKLING_LOOP1, SOUND_NAME_PIPE_SPRINKLING_LOOP2, SOUND_NAME_PIPE_SPRINKLING_START, VALVE_INDEX_DRAIN, VALVE_INDEX_FILL, VALVE_NAME_DRAIN и VALVE_NAME_FILL.

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

◆ HandleSoundEffectsUnderwaterPipeSounds()

void HandleSoundEffectsUnderwaterPipeSounds ( )
protected

strong water jet sound only when fill valve activated

1030 {
1033 {
1035 {
1037 {
1038 PlaySoundSetAtMemoryPoint(m_PipeUnderwaterSound, SOUND_NAME_UPIPE_SPRINKLING_START, PIPE_NAME_BROKEN1, false, 0.0, 0.5);
1039 StopSoundSet(m_PipeUnderwaterSound);
1042 }
1043 }
1045 {
1047 {
1048 StopSoundSet(m_PipeUnderwaterSound);
1050 {
1051 PlaySoundSetAtMemoryPoint(m_PipeUnderwaterSound, SOUND_NAME_UPIPE_SPRINKLING_END, PIPE_NAME_BROKEN1, false, 0.0, 0.5);
1053 }
1054 }
1055 }
1056 }
1057 }
int m_WaterLevelActual
Definition Land_Underground_WaterReservoir.c:115
const string PIPE_NAME_BROKEN1
Definition Land_Underground_WaterReservoir.c:58
bool IsValveActive(int pValveIndex)
Definition Land_Underground_WaterReservoir.c:463
const string SOUND_NAME_UPIPE_SPRINKLING_START
Definition Land_Underground_WaterReservoir.c:69
const string SOUND_NAME_UPIPE_SPRINKLING_END
Definition Land_Underground_WaterReservoir.c:70
int m_WaterLevelPrev
Definition Land_Underground_WaterReservoir.c:116
ref EffectSound m_PipeUnderwaterSound
Definition Land_Underground_WaterReservoir.c:136
const int WL_ABOVE_PIPES
Definition Land_Underground_WaterReservoir.c:36
const string SOUND_NAME_UPIPE_SPRINKLING_LOOP
Definition Land_Underground_WaterReservoir.c:71

Перекрестные ссылки IsValveActive(), m_PipeUnderwaterSound, m_WaterLevelActual, m_WaterLevelPrev, PIPE_NAME_BROKEN1, SOUND_NAME_UPIPE_SPRINKLING_END, SOUND_NAME_UPIPE_SPRINKLING_LOOP, SOUND_NAME_UPIPE_SPRINKLING_START, VALVE_INDEX_FILL, WL_ABOVE_PIPES, WL_AVERAGE и WL_MAX.

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

◆ HandleSoundEffectsWaterLevelMovementSounds()

void HandleSoundEffectsWaterLevelMovementSounds ( )
protected
1060 {
1062 {
1064 {
1065 PlaySoundSetAtMemoryPointLooped(m_WaterLevelMovementSound, SOUND_NAME_WATER_DRAIN_LOOP, PIPE_NAME_BROKEN1, 0.0, 0.5);
1066 }
1067 }
1069 {
1071 {
1072 PlaySoundSetAtMemoryPointLooped(m_WaterLevelMovementSound, SOUND_NAME_WATER_FILL_LOOP, PIPE_NAME_BROKEN1, 0.0, 0.5);
1073 }
1074 }
1076 {
1078 {
1079 StopSoundSet(m_WaterLevelMovementSound);
1080 }
1081 }
1082 }
const string SOUND_NAME_WATER_FILL_LOOP
Definition Land_Underground_WaterReservoir.c:72
ref EffectSound m_WaterLevelMovementSound
Definition Land_Underground_WaterReservoir.c:138
const string SOUND_NAME_WATER_DRAIN_LOOP
Definition Land_Underground_WaterReservoir.c:73

Перекрестные ссылки m_WaterLevelActual, m_WaterLevelMovementSound, m_WaterLevelPrev, PIPE_NAME_BROKEN1, SOUND_NAME_WATER_DRAIN_LOOP и SOUND_NAME_WATER_FILL_LOOP.

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

◆ HandleVisualEffects()

void HandleVisualEffects ( )
protected

strong jet stream particle only when fill valve activated

we don't need the weak jet stream

weak jet stream

1098 {
1100 {
1102 {
1104 }
1105 }
1106
1108 {
1110 {
1111 m_ValveParticles[VALVE_INDEX_DRAIN].StopParticle();
1113 }
1114 }
1115
1117 {
1119 {
1121 }
1122 }
1123
1125 {
1127 {
1128 m_ValveParticles[VALVE_INDEX_FILL].StopParticle();
1130 }
1131 }
1132
1133
1136 {
1138 {
1140 {
1142 }
1143
1146 {
1149 }
1150 }
1151 }
1152
1155 {
1157 {
1159 }
1160 }
1161
1163 {
1164 for (int pipe = 0; pipe < m_PipeBrokenParticles.Count(); ++pipe)
1165 {
1167 {
1168 m_PipeBrokenParticles[pipe].StopParticle();
1170 }
1171 }
1172 }
1173 }
vector GetOrientation()
Definition AreaDamageManager.c:306
const int PIPE_INDEX_BROKEN1
Definition Land_Underground_WaterReservoir.c:49
const int PARTICLE_FILL_PIPE_JET
Definition Land_Underground_WaterReservoir.c:77
const int PARTICLE_FILL_PIPE_MAX_PRESSURE
Definition Land_Underground_WaterReservoir.c:76
const string PIPE_NAME_LEAKING_DRAIN
Definition Land_Underground_WaterReservoir.c:60
const int PARTICLE_DRAIN_PIPE_MAX_PRESSURE
Definition Land_Underground_WaterReservoir.c:75
const string PIPE_NAME_LEAKING_FILL
Definition Land_Underground_WaterReservoir.c:61
const int PIPE_INDEX_BROKEN2
main broken pipe
Definition Land_Underground_WaterReservoir.c:50
const int PARTICLE_FILL_PIPE_JET_WEAK
Definition Land_Underground_WaterReservoir.c:78
const string PIPE_NAME_BROKEN2
Definition Land_Underground_WaterReservoir.c:59
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Definition ParticleManager.c:84

Перекрестные ссылки GetMemoryPointPosition(), GetOrientation(), GetValvePressureLevelGauge(), IsValveActive(), m_PipeBrokenParticles, m_ValveParticles, m_WaterLevelActual, m_WaterLevelPrev, PARTICLE_DRAIN_PIPE_MAX_PRESSURE, PARTICLE_FILL_PIPE_JET, PARTICLE_FILL_PIPE_JET_WEAK, PARTICLE_FILL_PIPE_MAX_PRESSURE, ParticleManager(), PIPE_INDEX_BROKEN1, PIPE_INDEX_BROKEN2, PIPE_NAME_BROKEN1, PIPE_NAME_BROKEN2, PIPE_NAME_LEAKING_DRAIN, PIPE_NAME_LEAKING_FILL, VALVE_INDEX_DRAIN, VALVE_INDEX_FILL, WL_ABOVE_PIPES, WL_AVERAGE и WL_MAX.

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

◆ HasTurnableValveBehavior()

override bool HasTurnableValveBehavior ( )
protected
329 {
330 return true;
331 }

◆ HeightToWaterLevel()

int HeightToWaterLevel ( float pHeight)
protected
619 {
621 {
622 return WL_MIN;
623 }
625 {
626 return WL_ABOVE_PIPES;
627 }
629 {
630 return WL_AVERAGE;
631 }
633 {
634 return WL_AVERAGE;
635 }
636
637 return WL_MAX;
638 }
ref map< string, vector > m_WaterLevelsAvailable
Definition Land_Underground_WaterReservoir.c:114
static const string WATER_LEVEL_MIN
Definition Land_Underground_WaterReservoir.c:98
static const string WATER_LEVEL_MAX
Definition Land_Underground_WaterReservoir.c:95
static const string WATER_LEVEL_ABOVE_PIPES
Definition Land_Underground_WaterReservoir.c:97
static const string WATER_LEVEL_AVERAGE
Definition Land_Underground_WaterReservoir.c:96

Перекрестные ссылки m_WaterLevelsAvailable, WATER_LEVEL_ABOVE_PIPES, WATER_LEVEL_AVERAGE, WATER_LEVEL_MAX, WATER_LEVEL_MIN, WL_ABOVE_PIPES, WL_AVERAGE, WL_MAX и WL_MIN.

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

◆ Init()

void Init ( )
protected

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

pre-init arrays

334 {
349
352
356
360
362 int i = 0;
363 for (i = 0; i < VALVES_COUNT; ++i)
364 {
365 m_ValveNames.Insert("none");
366 m_ValveStates.Insert(false);
367 m_PressureAnimationRequests.Insert(false);
368 m_PressureDeanimationRequests.Insert(false);
371 m_PipeSounds.Insert(null);
372 m_ValveParticles.Insert(null);
373 }
374
375 for (i = 0; i < PIPES_BROKEN_COUNT; ++i)
376 {
378 }
379
380 RegisterNetSyncVariableInt("m_ValveStatesPacked", 0);
381 RegisterNetSyncVariableInt("m_ValveManipulatedIndex", -1, VALVES_COUNT - 1);
382 RegisterNetSyncVariableInt("m_WaterLevelActual", WL_MIN, WL_MAX);
383 RegisterNetSyncVariableInt("m_WaterLevelPrev", WL_MIN, WL_MAX);
384
385 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(LateInit, 250);
386 }
int m_ValveManipulatedIndexPrev
Definition Land_Underground_WaterReservoir.c:111
void LateInit()
Definition Land_Underground_WaterReservoir.c:388
const int PIPES_BROKEN_COUNT
Definition Land_Underground_WaterReservoir.c:48
int m_ValveManipulatedIndex
Definition Land_Underground_WaterReservoir.c:110
array< ParticleSource > ParticleSourceArray
Definition ParticleSource.c:103

Перекрестные ссылки CALL_CATEGORY_SYSTEM, GetGame(), INDEX_NOT_FOUND, LateInit(), m_DrainValvePressureDeanimationSettings, m_DrainValvePressureStageSettings, m_DrainValveWaterStageSettings, m_FillValvePressureDeanimationSettings, m_FillValvePressureStageSettings, m_FillValveWaterStageSettings, m_LastActiveValve, m_PipeBrokenParticles, m_PipeSounds, m_PressureAnimationRequests, m_PressureDeanimationRequests, m_PressureTimesAccumulated, m_ValveManipulatedIndex, m_ValveManipulatedIndexPrev, m_ValveNames, m_ValveParticles, m_ValveStates, m_WaterLevelActual, m_WaterLevelPrev, m_WaterLevelsAvailable, m_WaterLevelSnapshot, m_WaterLevelTimesAccumulated, PIPES_BROKEN_COUNT, VALVES_COUNT, WL_AVERAGE, WL_MAX и WL_MIN.

◆ IsAnyValveActive()

bool IsAnyValveActive ( )
protected
451 {
452 for (int i = 0; i < m_ValveStates.Count(); ++i)
453 {
454 if (m_ValveStates[i])
455 {
456 return true;
457 }
458 }
459
460 return false;
461 }

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

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

◆ IsValveActive()

bool IsValveActive ( int pValveIndex)
protected
464 {
466 }

Перекрестные ссылки m_ValveStates и VALVES_COUNT.

Используется в HandleSoundEffectsUnderwaterPipeSounds(), HandleVisualEffects() и IsValveTurnable().

◆ IsValvePressureLevelGaugeAtBase()

bool IsValvePressureLevelGaugeAtBase ( int pValveIndex)
protected
887 {
888 switch (pValveIndex)
889 {
892 break;
893 case VALVE_INDEX_FILL:
895 break;
896 }
897
898 return 0.0;
899 }

Перекрестные ссылки GetValvePressureLevelGauge(), VALVE_INDEX_DRAIN и VALVE_INDEX_FILL.

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

◆ IsValveTurnable()

override bool IsValveTurnable ( int pValveIndex)
protected

Перекрестные ссылки IsValveActive() и IsValvePressureLevelGaugeAtBase().

◆ Land_Underground_WaterReservoir()

void Land_Underground_WaterReservoir ( )
protected
154 {
155 SetEventMask(EntityEvent.POSTSIMULATE);
156
157 Init();
158 }
void Init()
Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside o...
Definition Land_Underground_WaterReservoir.c:333
EntityEvent
Entity events for event-mask, or throwing event from code.
Definition EnEntity.c:45

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

Используется в CreateAndSetupActionCallback(), OnEndAnimationLoop(), OnFinishProgressServer() и OnStartAnimationLoopServer().

◆ LateInit()

void LateInit ( )
protected
389 {
392
394
396
398
399 if (GetGame().IsServer())
400 {
402 m_SpawnedWaterObject.SetOrientation(GetOrientation());
404 }
405
406 GetGame().RegisterNetworkStaticObject(this);
407 SetSynchDirty();
408 }
const int ECE_CREATEPHYSICS
Definition CentralEconomy.c:16
void RegisterValve(string pCompName, int pIndex)
Definition Land_Underground_WaterReservoir.c:575
void TranslateMemoryPointsToWaterLevels()
Definition Land_Underground_WaterReservoir.c:586
Object m_SpawnedWaterObject
Definition Land_Underground_WaterReservoir.c:123
class WaterLevelSnapshot OBJECT_NAME_WATER_PLANE
vector m_WaterLevelDefault
Definition Land_Underground_WaterReservoir.c:124
void ConfigureValvesAndGaugesCourse()
Definition Land_Underground_WaterReservoir.c:410

Перекрестные ссылки ConfigureValvesAndGaugesCourse(), ECE_CREATEPHYSICS, GetGame(), GetOrientation(), m_SpawnedWaterObject, m_WaterLevelDefault, m_WaterLevelsAvailable, OBJECT_NAME_WATER_PLANE, RegisterValve(), SetWaterLevelHeight(), TranslateMemoryPointsToWaterLevels(), VALVE_INDEX_DRAIN, VALVE_INDEX_FILL, VALVE_NAME_DRAIN, VALVE_NAME_FILL и WATER_LEVEL_AVERAGE.

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

◆ OnValveManipulationCanceled()

void OnValveManipulationCanceled ( int pValveIndex)
protected
521 {
522 if (GetGame().IsServer())
523 {
526 SetSynchDirty();
527 }
528 }
void AnimateValve(int pValveIndex, float pPhase)
Definition Land_Underground_WaterReservoir.c:845

Перекрестные ссылки AnimateValve(), GetGame() и m_ValveManipulatedIndex.

◆ OnValveManipulationEnd()

◆ OnValveManipulationStart()

void OnValveManipulationStart ( int pValveIndex)
protected
483 {
484 if (GetGame().IsServer())
485 {
488 SetSynchDirty();
489 }
490 }

Перекрестные ссылки AnimateValve(), GetGame() и m_ValveManipulatedIndex.

◆ OnVariablesSynchronized()

override void OnVariablesSynchronized ( )
protected
309 {
310 super.OnVariablesSynchronized();
311
313
316
317 if (m_ValveManipulatedIndex == -1)
319 }
bool m_ValveManipulationSoundRequested
VFX/SFX.
Definition Land_Underground_WaterReservoir.c:128
array< bool > UnpackBitsToArrayOfBoolStates(int pPackedBits, int pArrayLength)
Definition Land_Underground_WaterReservoir.c:1249
int m_ValveStatesPacked
Definition Land_Underground_WaterReservoir.c:108
void PlayValveManipulationSound()
Definition Land_Underground_WaterReservoir.c:939

Перекрестные ссылки m_ValveManipulatedIndex, m_ValveManipulationSoundRequested, m_ValveStates, m_ValveStatesPacked, PlayValveManipulationSound(), UnpackBitsToArrayOfBoolStates() и VALVES_COUNT.

◆ PackArrayOfBoolStatesIntoBits()

int PackArrayOfBoolStatesIntoBits ( array< bool > pStates)
protected
1235 {
1236 int packedBits = 0;
1237
1238 for (int i = 0; i < pStates.Count(); ++i)
1239 {
1240 if (pStates[i] == true)
1241 {
1242 packedBits |= 1 << i;
1243 }
1244 }
1245
1246 return packedBits;
1247 }

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

◆ PlayPipeCreakingSoundOnLocation()

void PlayPipeCreakingSoundOnLocation ( )
protected
1091 {
1095 }
const string SOUND_NAME_PIPE_CREAKING
Definition Land_Underground_WaterReservoir.c:63
const int PIPE_CREAKING_SOUND_LOCATIONS_COUNT
Definition Land_Underground_WaterReservoir.c:142
const string PIPE_CREAKING_SOUND_LOCATIONS[PIPE_CREAKING_SOUND_LOCATIONS_COUNT]
Definition Land_Underground_WaterReservoir.c:143

Перекрестные ссылки m_PipeCreakingSoundRequested, m_PipeCreakingSounds, PIPE_CREAKING_SOUND_LOCATIONS, PIPE_CREAKING_SOUND_LOCATIONS_COUNT, Math::RandomInt() и SOUND_NAME_PIPE_CREAKING.

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

◆ PlayValveManipulationSound()

void PlayValveManipulationSound ( )
protected
940 {
942 {
945 break;
946 case VALVE_INDEX_FILL:
948 break;
949 }
950 }
const string SOUND_NAME_VALVE_MANIPULATION
Definition Land_Underground_WaterReservoir.c:64
ref EffectSound m_ValveManipulationSound
Definition Land_Underground_WaterReservoir.c:129

Перекрестные ссылки m_ValveManipulatedIndex, m_ValveManipulationSound, m_ValveManipulationSoundRequested, SOUND_NAME_VALVE_MANIPULATION, VALVE_INDEX_DRAIN, VALVE_INDEX_FILL, VALVE_NAME_DRAIN и VALVE_NAME_FILL.

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

◆ PressureLevelSettings()

void PressureLevelSettings ( int pPressureLevel,
float pDuration )
19 {
22 }
float Duration
Definition Land_Underground_WaterReservoir.c:16
class WaterLevelSettings PressureLevel

Перекрестные ссылки Duration и PressureLevel.

Используется в ActualPressureLevelStageSettings(), ConfigureValvesAndGaugesCourse(), EOnPostSimulate() и PreviousPressureLevelStageSettings().

◆ PressureLevelToValue()

float PressureLevelToValue ( int pPressureLevel)
protected
641 {
642 switch (pPressureLevel)
643 {
644 case PL_MIN:
645 return 0.0;
646 case PL_AVERAGE:
647 return 0.5;
648 case PL_MAX:
649 return 1.0;
650 }
651
652 return 0.0;
653 }

Перекрестные ссылки PL_AVERAGE, PL_MAX и PL_MIN.

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

◆ PreviousPressureLevelStageSettings()

◆ PreviousWaterLevelStageSettings()

◆ RegisterValve()

void RegisterValve ( string pCompName,
int pIndex )
protected

◆ ResetState()

void ResetState ( )
protected

Перекрестные ссылки CleanSoundEffects(), m_DrainValvePressureLevelStageIndex, m_DrainValveWaterLevelStageIndex, m_FillValvePressureLevelStageIndex, m_FillValveWaterLevelStageIndex, m_LastActiveValve, m_PipeCreakingSoundRequested, m_PressureAnimationRequests, m_PressureDeanimationRequests, m_PressureTimesAccumulated, m_ValveManipulatedIndex, m_ValveManipulatedIndexPrev, m_ValveStates, m_WaterLevelHeightActual, m_WaterLevelsAvailable, m_WaterLevelTimesAccumulated, SetValvePressureLevelGauge(), SetWaterLevelHeight(), VALVE_INDEX_DRAIN, VALVE_INDEX_FILL, WATER_LEVEL_AVERAGE, WaterLevelToHeight() и WL_AVERAGE.

◆ SetActions()

override void SetActions ( )
protected
322 {
323 super.SetActions();
324
326 }
ActionTurnValveUndergroundReservoirCB ActionTurnValveCB ActionTurnValveUndergroundReservoir()
Definition ActionTurnValveUndergroundReservoir.c:12
void AddAction(typename actionName)
Definition AdvancedCommunication.c:220

Перекрестные ссылки ActionTurnValveUndergroundReservoir() и AddAction().

◆ SetDefaultPressureLevelStageSettings()

void SetDefaultPressureLevelStageSettings ( int pValveIndex)
protected
833 {
834 switch (pValveIndex)
835 {
838 break;
839 case VALVE_INDEX_FILL:
841 break;
842 }
843 }

Перекрестные ссылки m_DrainValvePressureLevelStageIndex, m_FillValvePressureLevelStageIndex, VALVE_INDEX_DRAIN и VALVE_INDEX_FILL.

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

◆ SetLastActiveValve()

void SetLastActiveValve ( int pValveIndex)
protected
556 {
558 }

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

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

◆ SetValvePressureLevelGauge()

void SetValvePressureLevelGauge ( int pValveIndex,
float pValue )
protected
859 {
860 switch (pValveIndex)
861 {
863 SetAnimationPhase(ANIM_PHASE_VALVE_GAUGE_DRAIN, pValue);
864 break;
865 case VALVE_INDEX_FILL:
866 SetAnimationPhase(ANIM_PHASE_VALVE_GAUGE_FILL, pValue);
867 break;
868 }
869 }

Перекрестные ссылки ANIM_PHASE_VALVE_GAUGE_DRAIN, ANIM_PHASE_VALVE_GAUGE_FILL, VALVE_INDEX_DRAIN и VALVE_INDEX_FILL.

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

◆ SetWaterLevelHeight()

void SetWaterLevelHeight ( float pHeight)
protected
561 {
562 if (GetGame() && GetGame().IsServer())
563 {
567
569 {
570 m_SpawnedWaterObject.SetPosition(pos);
571 }
572 }
573 }
int HeightToWaterLevel(float pHeight)
Definition Land_Underground_WaterReservoir.c:618
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

Перекрестные ссылки GetGame(), HeightToWaterLevel(), m_SpawnedWaterObject, m_WaterLevelActual, m_WaterLevelDefault, m_WaterLevelHeightActual и Vector().

Используется в EOnPostSimulate(), LateInit() и ResetState().

◆ SyncValveVariables()

void SyncValveVariables ( )
protected
1222 {
1223 if (GetGame())
1224 {
1227 {
1229 SetSynchDirty();
1230 }
1231 }
1232 }
int PackArrayOfBoolStatesIntoBits(array< bool > pStates)
Definition Land_Underground_WaterReservoir.c:1234
int m_ValveStatesPackedPrev
Definition Land_Underground_WaterReservoir.c:109

Перекрестные ссылки GetGame(), m_ValveStates, m_ValveStatesPacked, m_ValveStatesPackedPrev и PackArrayOfBoolStatesIntoBits().

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

◆ TranslateMemoryPointsToWaterLevels()

void TranslateMemoryPointsToWaterLevels ( )
protected
587 {
589 for (int i = 0; i < WATER_LEVELS_COUNT; ++i)
590 {
591 if (MemoryPointExists(WATER_LEVELS[i]))
592 {
593 if (!m_WaterLevelsAvailable.Contains(WATER_LEVELS[i]))
594 {
595 m_WaterLevelsAvailable.Insert(WATER_LEVELS[i], ModelToWorld(GetMemoryPointPos(WATER_LEVELS[i])));
596 }
597 }
598 }
599 }
const string WATER_LEVELS[WATER_LEVELS_COUNT]
Definition Land_Underground_WaterReservoir.c:101
const int WATER_LEVELS_COUNT
Definition Land_Underground_WaterReservoir.c:100

Перекрестные ссылки m_WaterLevelsAvailable, WATER_LEVELS и WATER_LEVELS_COUNT.

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

◆ UnpackBitsToArrayOfBoolStates()

array< bool > UnpackBitsToArrayOfBoolStates ( int pPackedBits,
int pArrayLength )
protected
1250 {
1252 for (int i = 0; i < pArrayLength; ++i)
1253 {
1254 if ((pPackedBits & 1 << i) != 0)
1255 {
1256 unpackedBools.Insert(true);
1257 }
1258 else
1259 {
1260 unpackedBools.Insert(false);
1261 }
1262 }
1263
1264 return unpackedBools;
1265 }

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

◆ WaterLevelToHeight()

float WaterLevelToHeight ( int pWaterLevel)
protected
602 {
603 switch (pWaterLevel)
604 {
605 case WL_MIN:
607 case WL_ABOVE_PIPES:
609 case WL_AVERAGE:
611 case WL_MAX:
613 }
614
615 return 0;
616 }

Перекрестные ссылки m_WaterLevelsAvailable, WATER_LEVEL_ABOVE_PIPES, WATER_LEVEL_AVERAGE, WATER_LEVEL_MAX, WATER_LEVEL_MIN, WL_ABOVE_PIPES, WL_AVERAGE, WL_MAX и WL_MIN.

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

◆ ~Land_Underground_WaterReservoir()

161 {
164 }
void CleanVisualEffects()
Definition Land_Underground_WaterReservoir.c:1175

Перекрестные ссылки CleanSoundEffects() и CleanVisualEffects().

Переменные

◆ ANIM_PHASE_VALVE_DRAIN

const string ANIM_PHASE_VALVE_DRAIN = "Valve1"
protected

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

◆ ANIM_PHASE_VALVE_FILL

const string ANIM_PHASE_VALVE_FILL = "Valve2"
protected

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

◆ ANIM_PHASE_VALVE_GAUGE_DRAIN

const string ANIM_PHASE_VALVE_GAUGE_DRAIN = "ValveGauge1"
protected

tighter broken pipe

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

◆ ANIM_PHASE_VALVE_GAUGE_FILL

const string ANIM_PHASE_VALVE_GAUGE_FILL = "ValveGauge2"
protected

◆ Duration

float Duration

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

◆ m_DrainValvePressureDeanimationSettings

ref array<ref PressureLevelSettings> m_DrainValvePressureDeanimationSettings
protected

◆ m_DrainValvePressureLevelStageIndex

◆ m_DrainValvePressureStageSettings

◆ m_DrainValveWaterLevelStageIndex

int m_DrainValveWaterLevelStageIndex
protected

◆ m_DrainValveWaterStageSettings

ref array<ref WaterLevelSettings> m_DrainValveWaterStageSettings
protected

◆ m_FillValvePressureDeanimationSettings

◆ m_FillValvePressureLevelStageIndex

◆ m_FillValvePressureStageSettings

◆ m_FillValveWaterLevelStageIndex

◆ m_FillValveWaterStageSettings

◆ m_LastActiveValve

int m_LastActiveValve
protected

Используется в EOnPostSimulate(), Init(), ResetState() и SetLastActiveValve().

◆ m_PipeBrokenParticles

ref ParticleSourceArray m_PipeBrokenParticles
protected

Используется в CleanVisualEffects(), HandleVisualEffects() и Init().

◆ m_PipeCreakingSoundRequested

bool m_PipeCreakingSoundRequested
protected

◆ m_PipeCreakingSounds

ref EffectSound m_PipeCreakingSounds
protected

◆ m_PipeSounds

ref array<EffectSound> m_PipeSounds
protected

◆ m_PipeUnderwaterSound

ref EffectSound m_PipeUnderwaterSound
protected

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

◆ m_PressureAnimationRequests

ref array<bool> m_PressureAnimationRequests
protected

◆ m_PressureDeanimationRequests

ref array<bool> m_PressureDeanimationRequests
protected

Используется в EOnPostSimulate(), Init(), RegisterValve() и ResetState().

◆ m_PressureTimesAccumulated

ref array<float> m_PressureTimesAccumulated
protected

Используется в EOnPostSimulate(), Init(), RegisterValve() и ResetState().

◆ m_SpawnedWaterObject

Object m_SpawnedWaterObject
protected

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

◆ m_ValveManipulatedIndex

◆ m_ValveManipulatedIndexPrev

int m_ValveManipulatedIndexPrev
protected

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

◆ m_ValveManipulationSound

ref EffectSound m_ValveManipulationSound
protected

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

◆ m_ValveManipulationSoundRequested

bool m_ValveManipulationSoundRequested
protected

VFX/SFX.

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

◆ m_ValveNames

ref array<string> m_ValveNames
protected

Используется в GetTurnableValveIndex(), Init() и RegisterValve().

◆ m_ValveParticles

ref ParticleSourceArray m_ValveParticles
protected

Используется в CleanVisualEffects(), HandleVisualEffects() и Init().

◆ m_ValveStates

◆ m_ValveStatesPacked

int m_ValveStatesPacked
protected

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

◆ m_ValveStatesPackedPrev

int m_ValveStatesPackedPrev
protected

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

◆ m_WaterLevelActual

◆ m_WaterLevelDefault

vector m_WaterLevelDefault
protected

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

◆ m_WaterLevelHeightActual

float m_WaterLevelHeightActual
protected

Используется в EOnPostSimulate(), ResetState() и SetWaterLevelHeight().

◆ m_WaterLevelMovementSound

ref EffectSound m_WaterLevelMovementSound
protected

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

◆ m_WaterLevelPrev

◆ m_WaterLevelsAvailable

ref map<string, vector> m_WaterLevelsAvailable
protected

◆ m_WaterLevelSnapshot

ref WaterLevelSnapshot m_WaterLevelSnapshot
protected

for deanimation purposes

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

◆ m_WaterLevelTimesAccumulated

ref array<float> m_WaterLevelTimesAccumulated
protected

Используется в EOnPostSimulate(), Init(), RegisterValve() и ResetState().

◆ OBJECT_NAME_WATER_PLANE

class WaterLevelSnapshot OBJECT_NAME_WATER_PLANE = "Land_Underground_WaterReservoir_Water"

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

◆ PARTICLE_DRAIN_PIPE_MAX_PRESSURE

const int PARTICLE_DRAIN_PIPE_MAX_PRESSURE = ParticleList.WATER_SPILLING
protected

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

◆ PARTICLE_FILL_PIPE_JET

const int PARTICLE_FILL_PIPE_JET = ParticleList.WATER_JET
protected

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

◆ PARTICLE_FILL_PIPE_JET_WEAK

const int PARTICLE_FILL_PIPE_JET_WEAK = ParticleList.WATER_JET_WEAK
protected

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

◆ PARTICLE_FILL_PIPE_MAX_PRESSURE

const int PARTICLE_FILL_PIPE_MAX_PRESSURE = ParticleList.WATER_SPILLING
protected

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

◆ PIPE_CREAKING_MAX_TIME_DELAY_MS

const int PIPE_CREAKING_MAX_TIME_DELAY_MS = 15000
protected

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

◆ PIPE_CREAKING_MIN_TIME_DELAY_MS

const int PIPE_CREAKING_MIN_TIME_DELAY_MS = 10000
protected

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

◆ PIPE_CREAKING_SOUND_LOCATIONS

const string PIPE_CREAKING_SOUND_LOCATIONS[PIPE_CREAKING_SOUND_LOCATIONS_COUNT]
protected
Инициализатор
= {
"pipe_creaking_sound_pos_1",
"pipe_creaking_sound_pos_2",
"pipe_creaking_sound_pos_3",
"pipe_creaking_sound_pos_4"
}
143 {
144 "pipe_creaking_sound_pos_1",
145 "pipe_creaking_sound_pos_2",
146 "pipe_creaking_sound_pos_3",
147 "pipe_creaking_sound_pos_4"
148 };

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

◆ PIPE_CREAKING_SOUND_LOCATIONS_COUNT

const int PIPE_CREAKING_SOUND_LOCATIONS_COUNT = 4
protected

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

◆ PIPE_INDEX_BROKEN1

const int PIPE_INDEX_BROKEN1 = 0
protected

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

◆ PIPE_INDEX_BROKEN2

const int PIPE_INDEX_BROKEN2 = 1
protected

main broken pipe

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

◆ PIPE_NAME_BROKEN1

const string PIPE_NAME_BROKEN1 = "pipe_broken_1"
protected

◆ PIPE_NAME_BROKEN2

const string PIPE_NAME_BROKEN2 = "pipe_broken_2"
protected

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

◆ PIPE_NAME_LEAKING_DRAIN

const string PIPE_NAME_LEAKING_DRAIN = "pipe_leaking_1"
protected

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

◆ PIPE_NAME_LEAKING_FILL

const string PIPE_NAME_LEAKING_FILL = "pipe_leaking_2"
protected

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

◆ PIPES_BROKEN_COUNT

const int PIPES_BROKEN_COUNT = 2
protected

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

◆ PL_AVERAGE

const int PL_AVERAGE = 1
protected

◆ PL_MAX

const int PL_MAX = 2
protected

◆ PL_MIN

const int PL_MIN = 0
protected

◆ PressureLevel

class WaterLevelSettings PressureLevel

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

◆ SOUND_NAME_PIPE_CREAKING

const string SOUND_NAME_PIPE_CREAKING = "WaterObjectUndergroundPipeCreaking_SoundSet"
protected

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

◆ SOUND_NAME_PIPE_SPRINKLING_END

const string SOUND_NAME_PIPE_SPRINKLING_END = "WaterObjectUndergroundPipeSprinkling_End_SoundSet"
protected

◆ SOUND_NAME_PIPE_SPRINKLING_LOOP1

const string SOUND_NAME_PIPE_SPRINKLING_LOOP1 = "WaterObjectUndergroundPipeSprinkling_Loop1_SoundSet"
protected

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

◆ SOUND_NAME_PIPE_SPRINKLING_LOOP2

const string SOUND_NAME_PIPE_SPRINKLING_LOOP2 = "WaterObjectUndergroundPipeSprinkling_Loop2_SoundSet"
protected

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

◆ SOUND_NAME_PIPE_SPRINKLING_START

const string SOUND_NAME_PIPE_SPRINKLING_START = "WaterObjectUndergroundPipeSprinkling_Start_SoundSet"
protected

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

◆ SOUND_NAME_UPIPE_SPRINKLING_END

const string SOUND_NAME_UPIPE_SPRINKLING_END = "WaterObjectUndergroundUnderwaterPipe_End_SoundSet"
protected

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

◆ SOUND_NAME_UPIPE_SPRINKLING_LOOP

const string SOUND_NAME_UPIPE_SPRINKLING_LOOP = "WaterObjectUndergroundUnderwaterPipe_Loop_SoundSet"
protected

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

◆ SOUND_NAME_UPIPE_SPRINKLING_START

const string SOUND_NAME_UPIPE_SPRINKLING_START = "WaterObjectUndergroundUnderwaterPipe_Start_SoundSet"
protected

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

◆ SOUND_NAME_VALVE_MANIPULATION

const string SOUND_NAME_VALVE_MANIPULATION = "WaterObjectUndergroundValve_SoundSet"
protected

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

◆ SOUND_NAME_WATER_DRAIN_LOOP

const string SOUND_NAME_WATER_DRAIN_LOOP = "WaterObjectUndergroundUnderwaterEmpty_Loop_SoundSet"
protected

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

◆ SOUND_NAME_WATER_FILL_LOOP

const string SOUND_NAME_WATER_FILL_LOOP = "WaterObjectUndergroundUnderwaterFill_Loop_SoundSet"
protected

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

◆ VALVE_INDEX_DRAIN

◆ VALVE_INDEX_FILL

◆ VALVE_NAME_DRAIN

const string VALVE_NAME_DRAIN = "valve1"
protected

◆ VALVE_NAME_FILL

const string VALVE_NAME_FILL = "valve2"
protected

◆ VALVES_COUNT

const int VALVES_COUNT = 2
protected

◆ WATER_LEVEL_ABOVE_PIPES

const string WATER_LEVEL_ABOVE_PIPES = "water_level_above_pipes"
staticprotected

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

◆ WATER_LEVEL_AVERAGE

const string WATER_LEVEL_AVERAGE = "water_level_average"
staticprotected

◆ WATER_LEVEL_MAX

const string WATER_LEVEL_MAX = "water_level_max"
staticprotected

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

◆ WATER_LEVEL_MIN

const string WATER_LEVEL_MIN = "water_level_min"
staticprotected

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

◆ WATER_LEVELS

◆ WATER_LEVELS_COUNT

const int WATER_LEVELS_COUNT = 4
protected

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

◆ WL_ABOVE_PIPES

◆ WL_AVERAGE

◆ WL_MAX

◆ WL_MIN

const int WL_MIN = 0
protected