DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ GetDamageZoneFromComponentName()

static bool GetDamageZoneFromComponentName ( notnull EntityAI entity,
string component,
out string damageZone )
static

Returns damage zone to which the named component belongs.

См. определение в файле DamageSystem.c строка 76

77 {
78 DamageZoneMap zoneMap = entity.GetEntityDamageZoneMap();
79 array<array<string>> components;
80 components = zoneMap.GetValueArray();
81 int countComponents = components.Count();
82 for (int i = 0; i < countComponents; ++i)
83 {
84 array<string> inner = components.Get(i);
85 foreach (string innerComponentName : inner)
86 {
87 //We don't have a valid component name, no need to proceed
88 if (innerComponentName == "")
89 break;
90
91 innerComponentName.ToLower();
92 if (innerComponentName == component)
93 {
94 damageZone = zoneMap.GetKey(i);
95 return true;
96 }
97 }
98 }
99 damageZone = "";
100 return false;
101 }
map< string, ref array< string > > DamageZoneMap
Определения DamageSystem.c:156
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.

Перекрестные ссылки component.