28 {
29 string path_base;
31
32 if (entity.IsWeapon())
33 {
35 }
36 else if (entity.IsMagazine())
37 {
39 }
40 else
41 {
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;
56
57 entity.GetDamageZones(zone_names);
58 for (int i = 0; i < zone_names.Count(); i++)
59 {
61 zone = zone_names.Get(i);
62
63 path =
string.Format(
"%1 %2 componentNames ", path_base, zone);
65 {
66 g_Game.ConfigGetTextArray(
path,component_names);
67 }
68 zoneMap.Insert(zone,component_names);
69 }
70
71 return true;
72 }
73 }
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
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.