Consolidate DZE_ActionInProgress and r_action_count to one variable

There is no point in having two variables for the same purpose.

It is also pointless to keep an action count tally like r_action_count
was doing, since it is only ever checked for being 0 or 1. Any count
higher or lower than that is irrelevant.

I will make this change in vanilla too.
This commit is contained in:
ebaydayz
2016-08-25 15:38:27 -04:00
parent 6b101d3c2e
commit c2b16f0828
90 changed files with 364 additions and 373 deletions

View File

@@ -1,5 +1,5 @@
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_88" call dayz_rollingMessages;};
DZE_ActionInProgress = true;
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_88" call dayz_rollingMessages;};
dayz_actionInProgress = true;
/*
delete object from db with extra waiting by [VB]AWOL
parameters: _obj
@@ -22,8 +22,8 @@ if (DZE_permanentPlot) then {
_isOwnerOfObj = (_objOwnerID == dayz_characterID);
};
if (_obj in DZE_DoorsLocked) exitWith {DZE_ActionInProgress = false; localize "STR_EPOCH_ACTIONS_20" call dayz_rollingMessages;};
if (_obj getVariable ["GeneratorRunning", false]) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_89" call dayz_rollingMessages;};
if (_obj in DZE_DoorsLocked) exitWith {dayz_actionInProgress = false; localize "STR_EPOCH_ACTIONS_20" call dayz_rollingMessages;};
if (_obj getVariable ["GeneratorRunning", false]) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_89" call dayz_rollingMessages;};
_PlayerNear = {isPlayer _x} count (([_obj] call FNC_GetPos) nearEntities ["CAManBase", 10]) > 1;
if (_PlayerNear) exitWith {localize "str_pickup_limit_5" call dayz_rollingMessages;};
@@ -267,7 +267,7 @@ if (_proceed && _success) then {
player playActionNow "stop";
};
};
DZE_ActionInProgress = false;
dayz_actionInProgress = false;
s_player_deleteBuild = -1;
_obj