R3f realism updated to check for weight in cfgmags

This commit is contained in:
[VB]AWOL committed 2013-08-27 15:05:46 -05:00
1 parent a270393def
commit 9ab49ff884
19 files changed
+274 -54

No files matched your search

@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight;
}else{
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
diag_log format["Class not found %1", _x];
#endif
_weight = 0;
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
};
if(_weight > 0) then {
_total_weight = _total_weight + _weight;
} else {
// log only if not found
// #ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
diag_log format["Class not found %1", _x];
// #endif
};
};
};
}foreach _arr_class;