DayZ 1.29
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 строка 3493

3495 {
3496 #ifndef SERVER
3497 if (source)
3498 {
3499 if (g_Game.GetPlayer() == null)
3500 return;
3501 source.OnExplosionEffects(source, directHit, componentIndex, surface, pos, surfNormal, energyFactor, explosionFactor, isWater, ammoType);
3502
3503 if (source.ShootsExplosiveAmmo() )
3504 {
3505 int particleID = AmmoTypesAPI.GetExplosionParticleID(ammoType, surface);
3506 if (particleID > -1)
3507 {
3508 ParticleManager.GetInstance().PlayInWorld(particleID, pos);
3509 }
3510 }
3511
3512
3513 float distance_to_player = vector.Distance(pos, g_Game.GetPlayer().GetPosition());
3514 m_AmmoShakeParams.Load(ammoType);
3515
3516 if (distance_to_player < m_AmmoShakeParams.m_Radius)
3517 {
3518 float dist01 = Math.InverseLerp(0, m_AmmoShakeParams.m_Radius, distance_to_player);
3519 float modifier = Math.Lerp(m_AmmoShakeParams.m_ModifierClose, m_AmmoShakeParams.m_ModifierFar,dist01);
3520
3521 g_Game.GetPlayer().GetCurrentCamera().SpawnCameraShake(modifier * m_AmmoShakeParams.m_Strength);
3522 }
3523 }
3524 #endif
3525 }
DayZGame g_Game
Определения DayZGame.c:3942
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Определения ParticleManager.c:88
static ref AmmoCamParams m_AmmoShakeParams
Определения DayZGame.c:968

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

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