Fixed Heal not working, if only hitpoint damaged

This commit is contained in:
He-Man 2017-04-09 21:26:43 +02:00 committed by GitHub
parent 9721476cf2
commit 1c201ea77d

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;