DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ 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 !!!

См. определение в файле StaminaEvents.c строка 15

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 }
DiagMenuIDs
Определения EDiagMenuIDs.c:2
AbstractWave m_SoundSetCallback
Определения SoundEvents.c:86
const int MAX_VOLUME
Определения StaminaEvents.c:3

Перекрестные ссылки DiagMenu::GetBool(), InventorySlots::GetSlotIdFromString(), Math::Lerp(), m_SoundSetCallback и MAX_VOLUME.