mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Revert "Don't call player_forceSave when gear menu is aborted"
This reverts commit 91e312fdc7.
This commit is contained in:
@@ -7,7 +7,7 @@ class RscDisplayGear
|
|||||||
//onLoad = "[] spawn object_monitorGear; {player removeMagazines _x} count MeleeMagazines; call gear_ui_init; call ui_gear_sound; if (isNil('IGUI_GEAR_activeFilter')) then { IGUI_GEAR_activeFilter = 0;}; [_this,'onLoad'] execVM '\z\addons\dayz_code\system\handleGear.sqf'";/* diag_log 'RscDisplayGear : : onLoad'; */
|
//onLoad = "[] spawn object_monitorGear; {player removeMagazines _x} count MeleeMagazines; call gear_ui_init; call ui_gear_sound; if (isNil('IGUI_GEAR_activeFilter')) then { IGUI_GEAR_activeFilter = 0;}; [_this,'onLoad'] execVM '\z\addons\dayz_code\system\handleGear.sqf'";/* diag_log 'RscDisplayGear : : onLoad'; */
|
||||||
//onUnload = "{player removeMagazines _x} count MeleeMagazines; call player_forceSave; call dayz_meleeMagazineCheck;"; /* diag_log 'RscDisplayGear : : onunLoad'; */
|
//onUnload = "{player removeMagazines _x} count MeleeMagazines; call player_forceSave; call dayz_meleeMagazineCheck;"; /* diag_log 'RscDisplayGear : : onunLoad'; */
|
||||||
onLoad = "setMousePosition [0.5, 0.5];_this call fn_gearMenuChecks; false call dz_fn_meleeMagazines; [] spawn object_monitorGear; call gear_ui_init; call ui_gear_sound; if (isNil 'IGUI_GEAR_activeFilter') then {IGUI_GEAR_activeFilter = 0}; [_this, 'onLoad'] execVM '\z\addons\dayz_code\system\handleGear.sqf'";
|
onLoad = "setMousePosition [0.5, 0.5];_this call fn_gearMenuChecks; false call dz_fn_meleeMagazines; [] spawn object_monitorGear; call gear_ui_init; call ui_gear_sound; if (isNil 'IGUI_GEAR_activeFilter') then {IGUI_GEAR_activeFilter = 0}; [_this, 'onLoad'] execVM '\z\addons\dayz_code\system\handleGear.sqf'";
|
||||||
onUnload = "if (!DZE_abortGearMenu) then {true call dz_fn_meleeMagazines; call player_forceSave;};";
|
onUnload = "true call dz_fn_meleeMagazines; call player_forceSave;";
|
||||||
onMouseMoving = "[] call gear_ui_hide;";
|
onMouseMoving = "[] call gear_ui_hide;";
|
||||||
onMouseHolding = "[] call gear_ui_hide;";
|
onMouseHolding = "[] call gear_ui_hide;";
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
private ["_cTarget","_dis","_display","_friendlies","_rID"];
|
private ["_cTarget","_dis","_display","_friendlies","_rID"];
|
||||||
|
|
||||||
DZE_abortGearMenu = false;
|
|
||||||
|
|
||||||
// players inside vehicle can always access its gear
|
// players inside vehicle can always access its gear
|
||||||
if ((vehicle player) == player) then {
|
if ((vehicle player) == player) then {
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
@@ -11,8 +9,7 @@ if ((vehicle player) == player) then {
|
|||||||
|
|
||||||
if ((locked _cTarget) && {(_cTarget isKindOf "LandVehicle") or {_cTarget isKindOf "Air"} or {_cTarget isKindOf "Ship"}} && {(player distance _cTarget) < _dis}) then {
|
if ((locked _cTarget) && {(_cTarget isKindOf "LandVehicle") or {_cTarget isKindOf "Air"} or {_cTarget isKindOf "Ship"}} && {(player distance _cTarget) < _dis}) then {
|
||||||
localize "str_epoch_player_7" call dayz_rollingMessages;
|
localize "str_epoch_player_7" call dayz_rollingMessages;
|
||||||
DZE_abortGearMenu = true;
|
_display closeDisplay 1;
|
||||||
_display closeDisplay 2;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (DZE_BackpackAntiTheft) then {
|
if (DZE_BackpackAntiTheft) then {
|
||||||
@@ -20,8 +17,7 @@ if ((vehicle player) == player) then {
|
|||||||
_rID = if (DZE_permanentPlot) then { getPlayerUID _cTarget } else { _cTarget getVariable ["CharacterID","0"] };
|
_rID = if (DZE_permanentPlot) then { getPlayerUID _cTarget } else { _cTarget getVariable ["CharacterID","0"] };
|
||||||
if ((!canbuild or isInTraderCity) && {_cTarget isKindOf "Man"} && {alive _cTarget} && {isPlayer _cTarget} && {!(_rID in _friendlies)} && {(player distance _cTarget) < 12}) then {
|
if ((!canbuild or isInTraderCity) && {_cTarget isKindOf "Man"} && {alive _cTarget} && {isPlayer _cTarget} && {!(_rID in _friendlies)} && {(player distance _cTarget) < 12}) then {
|
||||||
localize "STR_EPOCH_PLAYER_316" call dayz_rollingMessages;
|
localize "STR_EPOCH_PLAYER_316" call dayz_rollingMessages;
|
||||||
DZE_abortGearMenu = true;
|
_display closeDisplay 1;
|
||||||
_display closeDisplay 2;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user