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

@@ -2,7 +2,6 @@ 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 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;};
@@ -10,6 +9,9 @@ if (_PlayerNear) exitWith {dayz_myCursorTarget = objNull; localize "str_pickup_l
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";
_is6WheelType = false;
@@ -25,7 +27,7 @@ _NoGlassArray = ["HitGlass1","HitGlass2","HitGlass3","HitGlass4","HitGlass5","Hi
_RemovedPartsArray = ["motor","HitLF2Wheel","HitRF2Wheel","HitBody","HitMissiles","HitHull","HitVRotor","HitFuel","HitEngine"];
if (!_is6WheelType) then {
if ((_vehicle isKindOf "ATV_Base_EP1") || {_isMotorcycle}) then {
if ((_vehicle isKindOf "ATV_Base_EP1") || _isMotorcycle) then {
_hitpoints = _hitpoints - _NoGlassArray;
if (_isMotorcycle) then {