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

◆ BloodSplatGround()

void Hit_MeatBones::BloodSplatGround ( vector start_pos,
vector speed_vector,
float decay_coef )
inlineprivate

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

69 {
70 vector pos = start_pos;
71
72 float groundHeight = g_Game.SurfaceY(pos[0], pos[2]);
73 if (groundHeight > start_pos[1])
74 return;
75
76 float power = m_StoppingForce;
77 float upscale = 1;
78 float rnd_offset = 0.5;
79 float rnd_offset_2 = rnd_offset * 0.5;
80
81 while (power > 200)
82 {
83 pos = pos + ( speed_vector * 0.001 );
84 pos = pos + Vector( rnd_offset_2 - Math.RandomFloat( 0, rnd_offset ), 0, rnd_offset_2 - Math.RandomFloat( 0, rnd_offset ) );
85 pos[1] = g_Game.SurfaceY(pos[0], pos[2]);
86
87 EffectParticle eff = new BloodSplatter();
88 eff.SetAutodestroy(true);
89 SEffectManager.PlayInWorld(eff, pos);
90
91 Particle blood = eff.GetParticle(); // TO DO: Handle particle changes inside the Effect instance itself! Not here!
92
93 vector ori = g_Game.GetSurfaceOrientation(pos[0], pos[2]);
94
95 blood.SetOrientation(ori);
96 blood.ScaleParticleParam(EmitorParam.SIZE, upscale);
97
98 Particle blood_chunks = ParticleManager.GetInstance().PlayInWorld(ParticleList.BLOOD_SURFACE_CHUNKS, pos);
99 blood_chunks.SetOrientation(ori);
100
101 power = power * decay_coef;
102 upscale = upscale + Math.RandomFloat(0.1, 1);
103
105 }
106 }
DayZGame g_Game
Определения DayZGame.c:4074
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Определения ParticleManager.c:88
float m_StoppingForce
Определения BulletImpactBase.c:10
Particle GetParticle()
Gets the main particle which this Effect is managing.
Определения EffectParticle.c:166
void EffectParticle()
ctor
Определения EffectParticle.c:36
void BloodSplatWall()
Определения Hit_MeatBones.c:108
void ScaleParticleParam(int parameter_id, float coef)
Scales the given parameter on all emitors relatively to their CURRENT value.
Определения Particle.c:697
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
EmitorParam
Определения EnVisual.c:114

Перекрестные ссылки ParticleList::BLOOD_SURFACE_CHUNKS, BloodSplatWall(), EffectParticle::EffectParticle(), g_Game, EffectParticle::GetParticle(), EffBulletImpactBase::m_StoppingForce, ParticleManager(), SEffectManager::PlayInWorld(), Math::RandomFloat(), Particle::ScaleParticleParam() и Vector().

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