diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf index 5c4e56c9..cde365b1 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf @@ -332,12 +332,12 @@ if !(EPOCH_ActiveTraderMission isequalto []) then { // AH use only if !(isNil "EPOCH_GMODE") then { { - _varDefault = _defaultVarValues select _foreachindex; + _varDefault = _gModeVarValues select _foreachindex; _varName = format["EPOCH_player%1",_x]; _varNameTmp = call compile format["_player%1Key",_x]; if !(isNil "_varNameTmp") then {_varName = _varNameTmp}; missionNamespace setVariable [_varName, _varDefault]; - } forEach _gmVars; + } forEach _gModeVarNames; }; // Update read only vars diff --git a/Sources/epoch_code/compile/setup/masterLoop/init.sqf b/Sources/epoch_code/compile/setup/masterLoop/init.sqf index 7e310b3c..54d68572 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/init.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/init.sqf @@ -18,7 +18,10 @@ EPOCH_forceUpdateNow = false; _clientAliveTimer = diag_tickTime; // init player stat vars -_gmVars = ["CfgEpochClient", "gmVars", ["Temp","Hunger","Thirst","Toxicity","Stamina","BloodP","Alcohol","Radiation"]] call EPOCH_fnc_returnConfigEntryV2; +_gmVarsInit = ["CfgEpochClient", "gmVars", [["Temp",98.6],["Hunger",500],["Thirst",500],["Toxicity",0],["Stamina",10],["BloodP",100],["Alcohol",0],["Radiation",0]]] call EPOCH_fnc_returnConfigEntryV2; +_gModeVarNames = _gmVarsInit apply {_x param [0,""]}; +_gModeVarValues = _gmVarsInit apply {_x param [1,0]}; + _customVarsInit = ["CfgEpochClient", "customVarsDefaults", EPOCH_customVarsDefaults] call EPOCH_fnc_returnConfigEntryV2; _customVarNames = _customVarsInit apply {_x param [0,""]}; _defaultVarValues = _customVarsInit apply {_x param [1,0]}; diff --git a/Sources/epoch_config/Configs/CfgEpochClient.hpp b/Sources/epoch_config/Configs/CfgEpochClient.hpp index 26a692a5..ee7c8304 100644 --- a/Sources/epoch_config/Configs/CfgEpochClient.hpp +++ b/Sources/epoch_config/Configs/CfgEpochClient.hpp @@ -108,9 +108,18 @@ class CfgEpochClient {"Nuisance",0,{100,0}}, {"MissionArray",{},{}} }; - // Vars that get reset to defaults if godmode is enabled - gmVars[] = {"Temp","Hunger","Thirst","Toxicity","Stamina","BloodP","Alcohol","Radiation"}; - + // Vars and the value that gets set if godmode is enabled + gmVars[] = { + {"Temp",98.6}, + {"Hunger",2500}, + {"Thirst",1500}, + {"Energy",2500}, + {"Toxicity",0}, + {"Stamina",100}, + {"BloodP",100}, + {"Alcohol",0}, + {"Radiation",0} + }; hudConfigs[] = { {{"BloodP","","",{"getPlayerDamage",">=",0.7}},"topRight","x\addons\a3_epoch_code\Data\UI\bleeding_ca.paa",{"forceUpdate"}}, {{"Oxygen","getPlayerOxygenRemaining","",{},{1,0,2,2,1,0.55}},"topRight","x\addons\a3_epoch_code\Data\UI\oxygen_ca.paa"},