DayZ 1.27
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 for (int i = 0; i < components.Count(); i++)
82 {
83 array<string> inner = components.Get(i);
84 for (int j = 0; j < inner.Count(); j++)
85 {
86 string innerComponentName = inner.Get(j);
87 innerComponentName.ToLower();
88
89 //We don't have a component name, no need to proceed
90 if ( innerComponentName == "" )
91 break;
92
93 if (innerComponentName == component)
94 {
95 damageZone = zoneMap.GetKey(i);
96 return true;
97 }
98 }
99 }
100 damageZone = "";
101 return false;
102 }
map< string, ref array< string > > DamageZoneMap
Определения DamageSystem.c:157
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto int ToLower()
Changes string to lowercase. Returns length.

Перекрестные ссылки component и string::ToLower().