Rope break fix

This commit is contained in:
He-Man 2018-06-22 19:53:47 +02:00
parent abf225a68c
commit 6d36f5dcd3

View File

@ -16,3 +16,15 @@ _this addMPEventHandler["MPKilled", { _this call EPOCH_server_save_killedVehicle
_this addMPEventHandler["MPHit", { EPOCH_saveVehQueue pushBackUnique (_this select 0) }]; _this addMPEventHandler["MPHit", { EPOCH_saveVehQueue pushBackUnique (_this select 0) }];
_this addEventHandler["Local", { EPOCH_saveVehQueue pushBackUnique (_this select 0) }]; _this addEventHandler["Local", { EPOCH_saveVehQueue pushBackUnique (_this select 0) }];
_this addEventHandler["GetOut", { EPOCH_saveVehQueue pushBackUnique (_this select 0) }]; _this addEventHandler["GetOut", { EPOCH_saveVehQueue pushBackUnique (_this select 0) }];
// fix to prevent rope break
if (_this iskindof "AIR") then {
_this addEventHandler ["RopeAttach", {
params ["_object1", "_rope", "_object2"];
if (isnull (driver _object2)) then {
if !(owner _object1 == owner _object2) then {
_object2 setowner (owner _object1);
};
};
}];
};