From 8e614b0b78ef67a230af3acf69787918de9a144f Mon Sep 17 00:00:00 2001 From: vbawol Date: Thu, 1 Dec 2016 17:44:43 -0600 Subject: [PATCH] Arma 3 1.66 fixes part1 playableUnits changed to allPlayers improved Epoch_selectInventoryItem function mproved inventory locked check --- .../@epochhive/addons/epoch_server.pbo | Bin 445231 -> 445212 bytes .../@epochhive/addons/epoch_server_core.pbo | Bin 21149 -> 21149 bytes .../addons/epoch_server_settings.pbo | Bin 478601 -> 478601 bytes .../epoch_code/compile/EPOCH_lootTrash.sqf | 2 +- .../inventory/EPOCH_selectInventoryItem.sqf | 23 +++++++++--------- .../epoch_config/Configs/CfgEpochClient.hpp | 4 +-- .../EPOCH_server_updatePlayerGroup.sqf | 2 +- .../epoch_player/EPOCH_server_loadPlayer.sqf | 2 +- .../EPOCH_server_revivePlayer.sqf | 2 +- .../init/server_securityfunctions.sqf | 6 ++--- .../epoch_server/system/server_monitor.fsm | 4 +-- 11 files changed, 23 insertions(+), 22 deletions(-) diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server.pbo index 85de916fd0b5a67d542ec6362f4af76910b9f6f5..04c1333ac72fc58316a553f1e19570685211aa2e 100644 GIT binary patch delta 351 zcmZ2KO?u8W=?Nap2e&#*^py|KRK6Gd25`d@Vw2BtzhDyrik(oL%*d-cUEYY1bMq@61xA*2TO1-b^YM9dfy|v8 zB@x5n4^(C=#l$du{xoLE$=4;iSUrIvT9eZxJ(z)(PTnXPAZ2D~Vq{{dWX;P}3&iht z?@ubt%t^5|Gc}*y$jKD8xlroaT>iwIoPeCf%G9D_pc-DT>GG|NDw}(ET%9)ED~OGI z`XW(Aq3PA9jOSCcqF%u9oZpgxX{>=c^*l;Ai z(+bu_Ge8!|PUp2|%&PL|Dle4bn& zlP5<>#IQQcX-2qB-Yv0=1&*t(JD+xc5rPVeSMGGqEdH&(^z_M2Jwr*E}q6_|d;nbl}|j}xoY^c}9O zeAD$ESRJOHq)$ diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo index c04a3069a5c07e18ad98f895cba3f018197d789e..3003738887eb0ecb6cb9ab0d4e6a5a7fdde8d7bb 100644 GIT binary patch delta 96 zcmbQclyUA-#tFX6$F@3543K92cG7xd-XSIscd{{a42VB@5_5o*nW2f1iJ6i$FIO!P wzu&z-sWdYu#n#N!e6piz#O4qdQ$LZCcUxrV+J%}VR@X1O`8TNB;`am|0QLSQO8@`> delta 96 zcmbQclyUA-#tFX6-%nak43K7Cw#{;5-XSIscd{{a42VB@5_5o*k)@%zv8j?ZFIO!P wzu&z-sWdYu#n#N!Y_g+j#O4qdQ$LY}R3-CU-weK9ztDA}YQ~u#DH*S|0P))b%7 diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo index 21b14b3d699cb1e9bf287ba67857a6b0fb379090..8ead484a70ba96b3629bf095e73843152b8b288d 100644 GIT binary patch delta 166 zcmeC2E!#O;c0!=T$*m3%E({C|Nu`-NDS83wwZ+nW2f1iKUV?FIO!Pzu&zdY^tr9sd@7|_V#z|j6lo;#LPg<0>rF9 i%(ndCUl`wH&o|dh**v-X!Uq7UMK(hK delta 166 zcmeC2E!#O;c0!=T?~~RME({C|Nu`-NDS83wwZ+k)@%zv89qVFIO!Pzu&zdY^tr9saf+o_V#z|j6lo;#LPg<0>rF9 j%(nd 2) then { { _index = lbAdd[21500, name _x]; lbSetData[21500, _index, netId _x]; - } forEach(playableUnits - [player]); + } forEach(allPlayers - [player]); }; _return = true; }; diff --git a/Sources/epoch_code/compile/inventory/EPOCH_selectInventoryItem.sqf b/Sources/epoch_code/compile/inventory/EPOCH_selectInventoryItem.sqf index 9768a91a..6006ede7 100644 --- a/Sources/epoch_code/compile/inventory/EPOCH_selectInventoryItem.sqf +++ b/Sources/epoch_code/compile/inventory/EPOCH_selectInventoryItem.sqf @@ -23,7 +23,7 @@ NOTHING */ //[[[cog import generate_private_arrays ]]] -private ["_arr","_craftingArray","_craftingArrayNames","_data","_exit","_index","_name","_pic","_text"]; +private ["_container","_craftingArray","_craftingArrayNames","_data","_idc","_index","_pic","_text","_weaponsAndItems"]; //[[[end]]] params ["_control","_index"]; EPOCH_InteractedItem = []; @@ -32,6 +32,7 @@ if (_index isEqualType []) then { _index = (_index select 0) select 1; }; +_idc = ctrlIDC _control; _text = _control lbText _index; _data = _control lbData _index; _pic = _control lbPicture _index; @@ -39,17 +40,17 @@ _pic = _control lbPicture _index; _craftingArray = []; _craftingArrayNames = []; -// This test is to over come an issue that causes the wrong class selected -// when more than two classes share the same displayName +// weapons and items do not return a class so a workaround is used to find the class if (_data == "") then { - { - _name = configName(_x); - _exit = false; - if !(isNull EPOCH_lastContainer) then { - _arr = ((getItemCargo EPOCH_lastContainer) select 0) + [uniform player,vest player,headgear player]; - _exit = (_name in _arr); + _container = switch (_idc) do { + case 633: { uniformContainer player }; + case 638: { vestContainer player }; + case 632: { EPOCH_targetContainer }; + case 640: { EPOCH_secondaryContainer }; + default { backpackContainer player }; }; - if (_exit) exitWith {_data = _name}; - } forEach ("getText (_x >> 'displayName') == _text" configClasses(configFile >> "CfgWeapons")); + _weaponsAndItems = ((getWeaponCargo _container) select 0); + _weaponsAndItems append ((getItemCargo _container) select 0); + _data = _weaponsAndItems param [_val,""]; }; EPOCH_InteractedItem = [_text,_data,_pic]; diff --git a/Sources/epoch_config/Configs/CfgEpochClient.hpp b/Sources/epoch_config/Configs/CfgEpochClient.hpp index 57d8890f..4ea30f13 100644 --- a/Sources/epoch_config/Configs/CfgEpochClient.hpp +++ b/Sources/epoch_config/Configs/CfgEpochClient.hpp @@ -28,7 +28,7 @@ class CfgEpochClient minJammerDistance = 650; maxBuildingHeight = 33; buildingCountLimit = 200; //overall building limit in range of jammer (overridden if "useGroupCountLimits=1") - storageCountLimit = 100; //overall storage limit in range of jammer (triggers only if "splitCountLimits=1" & "useGroupCountLimits=0") + storageCountLimit = 100; //overall storage limit in range of jammer (triggers only if "splitCountLimits=1" & "useGroupCountLimits=0") splitCountLimits = 0; //1 = distinguish buildingCountLimit from storageCountLimit (ex.: buildingCountLimit=100, storageCountLimit=100 >> you can build 100 baseparts AND additional 100 storage objects like safes, lockboxes...) useGroupCountLimits = 1; //1 = enable leader and member counts (doesn´t affect "splitCountLimits") buildingCountLeader = 125; //ignore if "useGroupCountLimits=0" @@ -55,7 +55,7 @@ class CfgEpochClient Take = "(_this select 1) call EPOCH_interact;_this call EPOCH_UnisexCheck"; Fired = "_this call EPOCH_fnc_playerFired;"; InventoryClosed = "if !(EPOCH_arr_interactedObjs isEqualTo[]) then {[EPOCH_arr_interactedObjs] remoteExec['EPOCH_server_save_vehicles', 2]; EPOCH_arr_interactedObjs = [];};"; - InventoryOpened = "setMousePosition[0.5, 0.5]; call EPOCH_showStats;_this spawn EPOCH_initUI;_container = _this select 1;_lockedNear = false;if (_container isKindOf 'GroundWeaponHolder' || _container isKindOf 'WeaponHolderSimulated') then {{if (locked _x in [2, 3] ||_x getVariable['EPOCH_Locked', false]) exitWith {_lockedNear = true}} forEach (player nearSupplies 10);};if (locked _container in [2, 3] || _container getVariable['EPOCH_Locked', false] || _lockedNear) then {[] spawn {disableSerialization;waitUntil {!isNull findDisplay 602};_display = findDisplay 602;_ctrl_cargo = _display displayCtrl 6401;_ctrl_ground = _display displayCtrl 6321;_ctrl_cargo ctrlEnable false;ctrlSetFocus _ctrl_ground;ctrlActivate _ctrl_ground;};};"; + InventoryOpened = "setMousePosition[0.5, 0.5];call EPOCH_showStats;_this spawn EPOCH_initUI;params ['_unit','_container','_sec'];_containerlocked = (locked _container in [2, 3] || _container getVariable['EPOCH_Locked', false]);_seclocked = false;if !(isNull _sec) then {_seclocked = (locked _sec in [2, 3] || _sec getVariable['EPOCH_Locked', false]);};if (_containerlocked || _seclocked) then {[] spawn {disableSerialization;waitUntil {!isNull findDisplay 602};_d = findDisplay 602;_cargo = _d displayCtrl 6401;_ground = _d displayCtrl 6321;_cargo ctrlEnable false;ctrlSetFocus _ground;ctrlActivate _ground;};};"; Killed = "_this call EPOCH_fnc_playerDeath;"; HandleRating = "EPOCH_playerKarma = EPOCH_playerKarma + (_this select 1);0"; HandleDamage = ""; diff --git a/Sources/epoch_server/compile/epoch_group/EPOCH_server_updatePlayerGroup.sqf b/Sources/epoch_server/compile/epoch_group/EPOCH_server_updatePlayerGroup.sqf index cfb40500..4d50150d 100644 --- a/Sources/epoch_server/compile/epoch_group/EPOCH_server_updatePlayerGroup.sqf +++ b/Sources/epoch_server/compile/epoch_group/EPOCH_server_updatePlayerGroup.sqf @@ -49,7 +49,7 @@ if ((_response select 0) == 1 && (_response select 1) isEqualType []) then { if ((_x getVariable["GROUP",""]) == _groupID) exitWith { _group = group _x; }; - }count playableUnits; + }count allPlayers; if (isNull _group) then { _group = createGroup west; diff --git a/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf b/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf index fa5c7a83..0f788dfb 100644 --- a/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf +++ b/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf @@ -128,7 +128,7 @@ if (_this isEqualType []) then { if ((_x getVariable["GROUP", ""]) == _playerGroup) exitWith{ _group = group _x; }; - } forEach playableUnits; + } forEach allPlayers; }; if (isNull _group) then { diff --git a/Sources/epoch_server/compile/epoch_player/EPOCH_server_revivePlayer.sqf b/Sources/epoch_server/compile/epoch_player/EPOCH_server_revivePlayer.sqf index 87565f55..251c3af9 100644 --- a/Sources/epoch_server/compile/epoch_player/EPOCH_server_revivePlayer.sqf +++ b/Sources/epoch_server/compile/epoch_player/EPOCH_server_revivePlayer.sqf @@ -123,7 +123,7 @@ if (!local _player) then { if ((_x getVariable["GROUP",""]) == _playerGroup) exitWith { _group = group _x; }; - }forEach playableUnits; + }forEach allPlayers; if (isNull _group) then { _group = createGroup west; diff --git a/Sources/epoch_server/init/server_securityfunctions.sqf b/Sources/epoch_server/init/server_securityfunctions.sqf index c24443f3..578ecb3e 100644 --- a/Sources/epoch_server/init/server_securityfunctions.sqf +++ b/Sources/epoch_server/init/server_securityfunctions.sqf @@ -1273,7 +1273,7 @@ _skn_admincode = compileFinal (" getText (configFile >> 'CfgVehicles' >> typeOf _x >> 'Icon'), _x call _getDmgColor, visiblePosition _x, _size, _size, getDir _x, name _x ]; }; - }forEach playableUnits; + }forEach allPlayers; }; if ("+_skn_tg_map_corpse+") then { _size = (1/ctrlMapScale _display) max 20; @@ -1382,7 +1382,7 @@ _skn_admincode = compileFinal (" {(_x call "+_skn_getCtrl+") ctrlShow false}forEach[40,41,42,43,50,51,52,60,61,62,63,64,65,66,67,68,69,70,71] }; if (getPlayerUID player in "+str _skn_blockedSpawnMenuUID+") then {ctrlEnable [21,false]}; ctrlEnable [22,false]; - (1 call "+_skn_getCtrl+") ctrlSetText format['Players %1 of %2',count playableUnits,playersNumber civilian]; + (1 call "+_skn_getCtrl+") ctrlSetText format['Players %1 of %2',count allPlayers,playersNumber civilian]; (2 call "+_skn_getCtrl+") ctrlSetText format['Epoch Mod Admin Menu by Skaronator.com - Server Uptime: %1h %2min', _hours, _minutes]; (5 call "+_skn_getCtrl+") ctrlSetEventHandler ['LBDblClick', '_this call "+_skn_fnc_Spec+"']; (6 call "+_skn_getCtrl+") ctrlSetEventHandler ['LBDblClick', '_this call "+_skn_dbClickMainMenu+"']; @@ -1980,7 +1980,7 @@ _skn_admincode = compileFinal (" lbclear _ctrl; _sorted = []; - _unsorted = playableUnits; + _unsorted = allPlayers; _buttonRange = 10 call "+_skn_getCtrl+"; _buttonRange ctrlSetText 'Range'; diff --git a/Sources/epoch_server/system/server_monitor.fsm b/Sources/epoch_server/system/server_monitor.fsm index 7b547de6..8443b5b7 100644 --- a/Sources/epoch_server/system/server_monitor.fsm +++ b/Sources/epoch_server/system/server_monitor.fsm @@ -351,7 +351,7 @@ class FSM " if (_pUID != """") then { _playersTemp pushBack _pUID; };" \n " };" \n " };" \n - "}forEach playableUnits;" \n + "}forEach allPlayers;" \n "_players = _playersTemp;"/*%FSM*/; }; /*%FSM*/ @@ -460,4 +460,4 @@ class FSM { }; }; -/*%FSM*/ \ No newline at end of file +/*%FSM*/