From 6ac1e72a97a9c2c6eb79d7cf7bf66e3676581c74 Mon Sep 17 00:00:00 2001 From: vbawol Date: Sun, 1 Oct 2017 19:48:32 -0500 Subject: [PATCH] set read only vars with failback to normal use. --- .../compile/setup/masterLoop/Event1.sqf | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf index e3313319..a8c3edbc 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf @@ -330,7 +330,22 @@ if !(EPOCH_ActiveTraderMission isequalto []) then { }; // Update read only vars -EPOCH_playerEnergy = missionNamespace getVariable [_playerEnergyKey, _playerEnergyDefault]; +if !(_playerTempKey isEqualTo "EPOCH_playerTemp") then { + EPOCH_playerTemp = missionNamespace getVariable [_playerTempKey, _playerTempDefault]; + EPOCH_playerHunger = missionNamespace getVariable [_playerHungerKey, _playerHungerDefault]; + EPOCH_playerThirst = missionNamespace getVariable [_playerThirstKey, _playerThirstDefault]; + EPOCH_playerAliveTime = missionNamespace getVariable [_playerAliveTimeKey, _playerAliveTimeDefault]; + EPOCH_playerEnergy = missionNamespace getVariable [_playerEnergyKey, _playerEnergyDefault]; + EPOCH_playerWet = missionNamespace getVariable [_playerWetKey, _playerWetDefault]; + EPOCH_playerSoiled = missionNamespace getVariable [_playerSoiledKey, _playerSoiledDefault]; + EPOCH_playerImmunity = missionNamespace getVariable [_playerImmunityKey, _playerImmunityDefault]; + EPOCH_playerToxicity = missionNamespace getVariable [_playerToxicityKey, _playerToxicityDefault]; + EPOCH_playerStamina = missionNamespace getVariable [_playerStaminaKey, _playerStaminaDefault]; + EPOCH_playerBloodP = missionNamespace getVariable [_playerBloodPKey, _playerBloodPDefault]; + EPOCH_playerAlcohol = missionNamespace getVariable [_playerAlcoholKey, _playerAlcoholDefault]; + EPOCH_playerRadiation = missionNamespace getVariable [_playerRadiationKey, _playerRadiationDefault]; + EPOCH_playerNuisance = missionNamespace getVariable [_playerNuisanceKey, _playerNuisanceDefault]; +}; // force update if (EPOCH_forceUpdateNow) then {