From 43487066d71b4aad4529024d8530cc64627dc240 Mon Sep 17 00:00:00 2001 From: Zepheris Date: Sun, 23 Feb 2020 20:47:03 -0700 Subject: [PATCH] Commited code so far, still not working --- .../addons/drag_body/H8_dragBody.sqf | 38 ++++++++++++------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/Server/mpmissions/epoch.Bornholm/addons/drag_body/H8_dragBody.sqf b/Server/mpmissions/epoch.Bornholm/addons/drag_body/H8_dragBody.sqf index b0e6ef4..4ee3a22 100644 --- a/Server/mpmissions/epoch.Bornholm/addons/drag_body/H8_dragBody.sqf +++ b/Server/mpmissions/epoch.Bornholm/addons/drag_body/H8_dragBody.sqf @@ -11,8 +11,11 @@ H8_DragAction = { _unit = (_this select 0); _epochID = (_this select 1); + _output = format ["[dragBody] Debug: Drag Action - %1",_epochID]; + diag_log _output; + //[[_unit, vehicle player,_unitID],"H8_fnc_attach",true] call BIS_fnc_MP; - [_unit, vehicle player, _epochID] remoteExec ["H8_fnc_attach", 2, false]; + [_unit, vehicle player, _epochID] remoteExec ["H8_fnc_attach",2]; _unit attachTo [player,[0,1,0]]; player playAction "grabDrag"; @@ -22,30 +25,34 @@ H8_DragAction = { H8_fnc_attach = { _unit = (_this select 0); _player = (_this select 1); - _unitID = (_this select 2); + _epochID = (_this select 2); - _id = format ["h8EF%1",_unitID]; - 0 = [_id, "onEachFrame", "H8_fnc_moveBody",[_unit,_player]] call BIS_fnc_addStackedEventHandler; + _output = format ["[dragBody] Debug: fnc_attach - %1",_epochID]; + diag_log _output; + + //_id = format ["h8EF%1",_epochID]; + [_epochID, "onEachFrame", "H8_fnc_moveBody",[_unit,_player]] call BIS_fnc_addStackedEventHandler; }; H8_fnc_moveBody = { - _unit = (_this select 0); + _unit = (_this select 0); _player = (_this select 1); - + diag_log "[dragBody] Debug: fnc_MoveBody"; // CREDIT TOO Das Attorney FOR CODE - _pos = _player modelToWorld [0,1,0]; + _pos = _player modelToWorld [0,1,0]; _unit setPos _pos; _unit setDir 180; _unit switchMove "AinjPpneMrunSnonWnonDb"; }; H8_dropAction = { - _dropID = (_this select 0); + _unit = (_this select 0); _epochID = (_this select 1); - // GLOBAL CODE - //0 = [[_unit, vehicle player,_unitID],"H8_fnc_detach",true] call BIS_fnc_MP; - [_unit, vehicle player, _epochID] remoteExec ["H8_fnc_detach",2,false]; + _output = format ["[dragBody] Debug: Drop Action - %1",_epochID]; + diag_log _output; + + [_unit, vehicle player, _epochID] remoteExec ["H8_fnc_detach",2]; detach _unit; // CLIENT SIDE @@ -56,10 +63,13 @@ H8_dropAction = { H8_fnc_detach = { _unit = (_this select 0); _player = (_this select 1); - _unitID = (_this select 2); + _epochID = (_this select 2); - _id = format ["h8EF%1",_unitID]; - 0 = [_id, "onEachFrame"] call BIS_fnc_removeStackedEventHandler; + _output = format ["[dragBody] Debug: fnc_detach - %1",_epochID]; + diag_log _output; + + //_id = format ["h8EF%1",_epochID]; + [_epochID, "onEachFrame"] call BIS_fnc_removeStackedEventHandler; sleep 0.05; _relD = [_unit,_player] call BIS_fnc_dirTo;