DayZ 1.28
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 строка 830

831 {
832 super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
833 m_TransportHitRegistered = false;
834
835 int transferShockToDamageCoef = g_Game.ConfigGetInt(string.Format("%1 %2 DamageApplied transferShockToDamage", CFG_AMMO, ammo));
836 if (transferShockToDamageCoef == 1)
837 {
838 //Print("DayZAnimal | EEHitBy | nonlethal hit");
839 AddHealth("", "Health", -ConvertNonlethalDamage(damageResult.GetDamage(dmgZone, "Shock"), damageType));
840 }
841 else
842 {
843 ComponentAnimalBleeding animal_bleeding = ComponentAnimalBleeding.Cast( GetComponent( COMP_TYPE_ANIMAL_BLEEDING ) );
844 animal_bleeding.CreateWound( damageResult, dmgZone, ammo );
845 }
846
847 int type = 0;
848 int direction = 0;
849 if (ComputeDamageHitParams(source, dmgZone, ammo, type, direction) == true)
850 {
851 QueueDamageHit(type, direction);
852 }
853
854 }
DayZGame g_Game
Определения DayZGame.c:3868
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:863
float ConvertNonlethalDamage(float damage, DamageType damageType)
Определения DayZAnimal.c:999
void QueueDamageHit(int type, int direction)
Определения DayZAnimal.c:856
proto native float GetDamage(string zoneName, string healthType)
const int COMP_TYPE_ANIMAL_BLEEDING
Определения Component.c:11
const string CFG_AMMO
Определения 3_Game/constants.c:223

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