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

◆ OnProjectileStoppedInTerrain()

void CGame::OnProjectileStoppedInTerrain ( TerrainCollisionInfo info)
inlineprotected

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

3679 {
3680 string simulation;
3681
3682 if (info.GetIsWater())
3683 return;
3684
3685 g_Game.ConfigGetText("cfgAmmo " + info.GetAmmoType() + " simulation", simulation);
3686 if (simulation == "shotArrow")
3687 {
3688 string pile;
3689 g_Game.ConfigGetText("cfgAmmo " + info.GetAmmoType() + " spawnPileType", pile);
3690 vector pos = info.GetPos();
3691 vector dir = -info.GetInVelocity();
3692
3693 dir.Normalize();
3694 pos -= dir * ARROW_PIERCE_DEPTH;
3695
3696 EntityAI arrow = EntityAI.Cast(g_Game.CreateObjectEx(pile, pos, ECE_KEEPHEIGHT|ECE_DYNAMIC_PERSISTENCY));
3697 arrow.SetDirection(dir);
3698 arrow.SetFromProjectile(info);
3699 }
3700 }
class LogManager EntityAI
const int ECE_KEEPHEIGHT
Определения CentralEconomy.c:28
const int ECE_DYNAMIC_PERSISTENCY
Определения CentralEconomy.c:33
DayZGame g_Game
Определения DayZGame.c:4074
const float ARROW_PIERCE_DEPTH
Определения DayZGame.c:3675
proto float Normalize()
Normalizes vector. Returns length.

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