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

◆ OnProjectileStoppedInTerrain()

void CGame::OnProjectileStoppedInTerrain ( TerrainCollisionInfo info)
inlineprotected

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

3550 {
3551 string simulation;
3552
3553 if (info.GetIsWater())
3554 return;
3555
3556 g_Game.ConfigGetText("cfgAmmo " + info.GetAmmoType() + " simulation", simulation);
3557 if (simulation == "shotArrow")
3558 {
3559 string pile;
3560 g_Game.ConfigGetText("cfgAmmo " + info.GetAmmoType() + " spawnPileType", pile);
3561 vector pos = info.GetPos();
3562 vector dir = -info.GetInVelocity();
3563
3564 dir.Normalize();
3565 pos -= dir * ARROW_PIERCE_DEPTH;
3566
3567 EntityAI arrow = EntityAI.Cast(g_Game.CreateObjectEx(pile, pos, ECE_KEEPHEIGHT|ECE_DYNAMIC_PERSISTENCY));
3568 arrow.SetDirection(dir);
3569 arrow.SetFromProjectile(info);
3570 }
3571 }
class LogManager EntityAI
const int ECE_KEEPHEIGHT
Определения CentralEconomy.c:27
const int ECE_DYNAMIC_PERSISTENCY
Определения CentralEconomy.c:32
DayZGame g_Game
Определения DayZGame.c:3942
const float ARROW_PIERCE_DEPTH
Определения DayZGame.c:3546
proto float Normalize()
Normalizes vector. Returns length.

Перекрестные ссылки ARROW_PIERCE_DEPTH, ECE_DYNAMIC_PERSISTENCY, ECE_KEEPHEIGHT, g_Game и vector::Normalize().