Fix removeAction for salvage and repair

This commit is contained in:
AirwavesMan
2021-03-29 08:58:45 +02:00
parent c4e5b2a56b
commit e4458a24e3
2 changed files with 3 additions and 3 deletions

View File

@@ -2,11 +2,11 @@ private ["_part","_cancel","_color","_string","_handle","_damage","_cmpt","_vehi
_vehicle = _this select 3; _vehicle = _this select 3;
dayz_myCursorTarget = _vehicle; dayz_myCursorTarget = _vehicle;
{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = [];
_hitpoints = _vehicle call vehicle_getHitpoints; _hitpoints = _vehicle call vehicle_getHitpoints;
if (count _hitpoints < 1) exitwith {}; if (count _hitpoints < 1) exitwith {};
{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = [];
{ {
_hitpoint = _x; _hitpoint = _x;

View File

@@ -2,15 +2,15 @@ private ["_isMotorcycle","_hits","_part","_color","_vehicle","_PlayerNear","_hit
"_6WheelTypeArray","_NoGlassArray","_RemovedPartsArray","_damage","_cmpt","_configVeh","_damagePercent","_string","_handle","_cancel","_type"]; "_6WheelTypeArray","_NoGlassArray","_RemovedPartsArray","_damage","_cmpt","_configVeh","_damagePercent","_string","_handle","_cancel","_type"];
_vehicle = _this select 3; _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; _PlayerNear = {isPlayer _x} count ((getPosATL _vehicle) nearEntities ["CAManBase", 12]) > 1;
if (_PlayerNear) exitWith {dayz_myCursorTarget = objNull; localize "str_pickup_limit_5" call dayz_rollingMessages;}; if (_PlayerNear) exitWith {dayz_myCursorTarget = objNull; localize "str_pickup_limit_5" call dayz_rollingMessages;};
dayz_myCursorTarget = _vehicle;
_hitpoints = _vehicle call vehicle_getHitpoints; _hitpoints = _vehicle call vehicle_getHitpoints;
if (count _hitpoints < 1) exitwith {}; if (count _hitpoints < 1) exitwith {};
{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = [];
_type = typeOf _vehicle; _type = typeOf _vehicle;
_isMotorcycle = _vehicle isKindOf "Motorcycle"; _isMotorcycle = _vehicle isKindOf "Motorcycle";