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

◆ ExplosionEffects()

void CGame::ExplosionEffects ( Object source,
Object directHit,
int componentIndex,
string surface,
vector pos,
vector surfNormal,
float energyFactor,
float explosionFactor,
bool isWater,
string ammoType )
inlineprotected

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

3625 {
3626 #ifndef SERVER
3627 #ifndef NO_GUI
3628 if (source)
3629 {
3630 if (g_Game.GetPlayer() == null)
3631 return;
3632 source.OnExplosionEffects(source, directHit, componentIndex, surface, pos, surfNormal, energyFactor, explosionFactor, isWater, ammoType);
3633
3634 ExplosiveEffectData explosiveEffectData = AmmoTypesAPI.GetExplosiveEffectData(ammoType, surface);
3635 if (explosiveEffectData.m_ParticleID > 0)
3636 {
3637 ParticleSource particleSource = ParticleManager.GetInstance().PlayInWorld(explosiveEffectData.m_ParticleID, pos);
3638 particleSource.SetStartSoundParams(explosiveEffectData.m_SoundSetName, pos);
3639 }
3640
3641 float distance_to_player = vector.Distance(pos, g_Game.GetPlayer().GetPosition());
3643
3644 if (distance_to_player < m_AmmoShakeParams.m_Radius)
3645 {
3646 float dist01 = Math.InverseLerp(0, m_AmmoShakeParams.m_Radius, distance_to_player);
3647 float modifier = Math.Lerp(m_AmmoShakeParams.m_ModifierClose, m_AmmoShakeParams.m_ModifierFar,dist01);
3648
3649 g_Game.GetPlayer().GetCurrentCamera().SpawnCameraShake(modifier * m_AmmoShakeParams.m_Strength);
3650 }
3651 }
3652 #endif
3653 #endif
3654 }
void AmmoTypesAPI()
Определения AmmoTypes.c:17
DayZGame g_Game
Определения DayZGame.c:4074
string ammoType
Определения DustKickupEffects.c:24
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Определения ParticleManager.c:88
static ref AmmoCamParams m_AmmoShakeParams
Определения DayZGame.c:989
string m_SoundSetName
Определения AmmoTypes.c:4
int m_ParticleID
Определения AmmoTypes.c:3

Перекрестные ссылки ammoType, AmmoTypesAPI(), vector::Distance(), g_Game, Math::InverseLerp(), Math::Lerp(), m_AmmoShakeParams, ExplosiveEffectData::m_ParticleID, ExplosiveEffectData::m_SoundSetName и ParticleManager().

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