diff --git a/Server Files/MPMissions/DayZ_Epoch_1.Takistan/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf b/Server Files/MPMissions/DayZ_Epoch_1.Takistan/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf index 37daa1ce2..5494bc1d4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_1.Takistan/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_1.Takistan/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf @@ -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; diff --git a/Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf b/Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf index 37daa1ce2..5494bc1d4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf @@ -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; diff --git a/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf b/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf index 37daa1ce2..5494bc1d4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf @@ -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; diff --git a/Server Files/MPMissions/DayZ_Epoch_12.isladuala/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf b/Server Files/MPMissions/DayZ_Epoch_12.isladuala/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf index 37daa1ce2..5494bc1d4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_12.isladuala/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_12.isladuala/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf @@ -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; diff --git a/Server Files/MPMissions/DayZ_Epoch_13.Tavi/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf b/Server Files/MPMissions/DayZ_Epoch_13.Tavi/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf index 37daa1ce2..5494bc1d4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_13.Tavi/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_13.Tavi/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf @@ -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; diff --git a/Server Files/MPMissions/DayZ_Epoch_15.namalsk/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf b/Server Files/MPMissions/DayZ_Epoch_15.namalsk/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf index 37daa1ce2..5494bc1d4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_15.namalsk/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_15.namalsk/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf @@ -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; diff --git a/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf b/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf index 37daa1ce2..5494bc1d4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf @@ -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; diff --git a/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf b/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf index 37daa1ce2..5494bc1d4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf @@ -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; diff --git a/Server Files/MPMissions/DayZ_Epoch_18.Sara/R3F_Realism/R3F_Weight/R3F_CfgWeight.h b/Server Files/MPMissions/DayZ_Epoch_18.Sara/R3F_Realism/R3F_Weight/R3F_CfgWeight.h index 48f23b526..b0aa80893 100644 --- a/Server Files/MPMissions/DayZ_Epoch_18.Sara/R3F_Realism/R3F_Weight/R3F_CfgWeight.h +++ b/Server Files/MPMissions/DayZ_Epoch_18.Sara/R3F_Realism/R3F_Weight/R3F_CfgWeight.h @@ -1611,6 +1611,10 @@ class CfgWeight { weight = 0.002; }; + class ItemSodaCokeEmpty + { + weight = 0.002; + }; class ItemSodaPepsiEmpty { weight = 0.002; diff --git a/Server Files/MPMissions/DayZ_Epoch_18.Sara/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf b/Server Files/MPMissions/DayZ_Epoch_18.Sara/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf index 37daa1ce2..5494bc1d4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_18.Sara/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_18.Sara/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf @@ -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; diff --git a/Server Files/MPMissions/DayZ_Epoch_2.Utes/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf b/Server Files/MPMissions/DayZ_Epoch_2.Utes/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf index 37daa1ce2..5494bc1d4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_2.Utes/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_2.Utes/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf @@ -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; diff --git a/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf b/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf index 37daa1ce2..5494bc1d4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf @@ -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; diff --git a/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf b/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf index 37daa1ce2..5494bc1d4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf @@ -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; diff --git a/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf b/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf index 37daa1ce2..5494bc1d4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf @@ -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; diff --git a/Server Files/MPMissions/DayZ_Epoch_6.Dingor/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf b/Server Files/MPMissions/DayZ_Epoch_6.Dingor/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf index 37daa1ce2..5494bc1d4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_6.Dingor/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_6.Dingor/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf @@ -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; diff --git a/Server Files/MPMissions/DayZ_Epoch_7.Lingor/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf b/Server Files/MPMissions/DayZ_Epoch_7.Lingor/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf index 37daa1ce2..5494bc1d4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_7.Lingor/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_7.Lingor/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf @@ -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; diff --git a/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf b/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf index 37daa1ce2..5494bc1d4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf @@ -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; diff --git a/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf b/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf index 37daa1ce2..5494bc1d4 100644 --- a/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf @@ -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; diff --git a/Server Files/MPMissions/TEMPLATE/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf b/Server Files/MPMissions/TEMPLATE/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf index 37daa1ce2..5494bc1d4 100644 --- a/Server Files/MPMissions/TEMPLATE/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf +++ b/Server Files/MPMissions/TEMPLATE/R3F_Realism/R3F_Weight/R3F_Weight_Fnct.sqf @@ -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;