DayZ 1.27
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 строка 786

787 {
788 super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
789 m_TransportHitRegistered = false;
790
791 int transferShockToDamageCoef = g_Game.ConfigGetInt(string.Format("%1 %2 DamageApplied transferShockToDamage", CFG_AMMO, ammo));
792 if (transferShockToDamageCoef == 1)
793 {
794 //Print("DayZAnimal | EEHitBy | nonlethal hit");
795 AddHealth("", "Health", -ConvertNonlethalDamage(damageResult.GetDamage(dmgZone, "Shock"), damageType));
796 }
797 else
798 {
799 ComponentAnimalBleeding animal_bleeding = ComponentAnimalBleeding.Cast( GetComponent( COMP_TYPE_ANIMAL_BLEEDING ) );
800 animal_bleeding.CreateWound( damageResult, dmgZone, ammo );
801 }
802
803 int type = 0;
804 int direction = 0;
805 if (ComputeDamageHitParams(source, dmgZone, ammo, type, direction) == true)
806 {
807 QueueDamageHit(type, direction);
808 }
809
810 }
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:819
float ConvertNonlethalDamage(float damage, DamageType damageType)
Определения DayZAnimal.c:955
void QueueDamageHit(int type, int direction)
Определения DayZAnimal.c:812
proto native float GetDamage(string zoneName, string healthType)
const int COMP_TYPE_ANIMAL_BLEEDING
Определения Component.c:11
const string CFG_AMMO
Определения constants.c:223

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