From a6f43e934b6939b74d7b1b8696b75d70acf95344 Mon Sep 17 00:00:00 2001 From: He-Man Date: Wed, 15 Nov 2017 21:53:14 +0100 Subject: [PATCH] Make Nuisance by shooting configureable Also reduced it, because it is very high on default --- .../epoch_code/compile/functions/EPOCH_fnc_playerFired.sqf | 2 +- Sources/epoch_code/init/client_init.sqf | 4 ++-- Sources/epoch_config/Configs/CfgEpochClient.hpp | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Sources/epoch_code/compile/functions/EPOCH_fnc_playerFired.sqf b/Sources/epoch_code/compile/functions/EPOCH_fnc_playerFired.sqf index 6ffcd511..e5ad6234 100644 --- a/Sources/epoch_code/compile/functions/EPOCH_fnc_playerFired.sqf +++ b/Sources/epoch_code/compile/functions/EPOCH_fnc_playerFired.sqf @@ -108,7 +108,7 @@ switch true do { }; default { _ammoConfig = (configFile >> "CfgAmmo" >> _ammo); - _nuisanceLevel = ceil(getNumber (_ammoConfig >> "audibleFire") * getNumber (_ammoConfig >> "caliber")); + _nuisanceLevel = ceil ((getNumber (_ammoConfig >> "audibleFire") * getNumber (_ammoConfig >> "caliber"))*Epoch_NuisanceMulti); // reduce when not in a city or town if (EPOCH_nearestLocations isEqualTo[]) then{ _nuisanceLevel = _nuisanceLevel / 2; diff --git a/Sources/epoch_code/init/client_init.sqf b/Sources/epoch_code/init/client_init.sqf index e3dee9e1..ec1049bf 100644 --- a/Sources/epoch_code/init/client_init.sqf +++ b/Sources/epoch_code/init/client_init.sqf @@ -80,8 +80,8 @@ EPOCH_keysActionPressed = false; //prevents EH spam 0 call EPOCH_clientKeyMap; // load some frequently used configs to variables -private _CfgEpochClient = 'CfgEpochClient' call EPOCH_returnConfig; -EPOCH_maxBuildingHeight = getNumber(_CfgEpochClient >> "maxBuildingHeight"); +EPOCH_maxBuildingHeight = ["CfgEpochClient", "maxBuildingHeight", 100] call EPOCH_fnc_returnConfigEntryV2; +Epoch_NuisanceMulti = ["CfgEpochClient", "NuisanceMulti", 0.5] call EPOCH_fnc_returnConfigEntryV2; //ON INIT and RESPAWN call EPOCH_clientInit; diff --git a/Sources/epoch_config/Configs/CfgEpochClient.hpp b/Sources/epoch_config/Configs/CfgEpochClient.hpp index ff327dc7..96b4d2e1 100644 --- a/Sources/epoch_config/Configs/CfgEpochClient.hpp +++ b/Sources/epoch_config/Configs/CfgEpochClient.hpp @@ -19,6 +19,8 @@ class CfgEpochClient debug = "true"; // true = enable extra rpt debug lines, false to disable antagonistRngChance = 100; // increase number to reduce chances and reduce to increase. Default 100 + NuisanceMulti = 0.5; // Multi for Nuisance increase on shooting - higher Nuisance effect at least antagonist spawn change. (0-1, default 0.5) + outOfBoundsRadiation = 10; // how much rads per tick (10sec), when outside play area. radioactiveLocations[] = {"NameCityCapital", "NameCity", "Airport"}; // used for random radioactive locations and to suppress animal spawns within cities. radiatedObjMaxFalloutDist = 125; // max distance radiated object can affect player (number in meters)