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

◆ PlayConstructionSound()

void PlayConstructionSound ( EntityAI parent,
vector effectPos )
protected

Plays sound of current construction state on parent; BaseBuildingBase uses its own class events for this..

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

814 {
815 string soundsetName = "";
816 ConstructionPartEffectsData effData = m_PartTypeData.GetPartTypeEffectsData();
817 if (!m_IsBuilt)
818 {
819 //HP check first
820 string damageZone;
821 DamageSystem.GetDamageZoneFromComponentName(parent, GetPartName(), damageZone);
822
823 bool isDestruction;
824 if (g_Game.IsMultiplayer())
825 isDestruction = parent.GetHealthLevel(damageZone) == GameConstants.STATE_RUINED;
826 else //SP solution below
827 isDestruction = parent.GetHealth(damageZone, "Health") <= 0;
828
829 if (!isDestruction)
830 {
831 //dismantle
832 soundsetName = effData.GetSoundsetDismantle();
833 }
834 else
835 {
836 //destroy
837 soundsetName = effData.GetSoundsetDestroy();
838 }
839 }
840 else
841 {
842 //build
843 soundsetName = effData.GetSoundsetBuild();
844 }
845
846 if (soundsetName != "")
847 SEffectManager.PlaySoundEnviroment(soundsetName, effectPos);
848 }
ConstructionPartTypeData m_PartTypeData
Определения ConstructionPart.c:526
bool m_IsBuilt
Определения ConstructionPart.c:528
string GetPartName()
Определения ConstructionPart.c:715
DayZGame g_Game
Определения DayZGame.c:4074
string GetSoundsetBuild()
Определения ConstructionEffects.c:245
string GetSoundsetDismantle()
Определения ConstructionEffects.c:250
string GetSoundsetDestroy()
Определения ConstructionEffects.c:255
static EffectSound PlaySoundEnviroment(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound, updating environment variables.
Определения EffectManager.c:237
Manager class for managing Effect (EffectParticle, EffectSound)
Определения EffectManager.c:6
const int STATE_RUINED
Определения 3_Game/DayZ/constants.c:909

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