mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
Fix abort and gear menu staying open at same time
This commit is contained in:
@@ -60,7 +60,7 @@ if (surfaceIsWater _location) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
player reveal _b0x1337;
|
player reveal _b0x1337;
|
||||||
|
DZE_GearCheckBypass = true; //Bypass gear menu checks since dialog will always open on crate
|
||||||
player action ["Gear", _b0x1337];
|
player action ["Gear", _b0x1337];
|
||||||
|
|
||||||
localize "str_epoch_player_78" call dayz_rollingMessages;
|
localize "str_epoch_player_78" call dayz_rollingMessages;
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ if (_proceed && _success) then {
|
|||||||
_item setposATL _iPos;
|
_item setposATL _iPos;
|
||||||
|
|
||||||
player reveal _item;
|
player reveal _item;
|
||||||
|
DZE_GearCheckBypass = true; //Bypass gear menu checks since dialog will always open on item
|
||||||
player action ["Gear", _item];
|
player action ["Gear", _item];
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
private [];
|
private [];
|
||||||
|
|
||||||
player removeAction s_player_SurrenderedGear;
|
player removeAction s_player_SurrenderedGear;
|
||||||
|
DZE_GearCheckBypass = true;
|
||||||
player action ["Gear", (_this select 3)];
|
player action ["Gear", (_this select 3)];
|
||||||
|
|
||||||
s_player_SurrenderedGear = -1;
|
s_player_SurrenderedGear = -1;
|
||||||
@@ -41,19 +41,21 @@ if ((vehicle player) == player) then {
|
|||||||
if (_exit) then {
|
if (_exit) then {
|
||||||
_lastSave = dayz_lastSave;
|
_lastSave = dayz_lastSave;
|
||||||
_startTime = diag_tickTime;
|
_startTime = diag_tickTime;
|
||||||
localize "str_epoch_player_7" call dayz_rollingMessages;
|
|
||||||
_display closeDisplay 2;
|
_display closeDisplay 2;
|
||||||
|
localize "str_epoch_player_7" call dayz_rollingMessages;
|
||||||
_ctType = typeOf _cTarget;
|
_ctType = typeOf _cTarget;
|
||||||
//direct gear to cursorTarget
|
//direct gear to cursorTarget
|
||||||
[_lastSave, _startTime, _ctType, _cTarget] spawn {
|
[_lastSave, _startTime, _ctType, _cTarget] spawn {
|
||||||
waitUntil {((_this select 0) != dayz_lastSave) || {diag_tickTime >= ((_this select 1) + 1)}}; //waiting is required otherwise player_forceSave will reset DZE_GearCheckBypass
|
waitUntil {((_this select 0) != dayz_lastSave) || {diag_tickTime >= ((_this select 1) + 1)}}; //waiting is required otherwise player_forceSave will reset DZE_GearCheckBypass
|
||||||
DZE_GearCheckBypass = true;
|
DZE_GearCheckBypass = true;
|
||||||
|
if (!dialog) then {
|
||||||
if ((((_this select 2) in DZE_isNewStorage) || {(_this select 2) == "LockboxStorage"} || {(_this select 2) isKindOf "Land_A_tent"} || {(_this select 2) isKindOf "WeaponHolder"} || {((!alive (_this select 3)) && {(_this select 2) isKindOf "Man"})}) && {!(locked (_this select 3))}) then {
|
if ((((_this select 2) in DZE_isNewStorage) || {(_this select 2) == "LockboxStorage"} || {(_this select 2) isKindOf "Land_A_tent"} || {(_this select 2) isKindOf "WeaponHolder"} || {((!alive (_this select 3)) && {(_this select 2) isKindOf "Man"})}) && {!(locked (_this select 3))}) then {
|
||||||
Player action ["GEAR", (_this select 3)];
|
Player action ["GEAR", (_this select 3)];
|
||||||
} else {
|
} else {
|
||||||
createGearDialog [player, "RscDisplayGear"];
|
createGearDialog [player, "RscDisplayGear"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
DZE_GearCheckBypass = false; //exit will always be false the when the above code opens a new gear menu, this will reset the variable
|
DZE_GearCheckBypass = false; //exit will always be false the when the above code opens a new gear menu, this will reset the variable
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ _created = false;
|
|||||||
|
|
||||||
if ( isNull _dialog ) then {
|
if ( isNull _dialog ) then {
|
||||||
//startLoadingScreen [""];
|
//startLoadingScreen [""];
|
||||||
|
DZE_GearCheckBypass = true; //Bypass gear menu checks since dialog will always open on player's gear
|
||||||
createGearDialog [player, "RscDisplayGear"];
|
createGearDialog [player, "RscDisplayGear"];
|
||||||
_dialog = findDisplay 106;
|
_dialog = findDisplay 106;
|
||||||
_created = true;
|
_created = true;
|
||||||
|
|||||||
@@ -373,6 +373,7 @@ if (!isDedicated) then {
|
|||||||
openMap false;
|
openMap false;
|
||||||
closeDialog 0;
|
closeDialog 0;
|
||||||
if (gear_done) then {sleep 0.001;};
|
if (gear_done) then {sleep 0.001;};
|
||||||
|
DZE_GearCheckBypass = true; //Bypass gear menu checks since dialog will always open on player's gear
|
||||||
player action ["Gear", player];
|
player action ["Gear", player];
|
||||||
if (gear_done) then {sleep 0.001;};
|
if (gear_done) then {sleep 0.001;};
|
||||||
_dialog = findDisplay 106;
|
_dialog = findDisplay 106;
|
||||||
@@ -383,6 +384,7 @@ if (!isDedicated) then {
|
|||||||
if (gear_done) then {sleep 0.001;};
|
if (gear_done) then {sleep 0.001;};
|
||||||
if (_i in [100,200,299]) then {
|
if (_i in [100,200,299]) then {
|
||||||
closeDialog 0;
|
closeDialog 0;
|
||||||
|
DZE_GearCheckBypass = true; //Bypass gear menu checks since dialog will always open on player's gear
|
||||||
player action ["Gear", player];
|
player action ["Gear", player];
|
||||||
};
|
};
|
||||||
if (_i > 300) exitWith {};
|
if (_i > 300) exitWith {};
|
||||||
|
|||||||
Reference in New Issue
Block a user