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

◆ GetAmmoWeightByBulletType()

static float Ammunition_Base::GetAmmoWeightByBulletType ( string bulletType)
inlinestaticprivate

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

7 {
8 if (m_AmmoWeightByBulletType.Contains(bulletType))
9 {
10 return m_AmmoWeightByBulletType.Get(bulletType);
11 }
12 else
13 {
14 float ammoWeight;
15 string ammoTypeName;
16 g_Game.ConfigGetText( string.Format("CfgAmmo %1 spawnPileType", bulletType) , ammoTypeName);
17 if (ammoTypeName)
18 ammoWeight = g_Game.ConfigGetFloat(string.Format("CfgMagazines %1 weight", ammoTypeName));
19 else
20 ErrorEx("empty 'spawnPileType' for bullet type:" + bulletType);
21 if (ammoWeight)
22 m_AmmoWeightByBulletType.Insert(bulletType, ammoWeight);
23 return ammoWeight;
24 }
25 }
DayZGame g_Game
Определения DayZGame.c:3942
static ref map< string, float > m_AmmoWeightByBulletType
Определения AmmunitionPiles.c:4
enum ShapeType ErrorEx

Перекрестные ссылки ErrorEx, g_Game и m_AmmoWeightByBulletType.

Используется в Weapon::GetWeightSpecialized().