DayZ 1.27
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 строка 3419

3421 {
3422 #ifndef SERVER
3423 if (source)
3424 {
3425 if (GetGame().GetPlayer() == null)
3426 return;
3427 source.OnExplosionEffects(source, directHit, componentIndex, surface, pos, surfNormal, energyFactor, explosionFactor, isWater, ammoType);
3428
3429 if (source.ShootsExplosiveAmmo() )
3430 {
3431 int particleID = AmmoTypesAPI.GetExplosionParticleID(ammoType, surface);
3432 if (particleID > -1)
3433 {
3434 ParticleManager.GetInstance().PlayInWorld(particleID, pos);
3435 }
3436 }
3437
3438
3439 float distance_to_player = vector.Distance(pos, GetGame().GetPlayer().GetPosition());
3440 m_AmmoShakeParams.Load(ammoType);
3441
3442 if (distance_to_player < m_AmmoShakeParams.m_Radius)
3443 {
3444 float dist01 = Math.InverseLerp(0, m_AmmoShakeParams.m_Radius, distance_to_player);
3445 float modifier = Math.Lerp(m_AmmoShakeParams.m_ModifierClose, m_AmmoShakeParams.m_ModifierFar,dist01);
3446
3447 GetGame().GetPlayer().GetCurrentCamera().SpawnCameraShake(modifier * m_AmmoShakeParams.m_Strength);
3448 }
3449 }
3450 #endif
3451 }
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Определения ParticleManager.c:88
proto native DayZPlayer GetPlayer()
static ref AmmoCamParams m_AmmoShakeParams
Определения DayZGame.c:966
proto native CGame GetGame()
class JsonUndergroundAreaTriggerData GetPosition
Определения UndergroundAreaLoader.c:9

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

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