diff --git a/Changelogs/0.3.7.0.txt b/Changelogs/0.3.7.0.txt index 3e465342..e4710a7c 100644 --- a/Changelogs/0.3.7.0.txt +++ b/Changelogs/0.3.7.0.txt @@ -16,7 +16,8 @@ [Changed] Change all publicVariableServer calls to use remoteExec calls for better performance. [Fixed] Custom epoch swing animations for Hatchet and sledge now work correctly. **Server** -[Changed] Driver or passengers of a driverless can now control vehicle locks. +[Added] Setting to control random magazine ammo counts in loot spawner. CfgEpochClient -> randomizeMagazineAmmoCount (default: true) +[Changed] Driver or passengers of a driverless can now control vehicle locks. Also only the owner can control locks from outside of a occupied vehicle. [Changed] Commented out Halloween masks from loot tables. [Updated] New Battleye remoteExec.txt for added remoteExec calls. [Info] Removed old .bikey and added new one for 0370. diff --git a/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo b/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo index 0c9729b9..09f0616f 100644 Binary files a/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo and b/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo differ diff --git a/Sources/epoch_server/compile/epoch_server/EPOCH_serverLootObject.sqf b/Sources/epoch_server/compile/epoch_server/EPOCH_serverLootObject.sqf index 14cf0e05..cfcd4094 100644 --- a/Sources/epoch_server/compile/epoch_server/EPOCH_serverLootObject.sqf +++ b/Sources/epoch_server/compile/epoch_server/EPOCH_serverLootObject.sqf @@ -2,6 +2,8 @@ private["_randomItemArray", "_quan", "_randomLootClass", "_type", "_randomItem", _object = _this select 0; _type = _this select 1; +_randomizeMagazineAmmoCount = ["CfgEpochClient", "randomizeMagazineAmmoCount", true] call EPOCH_fnc_returnConfigEntryV2; + if !(isNull _object) then{ _lootTable = [_type, "CfgMainTable", "tables"] call EPOCH_weightedArray; @@ -62,10 +64,14 @@ if !(isNull _object) then{ _loop = false; }; case "magazine": { - //_object addMagazineCargoGlobal [_randomItem, _quan]; - _magazineSize = getNumber (configFile >> "CfgMagazines" >> _randomItem >> "count"); - _object addMagazineAmmoCargo[_randomItem, _quan, ceil(random(_magazineSize))]; - + if (_randomizeMagazineAmmoCount) then { + // spawn a single Magazine with a random ammo count + _magazineSize = getNumber (configFile >> "CfgMagazines" >> _randomItem >> "count"); + _object addMagazineAmmoCargo[_randomItem, _quan, ceil(random(_magazineSize))]; + } else { + // spawn a single full Magazine + _object addMagazineCargoGlobal [_randomItem, _quan]; + }; _loop = false; }; case "backpack": { @@ -77,9 +83,14 @@ if !(isNull _object) then{ _mags = getArray (configFile >> "CfgWeapons" >> _randomItem >> "magazines"); if !(_mags isEqualTo []) then { - // add only one free magazine with random ammo count - _magazineSize = getNumber (configFile >> "CfgMagazines" >> (_mags select 0) >> "count"); - _object addMagazineAmmoCargo[_mags select 0, 1, ceil(random(_magazineSize))]; + if (_randomizeMagazineAmmoCount) then { + // spawn a single Magazine with a random ammo count + _magazineSize = getNumber (configFile >> "CfgMagazines" >> (_mags select 0) >> "count"); + _object addMagazineAmmoCargo[_mags select 0, 1, ceil(random(_magazineSize))]; + } else { + // spawn a single full Magazine with weapon + _object addMagazineCargoGlobal [_mags select 0, 1]; + }; }; _loop = false; };