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

@@ -6,8 +6,9 @@ _config = configFile >> "CfgWeapons" >> _item;
_droppedType = getText (_config >> "droppeditem");
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
if (_onLadder) exitWith { localize "str_player_21" call dayz_rollingMessages; r_action_count = 0; };
if (r_action_count != 1) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
if (_onLadder) exitWith { localize "str_player_21" call dayz_rollingMessages; dayz_actionInProgress = false; };
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
dayz_actionInProgress = true;
call gear_ui_init;
@@ -32,4 +33,4 @@ _bag = createVehicle [format["WeaponHolder_%1",_item],getPosATL player,[], 1, "C
_bag modelToWorld getPosATL player;
_bag setDir (getDir player);
player reveal _bag;
r_action_count = 0;
dayz_actionInProgress = false;