From d1793b239cba5e6595e8f7d3d6e851f75e22cc7d Mon Sep 17 00:00:00 2001 From: He-Man Date: Sat, 5 May 2018 18:05:20 +0200 Subject: [PATCH] Removed unused Building Vars --- .../EPOCH_server_loadBuildings.sqf | 24 +++++++++---------- .../epoch_vehicle/EPOCH_load_storage.sqf | 3 +-- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf index 946fa8a8..4cdc4f55 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf @@ -143,8 +143,18 @@ for "_i" from 0 to _this do { }; // Handle Jammers and create marker if EPOCH_SHOW_JAMMERS set true. - if (_class isKindOf "PlotPole_EPOCH") then { - if (EPOCH_SHOW_JAMMERS) then { + if (_class in ["PlotPole_EPOCH","BaseCam_EPOCH"]) then { + if (_owner != "-1") then { + _baseObj setVariable ["BUILD_OWNER", _owner, true]; + }; + + // add BaseCam to public array + if (_class isequalto "BaseCam_EPOCH") then { + EPOCH_BaseCams pushBackUnique _baseObj; + // Set PubVar later after all Cams are loaded in + }; + + if (_class isequalto "PlotPole_EPOCH" && EPOCH_SHOW_JAMMERS) then { _marker = createMarker [str(_location), _location]; _marker setMarkerShape "ICON"; // TODO allow players to change this per base @@ -160,16 +170,6 @@ for "_i" from 0 to _this do { }; _baseObj setVariable ["BUILD_SLOT", _i, true]; - if (_owner != "-1") then { - _baseObj setVariable ["BUILD_OWNER", _owner, true]; - }; - - // add BaseCam to public array - if (_class isequalto "BaseCam_EPOCH") then { - EPOCH_BaseCams pushBackUnique _baseObj; - // Set PubVar later after all Cams are loaded in - }; - if (_textureSlot != 0) then { // get texture path from index _color = getArray (_cfgBaseBuilding >> _class >> "availableTextures"); diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_storage.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_storage.sqf index 64c6061d..1bf132a6 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_storage.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_storage.sqf @@ -134,13 +134,12 @@ for "_i" from 1 to _maxStorageLimit do { }; if (count _arr >= 6) then { - _vehicle setVariable ["STORAGE_OWNERS", _arr select 5]; if (_class isKindOf 'Constructions_lockedstatic_F') then{ // set locked state of secure storage if ((_arr select 6) != -1) then { _vehicle setVariable["EPOCH_Locked", true, true]; - //_vehicle enableSimulationGlobal false; }; + _vehicle setVariable ["STORAGE_OWNERS", _arr select 5]; }; };