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

◆ GetDamageZoneMap()

static bool GetDamageZoneMap ( EntityAI entity,
out DamageZoneMap zoneMap )
static

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

28 {
29 string path_base;
30 string path;
31
32 if (entity.IsWeapon())
33 {
34 path_base = CFG_WEAPONSPATH;
35 }
36 else if (entity.IsMagazine())
37 {
38 path_base = CFG_MAGAZINESPATH;
39 }
40 else
41 {
42 path_base = CFG_VEHICLESPATH;
43 }
44
45 path_base = string.Format("%1 %2 DamageSystem DamageZones", path_base, entity.GetType());
46
47 if (!GetGame().ConfigIsExisting(path_base))
48 {
49 return false;
50 }
51 else
52 {
53 string zone;
54 array<string> zone_names = new array<string>;
55 array<string> component_names;
56
57 entity.GetDamageZones(zone_names);
58 for (int i = 0; i < zone_names.Count(); i++)
59 {
60 component_names = new array<string>;
61 zone = zone_names.Get(i);
62
63 path = string.Format("%1 %2 componentNames ", path_base, zone);
64 if (GetGame().ConfigIsExisting(path))
65 {
66 GetGame().ConfigGetTextArray(path,component_names);
67 }
68 zoneMap.Insert(zone,component_names);
69 }
70
71 return true;
72 }
73 }
string path
Определения OptionSelectorMultistate.c:142
proto native void ConfigGetTextArray(string path, out TStringArray values)
Get array of strings from config on path.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
const string CFG_VEHICLESPATH
Определения constants.c:220
const string CFG_WEAPONSPATH
Определения constants.c:221
const string CFG_MAGAZINESPATH
Определения constants.c:222
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.

Перекрестные ссылки CFG_MAGAZINESPATH, CFG_VEHICLESPATH, CFG_WEAPONSPATH, CGame::ConfigGetTextArray(), string::Format(), GetGame() и path.