Fix rpt errors if zombies hit players inside gyros

Also zombies can punch players out of gyros now. The same way like bikes and ATVs.
This commit is contained in:
AirwavesMan
2021-03-01 15:23:57 +01:00
parent d55269c1e2
commit fd6bfbbff5
3 changed files with 19 additions and 15 deletions

View File

@@ -1,11 +1,13 @@
private ["_part","_cancel","_color","_string","_handle","_damage","_cmpt","_vehicle","_hitpoints","_damagePercent","_configVeh","_hitpoint","_hits"];
_vehicle = _this select 3;
{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = [];
dayz_myCursorTarget = _vehicle;
_hitpoints = _vehicle call vehicle_getHitpoints;
if (count _hitpoints < 1) exitwith {};
{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = [];
{
_hitpoint = _x;
_hits = [_vehicle,_hitpoint] call object_getHit;
@@ -49,9 +51,7 @@ _hitpoints = _vehicle call vehicle_getHitpoints;
} count _hitpoints;
if (count _hitpoints > 0) then {
// Localized in A2OA\Expansion\dta\languagecore
_cancel = dayz_myCursorTarget addAction [localize "str_action_cancel_action", "\z\addons\dayz_code\actions\repair_cancel.sqf","repair", 0, true, false];
s_player_repairActions set [count s_player_repairActions,_cancel];
s_player_repair_crtl = 1;
};
// Localized in A2OA\Expansion\dta\languagecore
_cancel = dayz_myCursorTarget addAction [localize "str_action_cancel_action", "\z\addons\dayz_code\actions\repair_cancel.sqf","repair", 0, true, false];
s_player_repairActions set [count s_player_repairActions,_cancel];
s_player_repair_crtl = 1;