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,8 +1,8 @@
private ["_objectID","_objectUID","_target","_objectClasses","_range","_objects","_requirements","_count","_objects_filtered","_ctrl","_itemText","_type","_amount","_success","_wealth","_message1","_message2","_option"];
disableSerialization;
if (DZE_ActionInProgress) exitWith {localize "STR_EPOCH_ACTIONS_2" call dayz_rollingMessages;};
DZE_ActionInProgress = true;
if (dayz_actionInProgress) exitWith {localize "STR_EPOCH_ACTIONS_2" call dayz_rollingMessages;};
dayz_actionInProgress = true;
player removeAction s_player_maintain_area;
s_player_maintain_area = 1;
@@ -36,7 +36,7 @@ if (_count == 0) exitWith {
} else {
format[localize "STR_EPOCH_ACTIONS_22",_count] call dayz_rollingMessages;
};
DZE_ActionInProgress = false;
dayz_actionInProgress = false;
s_player_maintain_area = -1;
s_player_maintain_area_preview = -1;
};
@@ -132,6 +132,6 @@ switch _option do {
};
};
DZE_ActionInProgress = false;
dayz_actionInProgress = false;
s_player_maintain_area = -1;
s_player_maintain_area_preview = -1;