diff --git a/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo b/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo index 3855dcc3..33ac1a5b 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/Server_Install_Pack/@epochhive/addons/a3_epoch_server_settings.pbo b/Server_Install_Pack/@epochhive/addons/a3_epoch_server_settings.pbo index 0a94f074..7743c0aa 100644 Binary files a/Server_Install_Pack/@epochhive/addons/a3_epoch_server_settings.pbo and b/Server_Install_Pack/@epochhive/addons/a3_epoch_server_settings.pbo differ diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo index c2bcb52c..628837be 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo differ diff --git a/Server_Install_Pack/MPMissions/epoch.Napf.pbo b/Server_Install_Pack/MPMissions/epoch.Napf.pbo index 4051f474..7952b9ec 100644 Binary files a/Server_Install_Pack/MPMissions/epoch.Napf.pbo and b/Server_Install_Pack/MPMissions/epoch.Napf.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Altis.pbo b/Server_Install_Pack/mpmissions/epoch.Altis.pbo index af5ef41f..8f9e8082 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Altis.pbo and b/Server_Install_Pack/mpmissions/epoch.Altis.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Australia.pbo b/Server_Install_Pack/mpmissions/epoch.Australia.pbo index 9b715cd6..f2143cce 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Australia.pbo and b/Server_Install_Pack/mpmissions/epoch.Australia.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo b/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo index 9dbc423d..2da8667b 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo and b/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo b/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo index 4c50a32f..bf9a58bc 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo and b/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo b/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo index 5c69c3d6..09654d18 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo and b/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo b/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo index 2f9b9b3a..e7de23c4 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo and b/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo b/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo index 14b1dcef..589eff8a 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo and b/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Esseker.pbo b/Server_Install_Pack/mpmissions/epoch.Esseker.pbo index 1685dd82..560246bb 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Esseker.pbo and b/Server_Install_Pack/mpmissions/epoch.Esseker.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo b/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo index e27b1f3d..4d4ac472 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo and b/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Porto.pbo b/Server_Install_Pack/mpmissions/epoch.Porto.pbo index 371dd862..2687ed0e 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Porto.pbo and b/Server_Install_Pack/mpmissions/epoch.Porto.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo b/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo index d3b2368c..2bace8c3 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo and b/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Sara.pbo b/Server_Install_Pack/mpmissions/epoch.Sara.pbo index 086a09df..ab1b3ce6 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Sara.pbo and b/Server_Install_Pack/mpmissions/epoch.Sara.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo b/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo index 127ae1b7..e4e8e63f 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo and b/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo b/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo index 0e4f18e1..259e5f27 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo and b/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo b/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo index 09a2a462..a9ac6d44 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo and b/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Stratis.pbo b/Server_Install_Pack/mpmissions/epoch.Stratis.pbo index 0b42750e..379d9f2a 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Stratis.pbo and b/Server_Install_Pack/mpmissions/epoch.Stratis.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Takistan.pbo b/Server_Install_Pack/mpmissions/epoch.Takistan.pbo index 19fcf5b9..055c526a 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Takistan.pbo and b/Server_Install_Pack/mpmissions/epoch.Takistan.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.VR.pbo b/Server_Install_Pack/mpmissions/epoch.VR.pbo index d99f4b5e..799690ba 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.VR.pbo and b/Server_Install_Pack/mpmissions/epoch.VR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo b/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo index 02b005aa..edb6fac2 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo and b/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo b/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo index d2a0a0f8..6c7b62b7 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo and b/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.utes.pbo b/Server_Install_Pack/mpmissions/epoch.utes.pbo index d21ee146..76994349 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.utes.pbo and b/Server_Install_Pack/mpmissions/epoch.utes.pbo differ diff --git a/Sources/epoch_code/compile/building/EPOCH_isBuildAllowed.sqf b/Sources/epoch_code/compile/building/EPOCH_isBuildAllowed.sqf index 65c251cf..1ea89712 100644 --- a/Sources/epoch_code/compile/building/EPOCH_isBuildAllowed.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_isBuildAllowed.sqf @@ -40,6 +40,11 @@ if (_buildingCountLimit == 0) then { _buildingCountLimit = 200; }; // input params ["_objType"]; +_obj = objNull; +if (_objType isEqualType objNull) then { + _obj = _objType; + _objType = typeOf _objType; +}; _staticClass = getText(configfile >> "CfgVehicles" >> _objType >> "staticClass"); _simulClass = getText(configfile >> "CfgVehicles" >> _objType >> "simulClass"); @@ -83,9 +88,12 @@ if !(_buildingAllowed)exitWith{ false }; // Max object if (!_ownedJammerExists) then{ _limitNearby = getNumber(configfile >> "CfgVehicles" >> _staticClass >> "limitNearby"); + if (_limitNearby > 0) then{ - _objectCount = count nearestObjects[player, [_staticClass, _simulClass], _buildingJammerRange]; - if (_objectCount > _limitNearby) then{ + // remove current target from objects + _objectCount = count (nearestObjects[player, [_staticClass, _simulClass], _buildingJammerRange] - [_obj]); + // TODO: not properly limiting simulated objects + if (_objectCount >= _limitNearby) then{ _buildingAllowed = false; [format["Building Disallowed: Limit %1", _limitNearby], 5] call Epoch_dynamicText; }; diff --git a/Sources/epoch_code/compile/building/EPOCH_simulSwap.sqf b/Sources/epoch_code/compile/building/EPOCH_simulSwap.sqf index 6e4d4cdf..ad7c2177 100644 --- a/Sources/epoch_code/compile/building/EPOCH_simulSwap.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_simulSwap.sqf @@ -93,10 +93,15 @@ if (isText(_config)) then { _rejectMove = false; if ((diag_tickTime - _lastCheckTime) > 10) then { _lastCheckTime = diag_tickTime; - _rejectMove = !(_objType call EPOCH_isBuildAllowed); + _rejectMove = !(EPOCH_target call EPOCH_isBuildAllowed); }; if (_rejectMove) exitWith{ - EPOCH_target = objNull; + // remove object and refund items + deleteVehicle EPOCH_target; + _removeParts = getArray(('CfgBaseBuilding' call EPOCH_returnConfig) >> _objType >> "removeParts"); + { + [_x select 0,_x select 1] call EPOCH_fnc_addItemOverflow; + } forEach _removeParts; }; _playerdistance = player distance EPOCH_target; if (_playerdistance < 10) then { diff --git a/Sources/epoch_config/build.hpp b/Sources/epoch_config/build.hpp index b9206d8e..557a4034 100644 --- a/Sources/epoch_config/build.hpp +++ b/Sources/epoch_config/build.hpp @@ -1 +1 @@ -build=435; +build=436; diff --git a/Sources/epoch_server/build.hpp b/Sources/epoch_server/build.hpp index b9206d8e..557a4034 100644 --- a/Sources/epoch_server/build.hpp +++ b/Sources/epoch_server/build.hpp @@ -1 +1 @@ -build=435; +build=436; diff --git a/Sources/epoch_server_core/build.hpp b/Sources/epoch_server_core/build.hpp index b9206d8e..557a4034 100644 --- a/Sources/epoch_server_core/build.hpp +++ b/Sources/epoch_server_core/build.hpp @@ -1 +1 @@ -build=435; +build=436; diff --git a/Sources/epoch_server_settings/build.hpp b/Sources/epoch_server_settings/build.hpp index b9206d8e..557a4034 100644 --- a/Sources/epoch_server_settings/build.hpp +++ b/Sources/epoch_server_settings/build.hpp @@ -1 +1 @@ -build=435; +build=436; diff --git a/build.txt b/build.txt index 2af1e534..aa2f78d4 100644 --- a/build.txt +++ b/build.txt @@ -1 +1 @@ -435 +436