3433 {
3435 AnimSoundEvent soundEvent = null;
3436
3437 float quantity = 0;
3438
3439 EntityAI entityInHands = GetHumanInventory().GetEntityInHands();
3440 if (entityInHands && entityInHands.IsInherited(
ItemBase))
3441 {
3443 Class.CastTo(item, entityInHands);
3444 if (item.HasQuantity())
3445 quantity = (float)item.GetQuantity() / (item.GetQuantityMax() - item.GetQuantityMin());
3446 InventoryItemType invItemType = item.GetInventoryItemType();
3448 }
3449
3450 if (soundEvent == null)
3451 {
3452 quantity = 0;
3453 soundEvent = type.GetSoundWeaponEvent(pUserInt);
3454 }
3455
3456 if (soundEvent != null)
3457 {
3458 if (!
GetGame().IsDedicatedServer())
3459 {
3461 if (builder)
3462 {
3463 builder.AddVariable("quantity", quantity);
3464 builder.AddVariable("interior", IsSoundInsideBuilding());
3465
3466 SoundObject soundObject = builder.BuildSoundObject();
3467 if (soundObject != NULL)
3468 {
3471
3472 if (pUserString == "StopOnAnimEnd")
3474 }
3475 }
3476 else
3477 {
3478
3479 }
3480 }
3481
3483 {
3484 AddNoise(soundEvent.m_NoiseParams, NoiseAIEvaluate.GetNoiseReduction(
GetGame().GetWeather()));
3485 }
3486 }
3487 }
class GP5GasMask extends MaskBase ItemBase
ref array< AbstractWave > m_PerformedActionSounds
void AttenuateSoundIfNecessary(SoundObject soundObject)
int m_ActionSoundCategoryHash
void AddNoise(NoiseParams noisePar, float noiseMultiplier=1.0)
AnimSoundEvent GetSoundEvent(int event_id)
proto native DayZPlayerType GetDayZPlayerType()
returns appropriate DayZPlayerType
proto native CGame GetGame()
class AbstractSoundScene SoundObjectBuilder(SoundParams soundParams)
void SoundObject(SoundParams soundParams)