mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-18 17:42:01 +03:00
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:
@@ -2,8 +2,8 @@ if (dayz_lastClothesChange + 5 > diag_tickTime) exitWith {localize "str_player_a
|
||||
dayz_lastClothesChange = diag_tickTime;
|
||||
|
||||
if (_this in DZE_RestrictSkins) exitWith { format[localize "str_epoch_player_315",_this] call dayz_rollingMessages; };
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_83" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_83" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
/*
|
||||
_item call player_wearClothes;
|
||||
Added Female skin changes - DayZ Epoch - vbawol
|
||||
@@ -13,19 +13,19 @@ private ["_item","_onLadder","_hasclothesitem","_config","_text","_isFemale","_m
|
||||
|
||||
_item = _this;
|
||||
call gear_ui_init;
|
||||
r_action_count = 0; //reset for strange glitch
|
||||
dayz_actionInProgress = false; //reset for strange glitch
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
if (_onLadder) exitWith {localize "str_player_21" call dayz_rollingMessages; DZE_ActionInProgress = false;};
|
||||
if (_onLadder) exitWith {localize "str_player_21" call dayz_rollingMessages; dayz_actionInProgress = false;};
|
||||
|
||||
_hasclothesitem = _this in magazines player;
|
||||
_config = configFile >> "CfgMagazines";
|
||||
_text = getText (_config >> _item >> "displayName");
|
||||
|
||||
if (!_hasclothesitem) exitWith {format[localize "str_player_31",_text,localize "str_player_31_wear"] call dayz_rollingMessages; DZE_ActionInProgress = false;};
|
||||
if (!_hasclothesitem) exitWith {format[localize "str_player_31",_text,localize "str_player_31_wear"] call dayz_rollingMessages; dayz_actionInProgress = false;};
|
||||
|
||||
if (vehicle player != player) exitWith {localize "str_player_fail_wear1" call dayz_rollingMessages; DZE_ActionInProgress = false;};
|
||||
//if (!isNull (unitBackpack player)) exitWith {DZE_ActionInProgress = false; localize "STR_EPOCH_ACTIONS_9" call dayz_rollingMessages;};
|
||||
if ("CSGAS" in (magazines player)) exitWith {DZE_ActionInProgress = false; localize "STR_EPOCH_ACTIONS_10" call dayz_rollingMessages;};
|
||||
if (vehicle player != player) exitWith {localize "str_player_fail_wear1" call dayz_rollingMessages; dayz_actionInProgress = false;};
|
||||
//if (!isNull (unitBackpack player)) exitWith {dayz_actionInProgress = false; localize "STR_EPOCH_ACTIONS_9" call dayz_rollingMessages;};
|
||||
if ("CSGAS" in (magazines player)) exitWith {dayz_actionInProgress = false; localize "STR_EPOCH_ACTIONS_10" call dayz_rollingMessages;};
|
||||
|
||||
_myModel = (typeOf player);
|
||||
_humanity = player getVariable ["humanity",0];
|
||||
@@ -57,4 +57,4 @@ if ( (isClass(_config >> _itemNew)) ) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
Reference in New Issue
Block a user