fix inverted logic

This commit is contained in:
vbawol 2017-09-28 12:00:48 -05:00
parent a5894bca15
commit cb17f01b56
8 changed files with 10 additions and 10 deletions

View File

@ -23,7 +23,7 @@ _index = EPOCH_spawnIndex find _unitClass;
_spawnLimit = 0; _spawnLimit = 0;
if (_index != -1) then { if (_index != -1) then {
_playerSpawnArrayKeyFinal = "EPOCH_playerSpawnArray"; _playerSpawnArrayKeyFinal = "EPOCH_playerSpawnArray";
if (isNil "_playerSpawnArrayKey") then {_playerSpawnArrayKeyFinal = _playerSpawnArrayKey}; if !(isNil "_playerSpawnArrayKey") then {_playerSpawnArrayKeyFinal = _playerSpawnArrayKey};
_playerSpawnArray = missionNamespace getVariable [_playerSpawnArrayKeyFinal,[]]; _playerSpawnArray = missionNamespace getVariable [_playerSpawnArrayKeyFinal,[]];
_spawnLimit = _playerSpawnArray select _index; _spawnLimit = _playerSpawnArray select _index;
}; };

View File

@ -19,7 +19,7 @@ params ["_spawnName", ["_decrease",1]];
_index = EPOCH_spawnIndex find _spawnName; _index = EPOCH_spawnIndex find _spawnName;
if (_index != -1) then{ if (_index != -1) then{
_playerSpawnArrayKeyFinal = "EPOCH_playerSpawnArray"; _playerSpawnArrayKeyFinal = "EPOCH_playerSpawnArray";
if (isNil "_playerSpawnArrayKey") then {_playerSpawnArrayKeyFinal = _playerSpawnArrayKey}; if !(isNil "_playerSpawnArrayKey") then {_playerSpawnArrayKeyFinal = _playerSpawnArrayKey};
_playerSpawnArray = missionNamespace getVariable [_playerSpawnArrayKeyFinal,[]]; _playerSpawnArray = missionNamespace getVariable [_playerSpawnArrayKeyFinal,[]];
_playerSpawnArray set[_index, ((_playerSpawnArray select _index) - _decrease) max 0]; _playerSpawnArray set[_index, ((_playerSpawnArray select _index) - _decrease) max 0];
}; };

View File

@ -19,7 +19,7 @@ params ["_spawnName", ["_increase",1]];
_index = EPOCH_spawnIndex find _spawnName; _index = EPOCH_spawnIndex find _spawnName;
if (_index != -1) then{ if (_index != -1) then{
_playerSpawnArrayKeyFinal = "EPOCH_playerSpawnArray"; _playerSpawnArrayKeyFinal = "EPOCH_playerSpawnArray";
if (isNil "_playerSpawnArrayKey") then {_playerSpawnArrayKeyFinal = _playerSpawnArrayKey}; if !(isNil "_playerSpawnArrayKey") then {_playerSpawnArrayKeyFinal = _playerSpawnArrayKey};
_playerSpawnArray = missionNamespace getVariable [_playerSpawnArrayKeyFinal,[]]; _playerSpawnArray = missionNamespace getVariable [_playerSpawnArrayKeyFinal,[]];
_playerSpawnArray set[_index, ((_playerSpawnArray select _index) + _increase) min (EPOCH_spawnLimits select _index)]; _playerSpawnArray set[_index, ((_playerSpawnArray select _index) + _increase) min (EPOCH_spawnLimits select _index)];
}; };

View File

@ -115,8 +115,8 @@ if (_doAttack) then {
if (random 1 < _toxicChance) then { if (random 1 < _toxicChance) then {
_playerToxicityKeyFinal = "EPOCH_playerToxicity"; _playerToxicityKeyFinal = "EPOCH_playerToxicity";
_playerImmunityKeyFinal = "EPOCH_playerImmunity"; _playerImmunityKeyFinal = "EPOCH_playerImmunity";
if (isNil "_playerToxicityKey") then {_playerToxicityKeyFinal = _playerToxicityKey}; if !(isNil "_playerToxicityKey") then {_playerToxicityKeyFinal = _playerToxicityKey};
if (isNil "_playerImmunityKey") then {_playerImmunityKeyFinal = _playerImmunityKey}; if !(isNil "_playerImmunityKey") then {_playerImmunityKeyFinal = _playerImmunityKey};
[_playerToxicityKeyFinal,random(_toxicAmount - (missionNamespace getVariable [_playerImmunityKeyFinal, 0])),100,0] call EPOCH_fnc_setVariableLimited; [_playerToxicityKeyFinal,random(_toxicAmount - (missionNamespace getVariable [_playerImmunityKeyFinal, 0])),100,0] call EPOCH_fnc_setVariableLimited;
}; };
if (random 1 < _bleedChance) then { if (random 1 < _bleedChance) then {
@ -124,7 +124,7 @@ if (_doAttack) then {
}; };
if (random 1 < _bloodpChance) then { if (random 1 < _bloodpChance) then {
_playerBloodPKeyFinal = "EPOCH_playerBloodP"; _playerBloodPKeyFinal = "EPOCH_playerBloodP";
if (isNil "_playerBloodPKey") then {_playerBloodPKeyFinal = _playerBloodPKey}; if !(isNil "_playerBloodPKey") then {_playerBloodPKeyFinal = _playerBloodPKey};
[_playerBloodPKeyFinal,_bloodpAmount,100,0] call EPOCH_fnc_setVariableLimited; [_playerBloodPKeyFinal,_bloodpAmount,100,0] call EPOCH_fnc_setVariableLimited;
if !(_ppEffect isEqualTo []) then { if !(_ppEffect isEqualTo []) then {
[_ppEffect] spawn EPOCH_fnc_spawnEffects; [_ppEffect] spawn EPOCH_fnc_spawnEffects;

View File

@ -33,7 +33,7 @@ if (_playerDeathScreen isEqualTo "") then {_playerDeathScreen = "TapOut"};
_tapDiag = _playerDeathScreen; _tapDiag = _playerDeathScreen;
_playerAliveTimeKeyFinal = "EPOCH_playerAliveTime"; _playerAliveTimeKeyFinal = "EPOCH_playerAliveTime";
if (isNil "_playerAliveTimeKey") then {_playerAliveTimeKeyFinal = _playerAliveTimeKey}; if !(isNil "_playerAliveTimeKey") then {_playerAliveTimeKeyFinal = _playerAliveTimeKey};
_playerAliveTime = missionNamespace getVariable [_playerAliveTimeKeyFinal,[]]; _playerAliveTime = missionNamespace getVariable [_playerAliveTimeKeyFinal,[]];
_doRevenge = ((getNumber(_config >> "playerDisableRevenge") isEqualTo 0) && _playerAliveTime >= _playerRevengeMinAliveTime); _doRevenge = ((getNumber(_config >> "playerDisableRevenge") isEqualTo 0) && _playerAliveTime >= _playerRevengeMinAliveTime);

View File

@ -120,7 +120,7 @@ switch true do {
// Nuisance System 0.1 // Nuisance System 0.1
(EPOCH_customVarLimits select (EPOCH_customVars find "Nuisance")) params [["_playerLimitMax",100],["_playerLimitMin",0]]; (EPOCH_customVarLimits select (EPOCH_customVars find "Nuisance")) params [["_playerLimitMax",100],["_playerLimitMin",0]];
_playerNuisanceKeyFinal = "EPOCH_playerNuisance"; _playerNuisanceKeyFinal = "EPOCH_playerNuisance";
if (isNil "_playerNuisanceKey") then {_playerNuisanceKeyFinal = _playerNuisanceKey}; if !(isNil "_playerNuisanceKey") then {_playerNuisanceKeyFinal = _playerNuisanceKey};
[_playerNuisanceKeyFinal,_nuisanceLevel,_playerLimitMax,_playerLimitMin] call EPOCH_fnc_setVariableLimited; [_playerNuisanceKeyFinal,_nuisanceLevel,_playerLimitMax,_playerLimitMin] call EPOCH_fnc_setVariableLimited;
}; };
}; };

View File

@ -31,7 +31,7 @@ private ["_adj","_currentPos","_handled","_playerStaminaKeyFinal","_step"];
params ["_display","_dikCode","_shift","_ctrl","_alt"]; params ["_display","_dikCode","_shift","_ctrl","_alt"];
_playerStaminaKeyFinal = "EPOCH_playerStamina"; _playerStaminaKeyFinal = "EPOCH_playerStamina";
if (isNil "_playerStaminaKey") then {_playerStaminaKeyFinal = _playerStaminaKey}; if !(isNil "_playerStaminaKey") then {_playerStaminaKeyFinal = _playerStaminaKey};
_handled = false; _handled = false;

View File

@ -59,7 +59,7 @@ if !(alive player && alive _playerObject && !isPlayer _playerObject) then {
// reset blood Pressure to warning level // reset blood Pressure to warning level
_playerBloodPKeyFinal = "EPOCH_playerBloodP"; _playerBloodPKeyFinal = "EPOCH_playerBloodP";
if (isNil "_playerBloodPKey") then {_playerBloodPKeyFinal = _playerBloodPKey}; if !(isNil "_playerBloodPKey") then {_playerBloodPKeyFinal = _playerBloodPKey};
missionNamespace setVariable [_playerBloodPKeyFinal, 120]; missionNamespace setVariable [_playerBloodPKeyFinal, 120];
// restart masterloop // restart masterloop