From 8f55acf9a6b83223f18a21b6ea8e8602991e6845 Mon Sep 17 00:00:00 2001 From: He-Man Date: Thu, 24 Oct 2019 20:02:26 +0200 Subject: [PATCH] Wrong defaults (just in case not loaded full in)) --- Sources/epoch_code/compile/building/EPOCH_simulSwap.sqf | 4 ++-- Sources/epoch_code/compile/building/EPOCH_staticMove.sqf | 2 +- .../epoch_code/compile/functions/EPOCH_fnc_playerDeath.sqf | 2 +- .../compile/interface_event_handlers/EPOCH_KeyDown.sqf | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/epoch_code/compile/building/EPOCH_simulSwap.sqf b/Sources/epoch_code/compile/building/EPOCH_simulSwap.sqf index c125f0d5..e4935e7e 100644 --- a/Sources/epoch_code/compile/building/EPOCH_simulSwap.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_simulSwap.sqf @@ -36,7 +36,7 @@ _isSnap = false; _playerEnergyKeyFinal = "EPOCH_playerEnergy"; if !(isNil "_playerEnergyKey") then {_playerEnergyKeyFinal = _playerEnergyKey}; -_playerEnergy = missionNamespace getVariable [_playerEnergyKeyFinal,[]]; +_playerEnergy = missionNamespace getVariable [_playerEnergyKeyFinal,0]; if (_playerEnergy <= 0) exitWith { ["Need Energy", 5] call Epoch_message; @@ -110,7 +110,7 @@ if (isText(_simulClassConfig)) then { EPOCH_Z_OFFSET = _offset select 2; _lastCheckTime = diag_tickTime; while {EPOCH_target == _currentTarget} do { - _playerEnergy = missionNamespace getVariable [_playerEnergyKeyFinal,[]]; + _playerEnergy = missionNamespace getVariable [_playerEnergyKeyFinal,0]; if (_playerEnergy <= 0) exitWith { EPOCH_target = objNull; }; _rejectMove = false; if ((diag_tickTime - _lastCheckTime) > 10) then { diff --git a/Sources/epoch_code/compile/building/EPOCH_staticMove.sqf b/Sources/epoch_code/compile/building/EPOCH_staticMove.sqf index daeb9e7e..3806c0f0 100644 --- a/Sources/epoch_code/compile/building/EPOCH_staticMove.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_staticMove.sqf @@ -39,7 +39,7 @@ if (_item == "") exitWith{ EPOCH_target = objNull; }; _playerEnergyKeyFinal = "EPOCH_playerEnergy"; if !(isNil "_playerEnergyKey") then {_playerEnergyKeyFinal = _playerEnergyKey}; -_playerEnergy = missionNamespace getVariable [_playerEnergyKeyFinal,[]]; +_playerEnergy = missionNamespace getVariable [_playerEnergyKeyFinal,0]; if (_playerEnergy <= 0) exitWith{ ["Need Energy", 5] call Epoch_message; diff --git a/Sources/epoch_code/compile/functions/EPOCH_fnc_playerDeath.sqf b/Sources/epoch_code/compile/functions/EPOCH_fnc_playerDeath.sqf index 7f15df40..3220fb8d 100644 --- a/Sources/epoch_code/compile/functions/EPOCH_fnc_playerDeath.sqf +++ b/Sources/epoch_code/compile/functions/EPOCH_fnc_playerDeath.sqf @@ -34,7 +34,7 @@ _tapDiag = _playerDeathScreen; _playerAliveTimeKeyFinal = "EPOCH_playerAliveTime"; if !(isNil "_playerAliveTimeKey") then {_playerAliveTimeKeyFinal = _playerAliveTimeKey}; -_playerAliveTime = missionNamespace getVariable [_playerAliveTimeKeyFinal,[]]; +_playerAliveTime = missionNamespace getVariable [_playerAliveTimeKeyFinal,0]; _doRevenge = ((getNumber(_config >> "playerDisableRevenge") isEqualTo 0) && _playerAliveTime >= _playerRevengeMinAliveTime); diff --git a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf index fd68bc6c..9cea2b65 100644 --- a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf +++ b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf @@ -280,7 +280,7 @@ if (_dikCode in (actionKeys "TacticalView")) then { _handled = true; }; if (_dikCode in (actionKeys "NightVision")) then { - _playerEnergy = missionNamespace getVariable [_playerEnergyKeyFinal,[]]; + _playerEnergy = missionNamespace getVariable [_playerEnergyKeyFinal,0]; if (_playerEnergy == 0) then { ["Night Vision Goggles: Need Energy", 5] call Epoch_message; _handled = true;