Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ArmorDamageManagerComponent.c
Go to the documentation of this file.
2 {
3 }
4 
5 class SCR_ArmorDamageManagerComponent : SCR_DamageManagerComponent
6 {
7  [Attribute(defvalue: "0.4", uiwidget: UIWidgets.EditBox, desc: "Multiplies rawdamage to be passed to character from this armor piece")]
8  protected float m_fPassedDamageScale;
9 
10  //------------------------------------------------------------------------------------------------
11  override protected void OnDamage(notnull BaseDamageContext damageContext)
12  {
13  if (damageContext.damageType != EDamageType.KINETIC && damageContext.damageType != EDamageType.MELEE)
14  return;
15 
16  IEntity parent = GetOwner();
17  while (parent)
18  {
19  if (ChimeraCharacter.Cast(parent))
20  break;
21 
22  parent = parent.GetParent();
23  }
24 
25  ChimeraCharacter char = ChimeraCharacter.Cast(parent);
26  if (!char)
27  return;
28 
30  if (!charDamMan)
31  return;
32 
33  charDamMan.ArmorHitEventEffects(damageContext.damageValue);
34  charDamMan.ArmorHitEventDamage(damageContext.damageType, damageContext.damageValue * m_fPassedDamageScale, damageContext.instigator.GetInstigatorEntity());
35  }
36 }
BaseDamageContext
Definition: BaseDamageContext.c:12
SCR_ArmorDamageManagerComponentClass
Definition: SCR_ArmorDamageManagerComponent.c:1
Attribute
SCR_ArmorDamageManagerComponentClass SCR_DamageManagerComponentClass Attribute(defvalue:"0.4", uiwidget:UIWidgets.EditBox, desc:"Multiplies rawdamage to be passed to character from this armor piece")] protected float m_fPassedDamageScale
OnDamage
override protected void OnDamage(notnull BaseDamageContext damageContext)
Definition: SCR_ArmorDamageManagerComponent.c:11
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
SCR_CharacterDamageManagerComponent
Definition: SCR_CharacterDamageManagerComponent.c:18
SCR_DamageManagerComponentClass
enum ECharacterHitZoneGroup SCR_DamageManagerComponentClass
GetDamageManager
proto external SCR_DamageManagerComponent GetDamageManager()
Returns component which handles damage.
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
EDamageType
EDamageType
Definition: EDamageType.c:12