Merge pull request #735 from Ignatz-HeMan/patch-3

Fixed Heal not working, if only hitpoint damaged
This commit is contained in:
vbawol 2017-04-09 13:55:44 -07:00 committed by GitHub
commit acc341666b

View File

@ -286,14 +286,14 @@ switch _interactOption do {
_vehicles = player nearEntities[["Epoch_Male_F", "Epoch_Female_F"], 6];
_vehicle = cursorTarget;
if (_vehicle in _vehicles) then {
if (damage _vehicle != 0) then {
if (damage _vehicle != 0 || {_x > 0} count ((getallhitpointsdamage _vehicle) select 2) > 0) then {
if (_item call _removeItem) then {
[_vehicle,["ALL",0],player,Epoch_personalToken] remoteExec ["EPOCH_server_repairVehicle",2];
["Healed other player", 5] call Epoch_message;
};
};
} else {
if (damage player != 0) then {
if (damage player != 0 || {_x > 0} count ((getallhitpointsdamage player) select 2) > 0) then {
if (_item call _removeItem) then {
[player,["ALL",0],player,Epoch_personalToken] remoteExec ["EPOCH_server_repairVehicle",2];
["Healed yourself", 5] call Epoch_message;