From e4458a24e3ef1b53116ec65804983db85ee7deb8 Mon Sep 17 00:00:00 2001 From: AirwavesMan Date: Mon, 29 Mar 2021 08:58:45 +0200 Subject: [PATCH] Fix removeAction for salvage and repair --- SQF/dayz_code/actions/repair_vehicle.sqf | 2 +- SQF/dayz_code/actions/salvage_vehicle.sqf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SQF/dayz_code/actions/repair_vehicle.sqf b/SQF/dayz_code/actions/repair_vehicle.sqf index bd6a3a6c6..dc45b5eef 100644 --- a/SQF/dayz_code/actions/repair_vehicle.sqf +++ b/SQF/dayz_code/actions/repair_vehicle.sqf @@ -2,11 +2,11 @@ private ["_part","_cancel","_color","_string","_handle","_damage","_cmpt","_vehi _vehicle = _this select 3; dayz_myCursorTarget = _vehicle; +{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = []; _hitpoints = _vehicle call vehicle_getHitpoints; if (count _hitpoints < 1) exitwith {}; -{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = []; { _hitpoint = _x; diff --git a/SQF/dayz_code/actions/salvage_vehicle.sqf b/SQF/dayz_code/actions/salvage_vehicle.sqf index 9c95ad8da..681461bef 100644 --- a/SQF/dayz_code/actions/salvage_vehicle.sqf +++ b/SQF/dayz_code/actions/salvage_vehicle.sqf @@ -2,15 +2,15 @@ private ["_isMotorcycle","_hits","_part","_color","_vehicle","_PlayerNear","_hit "_6WheelTypeArray","_NoGlassArray","_RemovedPartsArray","_damage","_cmpt","_configVeh","_damagePercent","_string","_handle","_cancel","_type"]; _vehicle = _this select 3; +dayz_myCursorTarget = _vehicle; +{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = []; _PlayerNear = {isPlayer _x} count ((getPosATL _vehicle) nearEntities ["CAManBase", 12]) > 1; if (_PlayerNear) exitWith {dayz_myCursorTarget = objNull; localize "str_pickup_limit_5" call dayz_rollingMessages;}; -dayz_myCursorTarget = _vehicle; _hitpoints = _vehicle call vehicle_getHitpoints; if (count _hitpoints < 1) exitwith {}; -{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = []; _type = typeOf _vehicle; _isMotorcycle = _vehicle isKindOf "Motorcycle";