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,19 +1,19 @@
private ["_dir","_classname","_b0x1337","_location","_item","_config","_create_raw","_create","_qty","_type","_hasCrate","_hasTool"];
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_75" call dayz_rollingMessages;};
DZE_ActionInProgress = true;
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_75" call dayz_rollingMessages;};
dayz_actionInProgress = true;
_hasTool = "ItemCrowbar" in items player;
if(!_hasTool) exitWith {
localize "str_epoch_player_76" call dayz_rollingMessages;
DZE_ActionInProgress = false;
dayz_actionInProgress = false;
};
_item = _this;
_hasCrate = _item in magazines player;
if (!_hasCrate) exitWith {
localize "str_epoch_player_77" call dayz_rollingMessages;
DZE_ActionInProgress = false;
dayz_actionInProgress = false;
};
_config = configFile >> "CfgMagazines" >> _item;
@@ -65,4 +65,4 @@ player action ["Gear", _b0x1337];
localize "str_epoch_player_78" call dayz_rollingMessages;
DZE_ActionInProgress = false;
dayz_actionInProgress = false;