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

◆ CloseCombatEffects()

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

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

3596 {
3597 #ifndef SERVER
3598 ImpactEffectsData impactEffectsData = new ImpactEffectsData();
3599 impactEffectsData.m_DirectHit = directHit;
3600 impactEffectsData.m_ComponentIndex = componentIndex;
3601 impactEffectsData.m_Surface = surface;
3602 impactEffectsData.m_Position = pos;
3603 impactEffectsData.m_ImpactType = ImpactTypes.MELEE;
3604 impactEffectsData.m_SurfaceNormal = Vector(Math.RandomFloat(-1,1), Math.RandomFloat(-1,1), Math.RandomFloat(-1,1));
3605 impactEffectsData.m_ExitPosition = "0 0 0";
3606 impactEffectsData.m_InSpeed = "0 0 0";
3607 impactEffectsData.m_OutSpeed = "0 0 0";
3608 impactEffectsData.m_IsDeflected = false;
3609 impactEffectsData.m_AmmoType = ammoType;
3610 impactEffectsData.m_IsWater = isWater;
3611
3612 if (directHit)
3613 directHit.OnReceivedHit(impactEffectsData);
3614
3615 ImpactMaterials.EvaluateImpactEffectEx(impactEffectsData);
3616 #endif
3617
3618 // add hit noise
3619 if (IsServer())
3620 {
3621 m_NoiseParams.LoadFromPath("cfgAmmo " + ammoType + " NoiseHit");
3622
3623 float surfaceCoef = SurfaceGetNoiseMultiplier(directHit, pos, componentIndex);
3624 if (surfaceCoef == 0)
3625 surfaceCoef = 1;
3626
3627 GetNoiseSystem().AddNoisePos(EntityAI.Cast(source), pos, m_NoiseParams, surfaceCoef * GetGame().GetWeather().GetNoiseReductionByWeather());
3628 }
3629 }
class LogManager EntityAI
ImpactTypes
Определения ImpactEffects.c:2
proto native NoiseSystem GetNoiseSystem()
static ref NoiseParams m_NoiseParams
Определения DayZGame.c:982
proto native bool IsServer()
proto native Weather GetWeather()
Returns weather controller object.
proto native float SurfaceGetNoiseMultiplier(Object directHit, vector pos, int componentIndex)
proto void AddNoisePos(EntityAI source_entity, vector pos, NoiseParams noise_params, float external_strenght_multiplier=1.0)
proto native CGame GetGame()
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

Перекрестные ссылки NoiseSystem::AddNoisePos(), ImpactMaterials::EvaluateImpactEffectEx(), GetGame(), GetNoiseSystem(), GetWeather(), IsServer(), m_NoiseParams, Math::RandomFloat(), SurfaceGetNoiseMultiplier() и Vector().