DayZ 1.29
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 (!g_Game.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 (g_Game.ConfigIsExisting(path))
65 {
66 g_Game.ConfigGetTextArray(path,component_names);
67 }
68 zoneMap.Insert(zone,component_names);
69 }
70
71 return true;
72 }
73 }
DayZGame g_Game
Определения DayZGame.c:3942
string path
Определения OptionSelectorMultistate.c:142
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
const string CFG_VEHICLESPATH
Определения 3_Game/DayZ/constants.c:220
const string CFG_WEAPONSPATH
Определения 3_Game/DayZ/constants.c:221
const string CFG_MAGAZINESPATH
Определения 3_Game/DayZ/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, string::Format(), g_Game и path.