11 protected ref
Timer m_BleedTimer;
12 protected const float BASE_BLEED_RATE = 250;
13 protected const float PASS_OUT_AMOUT = 500;
21 void InflictWoundDamage(
TotalDamageResult damage_result,
string zone_name,
string ammo )
23 if ( ammo ==
"MeleeWolf")
25 m_ThisEntityAI.SetHealth(
"",
"", 0 );
31 float health_damage_inflicted = damage_result.GetDamage( zone_name,
"Health");
33 float wound_healt_damage = health_damage_inflicted;
36 m_ThisEntityAI.DecreaseHealth(
"",
"Health", wound_healt_damage );
39 if ( zone_name !=
"" )
41 m_ThisEntityAI.DecreaseHealth( zone_name,
"Health", wound_healt_damage );
51 void CreateWound(
TotalDamageResult damage_result,
string zone_name,
string ammo )
54 InflictWoundDamage( damage_result, zone_name, ammo );
57 float can_bleed =
false;
59 float bleed_treshold = 0;
68 if ( can_bleed && chance <= bleed_treshold )
70 m_BleedTimer =
new Timer();
71 float wound_intensity = GetWoundIntensity( bleed_treshold );
73 m_BleedTimer.Run( 1,
this,
"Bleed",
new Param1<float>( wound_intensity ),
true );
83 void Bleed(
float wound_intensity )
85 if ( m_ThisEntityAI.IsAlive() )
87 float bleeding_intensity = BASE_BLEED_RATE * wound_intensity;
89 float global_blood_lvl = m_ThisEntityAI.GetHealth(
"",
"Blood" );
91 m_ThisEntityAI.DecreaseHealth(
"",
"Blood", bleeding_intensity );
93 if ( global_blood_lvl < PASS_OUT_AMOUT )
95 m_ThisEntityAI.SetHealth(
"",
"", 0 );
111 float GetWoundIntensity(
float bleed_treshold )
114 return bleed_treshold * 2;