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

◆ PlayVegetationCollideParticles()

static void MiscEffects::PlayVegetationCollideParticles ( Object object,
DayZPlayerImplement player )
inlinestaticprotected

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

8 {
10 if (m_VegeCollideColldowns.Get(object))
11 return;
12
13 int particleID;
14 string particleName;
15 string configPath = "CfgNonAIVehicles " + object.GetType() + " collisionParticle";
16 GetGame().ConfigGetText(configPath, particleName);
17 if (particleName == string.Empty) // no ptc assigned
18 return;
19
20 particleID = ParticleList.GetParticleIDByName(particleName);
21 vector playerPos = player.GetPosition();
22 vector ptcPos = playerPos - object.GetPosition();
23
24 ptcPos[0] = ptcPos[0] * Math.RandomFloat(0, 0.5); // randomize
25 ptcPos[2] = ptcPos[2] * Math.RandomFloat(0, 0.5);
26
27 ptcPos = playerPos - ptcPos;
28 ptcPos[1] = playerPos[1] + Math.RandomFloat(0.5, 1.5);
29
30 ParticleManager.GetInstance().PlayInWorld(particleID, ptcPos);
31
32 m_VegeCollideColldowns.Insert(object, GetWorldTime());
33 }
Empty
Определения Hand_States.c:14
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Определения ParticleManager.c:88
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
static void UpdateVegeCollisionCooldowns()
Определения MiscEffects.c:35
static ref map< Object, float > m_VegeCollideColldowns
Определения MiscEffects.c:4
proto native CGame GetGame()
proto native float GetWorldTime()

Перекрестные ссылки CGame::ConfigGetText(), Empty, GetGame(), ParticleList::GetParticleIDByName(), GetWorldTime(), m_VegeCollideColldowns, ParticleManager(), Math::RandomFloat() и UpdateVegeCollisionCooldowns().

Используется в DayZPlayer::OnStepEvent().