diff --git a/Changelogs/0.3.6.0.txt b/Changelogs/0.3.6.0.txt index 2fa1bc78..d6957dd6 100644 --- a/Changelogs/0.3.6.0.txt +++ b/Changelogs/0.3.6.0.txt @@ -2,6 +2,7 @@ [Fixed] Updated Hitpoints to 1.54 for all custom Epoch characters, this fixes the hitpoint .rpt errors since 1.54 as well. [Fixed] Reduce run speed of Sappers since 1.54 update. +[Fixed] Wood tower "add/remove wall" options are now only available when build mode is enabled. **Server** [Fixed] Typo in server side AH event handler code and repacked a3_server_settings.pbo. diff --git a/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo b/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo index 62d51770..a6e50101 100644 Binary files a/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo and b/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo differ diff --git a/Sources/epoch_config/Configs/CfgVehicles.hpp b/Sources/epoch_config/Configs/CfgVehicles.hpp index d52647e4..0554b359 100644 --- a/Sources/epoch_config/Configs/CfgVehicles.hpp +++ b/Sources/epoch_config/Configs/CfgVehicles.hpp @@ -3799,14 +3799,14 @@ class CfgVehicles onlyforplayer = 1; position = "NWall_trigger"; radius = 2.5; - condition = "!(call EPOCH_lockCheck) && (this animationPhase ""NWall"" < 0.5)"; + condition = "!(EPOCH_buildMode > 0) && !(call EPOCH_lockCheck) && (this animationPhase ""NWall"" < 0.5)"; statement = "[this,""NWall"",1] call EPOCH_changeWallState"; }; class remove_nwall : add_nwall { displayName = "Remove Wall"; position = "NWall_trigger"; - condition = "!(call EPOCH_lockCheck) && (this animationPhase ""NWall"" >= 0.5)"; + condition = "(EPOCH_buildMode > 0) && !(call EPOCH_lockCheck) && (this animationPhase ""NWall"" >= 0.5)"; statement = "[this,""NWall"",0] call EPOCH_changeWallState"; }; @@ -3814,14 +3814,14 @@ class CfgVehicles { displayName = "Add Wall"; position = "EWall_trigger"; - condition = "!(call EPOCH_lockCheck) && (this animationPhase ""EWall"" < 0.5)"; + condition = "(EPOCH_buildMode > 0) && !(call EPOCH_lockCheck) && (this animationPhase ""EWall"" < 0.5)"; statement = "[this,""EWall"",1] call EPOCH_changeWallState"; }; class remove_ewall : add_nwall { displayName = "Remove Wall"; position = "EWall_trigger"; - condition = "!(call EPOCH_lockCheck) && (this animationPhase ""EWall"" >= 0.5)"; + condition = "(EPOCH_buildMode > 0) && !(call EPOCH_lockCheck) && (this animationPhase ""EWall"" >= 0.5)"; statement = "[this,""EWall"",0] call EPOCH_changeWallState"; }; @@ -3829,14 +3829,14 @@ class CfgVehicles { displayName = "Add Wall"; position = "SWall_trigger"; - condition = "!(call EPOCH_lockCheck) && (this animationPhase ""SWall"" < 0.5)"; + condition = "(EPOCH_buildMode > 0) && !(call EPOCH_lockCheck) && (this animationPhase ""SWall"" < 0.5)"; statement = "[this,""SWall"",1] call EPOCH_changeWallState"; }; class remove_swall : add_nwall { displayName = "Remove Wall"; position = "SWall_trigger"; - condition = "!(call EPOCH_lockCheck) && (this animationPhase ""SWall"" >= 0.5)"; + condition = "(EPOCH_buildMode > 0) && !(call EPOCH_lockCheck) && (this animationPhase ""SWall"" >= 0.5)"; statement = "[this,""SWall"",0] call EPOCH_changeWallState"; }; @@ -3844,14 +3844,14 @@ class CfgVehicles { displayName = "Add Wall"; position = "WWall_trigger"; - condition = "!(call EPOCH_lockCheck) && (this animationPhase ""WWall"" < 0.5)"; + condition = "(EPOCH_buildMode > 0) && !(call EPOCH_lockCheck) && (this animationPhase ""WWall"" < 0.5)"; statement = "[this,""WWall"",1] call EPOCH_changeWallState"; }; class remove_wwall : add_nwall { displayName = "Remove Wall"; position = "WWall_trigger"; - condition = "!(call EPOCH_lockCheck) && (this animationPhase ""WWall"" >= 0.5)"; + condition = "(EPOCH_buildMode > 0) && !(call EPOCH_lockCheck) && (this animationPhase ""WWall"" >= 0.5)"; statement = "[this,""WWall"",0] call EPOCH_changeWallState"; }; }; 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 5bc16e70..eb44fa65 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf @@ -18,6 +18,8 @@ _config = 'CfgEpochClient' call EPOCH_returnConfig; _buildingJammerRange = getNumber(_config >> "buildingJammerRange"); if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; }; +_VAL = ["", [], "", "", 0, []]; + for "_i" from 0 to _this do { _vehHiveKey = format ["%1:%2", (call EPOCH_fn_InstanceID),_i]; _response = ["Building", _vehHiveKey] call EPOCH_fnc_server_hiveGETTTL; @@ -26,6 +28,11 @@ for "_i" from 0 to _this do { _arr = _response select 1; _ttl = _response select 2; + // DEBUG to see if this command works + if !(_arr isEqualTypeParams _VAL) then { + diag_log format["DEBUG: Data does not match schema: %1 vs %2",_arr,_VAL]; + }; + _arrCount = count _arr; _class = _arr select 0; @@ -80,8 +87,14 @@ for "_i" from 0 to _this do { }; // set persistent Animations - if (_arrCount >= 6) then{ - _anims = _arr param[5, [], [[]]]; + if (_arrCount >= 6) then { + _anims = []; + _animsData = _arr select 5; + // check that we have an array to prevent any errors + if (_animsData isEqualType _anims) then { + _anims = _animsData; + }; + { _baseObj animate [_x, _anims param [_forEachIndex,0], true] } foreach(getArray(configFile >> "CfgVehicles" >> _class >> "persistAnimations"));