mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +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:
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
[_obj] call player_packTent;
|
||||
*/
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_player_beingpacked" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_player_beingpacked" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
_obj = _this;
|
||||
_ownerID = _obj getVariable["CharacterID","0"];
|
||||
_objectID = _obj getVariable["ObjectID","0"];
|
||||
@@ -24,7 +24,7 @@ _campItems = ["IC_DomeTent","IC_Tent"];
|
||||
if (_ownerID in [dayz_characterID,dayz_playerUID] or typeOf _obj in _campItems) then {
|
||||
player playActionNow "Medic";
|
||||
_alreadyPacking = _obj getVariable["packing",0];
|
||||
if (_alreadyPacking == 1) exitWith {localize "str_player_beingpacked" call dayz_rollingMessages; DZE_ActionInProgress = false;};
|
||||
if (_alreadyPacking == 1) exitWith {localize "str_player_beingpacked" call dayz_rollingMessages; dayz_actionInProgress = false;};
|
||||
|
||||
_obj setVariable["packing",1];
|
||||
_dir = direction _obj;
|
||||
@@ -82,4 +82,4 @@ if (_ownerID in [dayz_characterID,dayz_playerUID] or typeOf _obj in _campItems)
|
||||
} else {
|
||||
localize "str_fail_tent_pack" call dayz_rollingMessages;
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
Reference in New Issue
Block a user