From 73346388be358d18fa6a9d48fec59775b77c29f4 Mon Sep 17 00:00:00 2001 From: vbawol Date: Thu, 17 Dec 2015 11:24:11 -0600 Subject: [PATCH] 0.3.6.024 --- Changelogs/0.3.6.0.txt | 2 + .../@epochhive/addons/a3_epoch_server.pbo | Bin 363320 -> 364245 bytes Server_Install_Pack/sc/battleye/scripts.txt | 2 +- .../compile/building/EPOCH_simulSwap.sqf | 4 +- .../compile/building/EPOCH_staticMove.sqf | 4 +- .../functions/EPOCH_fnc_cursorTarget.sqf | 10 ++- .../EPOCH_KeyDown.sqf | 17 ++--- .../compile/traders/EPOCH_startNpcTrade.sqf | 64 ++++++------------ .../EPOCH_server_makeNPCTrade.sqf | 31 ++++++++- 9 files changed, 69 insertions(+), 65 deletions(-) diff --git a/Changelogs/0.3.6.0.txt b/Changelogs/0.3.6.0.txt index 929f6b20..54eb8d42 100644 --- a/Changelogs/0.3.6.0.txt +++ b/Changelogs/0.3.6.0.txt @@ -2,6 +2,8 @@ [Added] Ability to sell Primary weapon from hands and empty backpacks. Thanks to @He-Man [Changed] Increased max player load 2x to compensate for the new stamina system in 1.54. [Changed] Increased backpack storage limits to allow carrying long weapons. +[Fixed] cursorTarget function to only use new Epoch method while underwater. Should help with targeting issues on land. +[Fixed] Canceling build mode did not remove the ghost object as it should have. [Fixed] Updated Epoch armor stats UI system to support new changes since 1.54. [Fixed] Changes to default Arma weapon configs to allow long (Lynx,etc) weapons to be stored in backpacks. [Fixed] Unable to sell after attempting to sell a temporary vehicle. Thanks to @He-Man diff --git a/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo b/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo index 7732cef7b25cfd16c29c2a21e3d23c2ecee58529..499cadad52a61865601b115de033808a4ebde797 100644 GIT binary patch delta 800 zcma))&1(}u7{-}=VTwtWY!j6p-u9$rVG~n~BCTl-+CwoFqk^R@lk7CzcDfUHx0D>j zg9klYR~-;Mc-Dv@xCT-Gf{IWAxx^y$pcg-`g5cz%W`iIO49wT_o9B6FUOk969>t%3 ziiX~QHZPw&<{XGhPImap}0y+3yQe38W{@rnljNJ>q~I7y;~6-)C#Sd zFvWkIL^1xofdZGhD}t8mojFHY5mQigo2;GgW5Sv)EKpX4@jo=7B7eCU7b1S9iH_Wu zP&{%)`5(X%A$A+E7bM(IYA+Kgn{3_CJlpEVEKC6_uAE<|)T>hsB4aaGon=%bA~6^Q zo5Zs7#T8PrEm){9OSg4qbW0*TC_gf`D5n>_kap<=sL$coT$JGR4^e=BYoK5nKp2>3 zmf&~mxW+U>3+xIrsRj#4IVC3thyc#!S1H&L@yAKuNM=tzb8)V~W(spXqSpq%^}(sQ z)WN$k$Dfx1Z3FzmYc$HIn`m^b(vzn$lgDq>Yd+EaZoL**ZAokg-rmK&kN55$ OdYZg5eK@xD=E-lKwC+Iw delta 131 zcmcaQS8T^Lu?-LT*usv;g{@SbEWjr+*@0hhGY@|UEA#&Ng68QW+oy{#^6qC=;N_a0 ze}mC%`<=^-7dR1M`Build Canceled", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext; }; - if !(EPOCH_arr_interactedObjs isEqualTo[]) then { - EPOCH_arr_interactedObjs remoteExec["EPOCH_server_save_vehicles", 2]; EPOCH_arr_interactedObjs = []; }; @@ -190,8 +187,8 @@ if (vehicle player == player) then { case EPOCH_keysBuildMovBak: { EPOCH_Y_OFFSET = (EPOCH_Y_OFFSET - 0.1) max 2; _handled = true }; case EPOCH_keysBuildMovL: { EPOCH_X_OFFSET = (EPOCH_X_OFFSET + 0.1) min 5; _handled = true }; case EPOCH_keysBuildMovR: { EPOCH_X_OFFSET = (EPOCH_X_OFFSET - 0.1) max - 5; _handled = true }; - case EPOCH_keysBuildRotL: { EPOCH_buildDirection = (EPOCH_buildDirection + 1) min 360; EPOCH_space = true; _handled = true }; - case EPOCH_keysBuildRotR: { EPOCH_buildDirection = (EPOCH_buildDirection - 1) max 0; EPOCH_space = true; _handled = true }; + case EPOCH_keysBuildRotL: { EPOCH_buildDirection = (EPOCH_buildDirection + 1) min 360; EPOCH_doRotate = true; _handled = true }; + case EPOCH_keysBuildRotR: { EPOCH_buildDirection = (EPOCH_buildDirection - 1) max 0; EPOCH_doRotate = true; _handled = true }; //case EPOCH_keysBuildIt: { cursorTarget call EPOCH_fnc_SelectTarget; _handled = true }; }; }; @@ -273,7 +270,7 @@ if (vehicle player == player) then { if (_dikCode in(actionKeys "Gear")) then { if !(isNull EPOCH_Target) then { - if !(_vehicle isKindOf "ThingX") then { + if !(EPOCH_Target isKindOf "ThingX") then { deleteVehicle EPOCH_Target; } else { EPOCH_Target = objNull; diff --git a/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf b/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf index a347dfb4..171ff36d 100644 --- a/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf +++ b/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf @@ -47,37 +47,33 @@ if (!isNull _this) then { if (_item in items player) then { player removeItem _item; _arrayIn pushBack _item; - } - else { + } else { if (_item == primaryweapon player) then { player removeweapon _item; _arrayIn pushBack _item; + }; }; - }; - } - else { + } else { if ([_item, "CfgVehicles"] call EPOCH_fnc_isAny) then { if (_item == backpack player) then { removeBackpack player; _arrayIn pushBack _item; - } - else { - _vehicles = _this nearEntities[[_item], 30]; - if (!(_vehicles isEqualTo[])) then { - _vehicle = _vehicles select 0; - if (!isNull _vehicle) then { - if (local _vehicle) then { - _vehSlot = _vehicle getVariable["VEHICLE_SLOT", "ABORT"]; - if (_vehSlot != "ABORT") then { - _arrayIn pushBack _item; - // will be removed server side + } else { + _vehicles = _this nearEntities[[_item], 30]; + if (!(_vehicles isEqualTo[])) then { + _vehicle = _vehicles select 0; + if (!isNull _vehicle) then { + if (local _vehicle) then { + _vehSlot = _vehicle getVariable["VEHICLE_SLOT", "ABORT"]; + if (_vehSlot != "ABORT") then { + _arrayIn pushBack _item; + // will be removed server side + }; }; }; }; }; - }; - } - else { + } else { if (_item in magazines player) then { player removeMagazine _item; _arrayIn pushBack _item; @@ -175,33 +171,11 @@ if (!isNull _this) then { _x call EPOCH_fnc_addItemOverflow; }; } else { - // - if (_x isKindOf "Bag_Base") then { - // add to players back - if (backpack player == "") then { - player addbackpack _x; - } else { - // add to the ground - _wH = objNull; - _nearByHolder = nearestObjects [position player,["groundWeaponHolder"],3]; - if (_nearByHolder isEqualTo []) then { - _wHPos = player modelToWorld [0,1,0]; - if (surfaceIsWater _wHPos) then { - _wHPos = ASLToATL _wHPos; - }; - _wH = createVehicle ["groundWeaponHolder",_wHPos, [], 0, "CAN_COLLIDE"]; - } else { - _wH = _nearByHolder select 0; - }; - _wh addBackpackCargoGlobal [_x,1]; - }; + if ([_x, "CfgMagazines"] call EPOCH_fnc_isAny) then { + _errorMsg = _errorMsg + format["%1, ", getText(configfile >> "CfgMagazines" >> (_x) >> "displayName")]; + _x call EPOCH_fnc_addItemOverflow; } else { - if ([_x, "CfgMagazines"] call EPOCH_fnc_isAny) then { - _errorMsg = _errorMsg + format["%1, ", getText(configfile >> "CfgMagazines" >> (_x) >> "displayName")]; - _x call EPOCH_fnc_addItemOverflow; - } else { - _errorMsg = _errorMsg + format["%1, ", getText(configfile >> "CfgVehicles" >> (_x) >> "displayName")]; - }; + _errorMsg = _errorMsg + format["%1, ", getText(configfile >> "CfgVehicles" >> (_x) >> "displayName")]; }; }; } forEach(_this select 1); diff --git a/Sources/epoch_server/compile/epoch_trading/EPOCH_server_makeNPCTrade.sqf b/Sources/epoch_server/compile/epoch_trading/EPOCH_server_makeNPCTrade.sqf index 703a3ba8..1c41924a 100644 --- a/Sources/epoch_server/compile/epoch_trading/EPOCH_server_makeNPCTrade.sqf +++ b/Sources/epoch_server/compile/epoch_trading/EPOCH_server_makeNPCTrade.sqf @@ -149,7 +149,7 @@ if (_slot != -1) then { _helipad pushBack _smoke; }; - // water check + // water check if (_item isKindOf "Ship") then { { if (surfaceIsWater (getposATL _x)) then { @@ -226,7 +226,7 @@ if (_slot != -1) then { _vehObj = [_item,_position,random 360,true,_vehslot,_lockOwner,"NONE",false] call EPOCH_fnc_spawn_vehicle; _final_location = getPosATL _vehObj; - + _group = group _plyr; _wp = _group addWaypoint [_final_location, 0]; deleteWaypoint [_group, 0]; @@ -242,6 +242,33 @@ if (_slot != -1) then { }; }; } else { + + if (_item isKindOf "Bag_Base") then { + // add to players back + /* + if (backpack _plyr == "") then { + _plyr addBackpackGlobal _item; + diag_log "backpack added to players back"; + } else { + */ + //diag_log "backpack added to players feet"; + // add to the ground + _wH = objNull; + _nearByHolder = nearestObjects [position _plyr,["groundWeaponHolder"],3]; + if (_nearByHolder isEqualTo []) then { + _wHPos = _plyr modelToWorld [0,1,0]; + if (surfaceIsWater _wHPos) then { + _wHPos = ASLToATL _wHPos; + }; + _wH = createVehicle ["groundWeaponHolder",_wHPos, [], 0, "CAN_COLLIDE"]; + } else { + _wH = _nearByHolder select 0; + }; + //diag_log "backpack added to container"; + _wh addBackpackCargoGlobal [_item,1]; + //}; + }; + _returnOut pushBack _item; _itemQtys set[_qtyIndex, (_currQty - _itemQty)];