Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс ComponentAnimalBleeding
+ Граф наследования:ComponentAnimalBleeding:

Защищенные члены

void ComponentAnimalBleeding ()
 
void InflictWoundDamage (TotalDamageResult damage_result, string zone_name, string ammo)
 
void CreateWound (TotalDamageResult damage_result, string zone_name, string ammo)
 
void Bleed (float wound_intensity)
 
float GetWoundIntensity (float bleed_treshold)
 

Защищенные данные

ref Timer m_BleedTimer
 
const float BASE_BLEED_RATE = 250
 
const float PASS_OUT_AMOUT = 500
 

Дополнительные унаследованные члены

- Закрытые члены унаследованные от Component
void Event_OnFrame (IEntity other, float timeSlice)
 
Shape DebugBBoxDraw ()
 
void DebugBBoxSetColor (int color)
 
void DebugBBoxDelete ()
 
Shape DebugDirectionDraw (float distance=1)
 
void DebugDirectionSetColor (int color)
 
void DebugDirectionDelete ()
 
void SetParentEntityAI (EntityAI e)
 
void Event_OnAwake ()
 
void Event_OnInit ()
 
void LogThis (string msg, string fnc_name="n/a")
 
void LogThisWarning (string msg, string fnc_name="n/a")
 
void LogThisError (string msg, string fnc_name="n/a")
 
string GetCompName ()
 
int GetCompType ()
 
void Event_OnItemAttached (EntityAI item, string slot_name)
 
void Event_OnItemDetached (EntityAI item, string slot_name)
 
override Shape DebugBBoxDraw ()
 
override void DebugBBoxSetColor (int color)
 
override void DebugBBoxDelete ()
 
override Shape DebugDirectionDraw (float distance=1)
 
override void DebugDirectionDelete ()
 
void OnDrawing ()
 
- Закрытые статические члены унаследованные от Component
static void Init ()
 
static string GetNameByType (int comp_type)
 
static bool IsTypeExist (int comp_type)
 
static void LogErrorBadCompType (int comp_type, string fnc_name)
 
static void LogWarningAlredyExist (int comp_type, string fnc_name)
 
- Закрытые данные унаследованные от Component
EntityAI m_ThisEntityAI
 
Shape m_DebugShapeBBox
 
Shape m_DebugShapeDirection
 
float m_DebugShapeDirectionDist
 

Подробное описание

Конструктор(ы)

◆ ComponentAnimalBleeding()

void ComponentAnimalBleeding ( )
inlineprotected
17 {
18
19 }

Методы

◆ Bleed()

void Bleed ( float wound_intensity)
inlineprotected
84 {
85 if ( m_ThisEntityAI.IsAlive() )
86 {
88 //Print("bleeding_intensity: " + bleeding_intensity);
89 float global_blood_lvl = m_ThisEntityAI.GetHealth( "", "Blood" );
90
91 m_ThisEntityAI.DecreaseHealth( "", "Blood", bleeding_intensity );
92
94 {
95 m_ThisEntityAI.SetHealth( "", "", 0 );
96 //Print("global_blood_lvl < PASS_OUT_AMOUT => Zabijam zviera.");
97 }
98
99 //Print( "GetHealth Global Health: " + m_ThisEntityAI.GetHealth( "", "Health" ));
100 //Print( "GetHealth Global Blood: " + m_ThisEntityAI.GetHealth( "", "Blood" ));
101 //Print( "GetHealth Global Shock: " + m_ThisEntityAI.GetHealth( "", "Shock" ));
102
103 }
104 else
105 {
106 m_BleedTimer.Stop();
107 //Print("Vypinam timer.");
108 }
109 }
ref Timer m_BleedTimer
Definition ComponentAnimalBleeding.c:11
const float PASS_OUT_AMOUT
Definition ComponentAnimalBleeding.c:13
const float BASE_BLEED_RATE
Definition ComponentAnimalBleeding.c:12
EntityAI m_ThisEntityAI
Definition Component.c:24
Definition EntityAI.c:95

Перекрестные ссылки BASE_BLEED_RATE, m_BleedTimer, Component::m_ThisEntityAI и PASS_OUT_AMOUT.

◆ CreateWound()

void CreateWound ( TotalDamageResult damage_result,
string zone_name,
string ammo )
inlineprotected
52 {
53 //Print( "GetHealth Health before creating wound@: " + zone_name + " " + m_ThisEntityAI.GetHealth( zone_name, "Health" ));
55 //Print( "GetHealth Health after creating wood@: " + zone_name + " " + m_ThisEntityAI.GetHealth( zone_name, "Health" ));
56
57 float can_bleed = false; //= GetGame().ConfigGetFloat( "CfgVehicles " + m_ThisEntityAI.GetType() + " DamageSystem " + "DamageZones " + zone_name + " canBleed" );
58 //Print("can_bleed: " + can_bleed );
59 float bleed_treshold = 0; //= GetGame().ConfigGetFloat( "CfgAmmo " + ammo + " DamageApplied " + "bleedThreshold" );
60 //Print("bleed_treshold: " + bleed_treshold );
61 float chance = -1; //Math.RandomFloat01();
62 //Print("chance: " + chance );
63
64 //Print( "GetHealth Health @: " + m_ThisEntityAI.GetHealth( zone_name, "Health" ));
65 //Print( "GetHealth Blood @: " + m_ThisEntityAI.GetHealth( zone_name, "Blood" ));
66 //Print( "GetHealth Shock @: " + m_ThisEntityAI.GetHealth( zone_name, "Shock" ));
67
69 {
70 m_BleedTimer = new Timer();
72 //Print("wound_intensity: " + wound_intensity);
73 m_BleedTimer.Run( 1, this, "Bleed", new Param1<float>( wound_intensity ), true );
74 }
75 /*
76 else
77 {
78 Print("Not bleeding");
79 }
80 */
81 }
float GetWoundIntensity(float bleed_treshold)
Definition ComponentAnimalBleeding.c:111
void InflictWoundDamage(TotalDamageResult damage_result, string zone_name, string ammo)
Definition ComponentAnimalBleeding.c:21
Definition DayZPlayerImplement.c:63

Перекрестные ссылки GetWoundIntensity(), InflictWoundDamage() и m_BleedTimer.

◆ GetWoundIntensity()

float GetWoundIntensity ( float bleed_treshold)
inlineprotected
112 {
113 //higher the bleeding treshold => more intense bleeding
114 return bleed_treshold * 2;
115 }

Используется в CreateWound().

◆ InflictWoundDamage()

void InflictWoundDamage ( TotalDamageResult damage_result,
string zone_name,
string ammo )
inlineprotected
22 {
23 if ( ammo == "MeleeWolf")
24 {
25 m_ThisEntityAI.SetHealth( "", "", 0 );
26 }
27
28 if ( !zone_name )
29 return;
30
31 float health_damage_inflicted = damage_result.GetDamage( zone_name, "Health");
32 //float blood_damage_inflicted = damage_result.GetDamage( zone_name, "Blood");
34 //float wound_blood_damage = health_damage_inflicted;
35
36 m_ThisEntityAI.DecreaseHealth( "", "Health", wound_healt_damage );
37 //m_ThisEntityAI.DecreaseHealth( "", "Blood", wound_blood_damage );
38
39 if ( zone_name != "" )
40 {
41 m_ThisEntityAI.DecreaseHealth( zone_name, "Health", wound_healt_damage );
42 //m_ThisEntityAI.DecreaseHealth( zone_name, "Blood", wound_blood_damage );
43 }
44
45 //Print("Zone hit: " + zone_name );
46
47 //Print("damage_result Health: " + damage_result.GetDamage( zone_name, "Health" ) );
48 //Print("damage_result Blood: " + damage_result.GetDamage( zone_name, "Blood" ) );
49 }

Перекрестные ссылки Component::m_ThisEntityAI.

Используется в CreateWound().

Поля

◆ BASE_BLEED_RATE

const float BASE_BLEED_RATE = 250
protected

Используется в Bleed().

◆ m_BleedTimer

ref Timer m_BleedTimer
protected

Используется в Bleed() и CreateWound().

◆ PASS_OUT_AMOUT

const float PASS_OUT_AMOUT = 500
protected

Используется в Bleed().


Объявления и описания членов класса находятся в файле: