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

◆ EEHitBy()

override void DayZCreatureAI::EEHitBy ( TotalDamageResult damageResult,
int damageType,
EntityAI source,
int component,
string dmgZone,
string ammo,
vector modelPos,
float speedCoef )
inlineprotected

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

833 {
834 super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
835 m_TransportHitRegistered = false;
836
837 int transferShockToDamageCoef = g_Game.ConfigGetInt(string.Format("%1 %2 DamageApplied transferShockToDamage", CFG_AMMO, ammo));
838 if (transferShockToDamageCoef == 1)
839 {
840 //Print("DayZAnimal | EEHitBy | nonlethal hit");
841 AddHealth("", "Health", -ConvertNonlethalDamage(damageResult.GetDamage(dmgZone, "Shock"), damageType));
842 }
843 else
844 {
845 ComponentAnimalBleeding animal_bleeding = ComponentAnimalBleeding.Cast( GetComponent( COMP_TYPE_ANIMAL_BLEEDING ) );
846 animal_bleeding.CreateWound( damageResult, dmgZone, ammo );
847 }
848
849 int type = 0;
850 int direction = 0;
851 if (ComputeDamageHitParams(source, dmgZone, ammo, type, direction) == true)
852 {
853 QueueDamageHit(type, direction);
854 }
855
856 }
DayZGame g_Game
Определения DayZGame.c:3942
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
void CreateWound(TotalDamageResult damage_result, string zone_name, string ammo)
Определения ComponentAnimalBleeding.c:51
bool ComputeDamageHitParams(EntityAI source, string dmgZone, string ammo, out int type, out int direction)
Определения DayZAnimal.c:865
float ConvertNonlethalDamage(float damage, DamageType damageType)
Определения DayZAnimal.c:1001
void QueueDamageHit(int type, int direction)
Определения DayZAnimal.c:858
proto native float GetDamage(string zoneName, string healthType)
const int COMP_TYPE_ANIMAL_BLEEDING
Определения Component.c:11
const string CFG_AMMO
Определения 3_Game/DayZ/constants.c:223

Перекрестные ссылки CFG_AMMO, COMP_TYPE_ANIMAL_BLEEDING, component, ComputeDamageHitParams(), ConvertNonlethalDamage(), ComponentAnimalBleeding::CreateWound(), g_Game, TotalDamageResult::GetDamage() и QueueDamageHit().