diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server.pbo index 7b98c037..8dda742b 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server.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 8dfbd307..dce2c6d7 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/@epochhive/addons/epoch_server_settings.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo index 582c233f..b3081450 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Altis.pbo b/Server_Install_Pack/mpmissions/epoch.Altis.pbo index 61d80901..30e59737 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 058bfcaa..37ac5979 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 66361b6c..1c261562 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 a31d44b0..c06d8efe 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 58477471..3523cf72 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 f7c997c6..7cf03273 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 0630fc99..95733b5b 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 ee36814e..ca52b330 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 670646a7..e24211a4 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.Napf.pbo b/Server_Install_Pack/mpmissions/epoch.Napf.pbo index ba99cb70..292ffec2 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.Porto.pbo b/Server_Install_Pack/mpmissions/epoch.Porto.pbo index 9e26b2f8..ecd8847f 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 e52ffda5..a0b91787 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 eb8a739a..94fb3df9 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 03a912d5..39d7f88b 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 4741077f..62e3e5b8 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 fe416660..f1f7c241 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 2adcfdad..695fedc7 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 8a94e659..a3a032e4 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.Tanoa.pbo b/Server_Install_Pack/mpmissions/epoch.Tanoa.pbo index 7a6939ee..1fa98f33 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Tanoa.pbo and b/Server_Install_Pack/mpmissions/epoch.Tanoa.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.VR.pbo b/Server_Install_Pack/mpmissions/epoch.VR.pbo index ad56f1d3..0f4fb7ec 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 39f63d9e..5cecfdef 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 05e3fb80..ad3cd0a9 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 ec3836cd..2ddb6cbf 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_config/Configs/CfgEpochClient/WorldInteractions.hpp b/Sources/epoch_config/Configs/CfgEpochClient/WorldInteractions.hpp index 1765414a..5611fc90 100644 --- a/Sources/epoch_config/Configs/CfgEpochClient/WorldInteractions.hpp +++ b/Sources/epoch_config/Configs/CfgEpochClient/WorldInteractions.hpp @@ -33,7 +33,7 @@ class CfgWorldInteractions { wreck = 1; }; - + class barrelwater_f_p3d : Water {}; class water_source_f_p3d : Water {}; class waterbarrel_f_p3d : Water {}; diff --git a/Sources/epoch_config/build.hpp b/Sources/epoch_config/build.hpp index 2eb4eb78..134963bd 100644 --- a/Sources/epoch_config/build.hpp +++ b/Sources/epoch_config/build.hpp @@ -1 +1 @@ -build=544; +build=545; diff --git a/Sources/epoch_server/build.hpp b/Sources/epoch_server/build.hpp index 2eb4eb78..134963bd 100644 --- a/Sources/epoch_server/build.hpp +++ b/Sources/epoch_server/build.hpp @@ -1 +1 @@ -build=544; +build=545; diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf index cb9e9cbb..808f1af9 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf @@ -37,12 +37,8 @@ if (isText _staticClassConfig) then { // Secure and insecure storage _vehiclePos = getposATL _vehicle; - _vectorDirAndUp = [vectordir _vehicle, vectorup _vehicle]; - deleteVehicle _vehicle; - _storageObj = createVehicle[_staticClass, [0,0,0], [], 0, "CAN_COLLIDE"]; - _storageObj setVectorDirAndUp _vectorDirAndUp; - _storageObj setposATL _vehiclePos; + _storageObj = [_staticClass,_vehicle] call EPOCH_swapBuilding; if (getNumber(_cfgBaseBuilding >> _staticClass >> "isSecureStorage") == 1) then{ _storageObj setVariable["EPOCH_Locked", false, true]; diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simToStatic.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simToStatic.sqf index cca5c212..b9cd636d 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simToStatic.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simToStatic.sqf @@ -12,7 +12,7 @@ Github: https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simToStatic.sqf */ -private ["_worldspace","_newObj","_class","_objSlot","_cfgBaseBuilding","_lastPosition","_currentPosition","_entities"]; +private ["_newObj","_class","_objSlot","_cfgBaseBuilding","_lastPosition","_currentPosition","_entities"]; _entities = allMissionObjects "Constructions_modular_F"; { _lastPosition = _x getVariable["LAST_POS", []]; @@ -24,14 +24,9 @@ _entities = allMissionObjects "Constructions_modular_F"; _class = getText(_staticClassConfig); _objSlot = _x getVariable["BUILD_SLOT", -1]; if (_objSlot != -1) then { - _worldspace = [_currentPosition,(vectordir _x),(vectorup _x)]; - deleteVehicle _x; - _newObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"]; + _newObj = [_class,_x] call EPOCH_swapBuilding; _newObj setVariable ["BUILD_SLOT",_objSlot,true]; _newObj call EPOCH_server_buildingInit; - _newObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)]; - _newObj setposATL (_worldspace select 0); - }; }; }; diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simulSwap.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simulSwap.sqf index d30948b8..06f5c804 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simulSwap.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simulSwap.sqf @@ -12,7 +12,7 @@ Github: https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simulSwap.sqf */ -private["_classConfig","_cfgClass", "_worldspace", "_newObj", "_return", "_class", "_oemType", "_cfgBaseBuilding", "_object", "_objSlot", "_damage", "_color", "_textureSlot"]; +private["_classConfig","_cfgClass", "_newObj", "_return", "_class", "_oemType", "_cfgBaseBuilding", "_object", "_objSlot", "_damage", "_color", "_textureSlot"]; params [["_object",objNull,[objNull]],["_static",false,[false]]]; _return = _object; _objSlot = _object getVariable ["BUILD_SLOT", -1]; @@ -33,10 +33,10 @@ if (_objSlot != -1) then { _textureSlot = _object getVariable["TEXTURE_SLOT", 0]; _damage = damage _object; - _worldspace = [getposATL _object,vectordir _object,vectorup _object]; - deleteVehicle _object; + //_worldspace = [getposATL _object,vectordir _object,vectorup _object]; + //_newObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"]; + _newObj = [_class,_object] call EPOCH_swapBuilding; - _newObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"]; _newObj setVariable ["BUILD_SLOT",_objSlot,true]; _newObj call EPOCH_server_buildingInit; @@ -54,12 +54,12 @@ if (_objSlot != -1) then { if (isText _ammoClass) then { _ammoClass = getText _ammoClass; _ammoObj = createVehicle [_ammoClass, [0,0,0], [], 0, "CAN_COLLIDE"]; - _ammoObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)]; - _ammoObj setposATL (_worldspace select 0); + //_ammoObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)]; + //_ammoObj setposATL (_worldspace select 0); + _ammoObj attachTo [_newObj,[0,0,0]]; _newObj setVariable ["EPOCH_TRAP_OBJ",_ammoObj]; }; - _newObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)]; - _newObj setposATL (_worldspace select 0); + _newObj setDamage _damage; _return = _newObj; }; diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_unsuppported.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_unsuppported.sqf index 31883022..6edbd6f3 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_unsuppported.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_unsuppported.sqf @@ -38,15 +38,11 @@ _stableCount = 0; _class = getText(_simulClassConfig); _objSlot = _x getVariable["BUILD_SLOT", -1]; if (_objSlot != -1) then { - _vDir = vectordir _x; - _vUP = vectorup _x; _playerUID = _x getVariable["BUILD_OWNER", "-1"]; _slot = _x getVariable["EPOCH_secureStorage", "-1"]; - deleteVehicle _x; - _newObj = createVehicle[_class, [0,0,0], [], 0, "CAN_COLLIDE"]; + // _newObj = createVehicle[_class, [0,0,0], [], 0, "CAN_COLLIDE"]; + _newObj = [_class,_x] call EPOCH_swapBuilding; _newObj setVariable["BUILD_SLOT", _objSlot, true]; - _newObj setVectorDirAndUp[_vDir, _vUP]; - _newObj setposASL _objectPos; _newObj setVariable["BUILD_OWNER", _playerUID, true]; _newObj setVariable["EPOCH_secureStorage", _slot]; _newObj setVelocity[0, 0, -1]; diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_upgradeBUILD.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_upgradeBUILD.sqf index 681e99a8..dfbf07f3 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_upgradeBUILD.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_upgradeBUILD.sqf @@ -24,15 +24,11 @@ if (_objSlot != -1) then { _upgrades = getArray(_cfgBaseBuilding >> (typeOf _object) >> "upgradeBuilding"); if !(_upgrades isEqualTo []) then { _upgrade = _upgrades param [_index,[]]; - _objectPos = getposATL _object; - _worldspace = [(_objectPos call EPOCH_precisionPos), vectordir _object, vectorup _object]; - deleteVehicle _object; _class = _upgrade select 0; - _newObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"]; + + _newObj = [_class,_object] call EPOCH_swapBuilding; _newObj setVariable ["BUILD_SLOT",_objSlot,true]; _newObj call EPOCH_server_buildingInit; - _newObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)]; - _newObj setposATL _objectPos; _newObj call EPOCH_saveBuilding; }; } else { @@ -41,12 +37,8 @@ if (_objSlot != -1) then { _upgrades = getArray(_cfgBaseBuilding >> (typeOf _object) >> "upgradeBuilding"); if !(_upgrades isEqualTo []) then { _upgrade = _upgrades param [_index,[]]; - _worldspace = [getposATL _object, vectordir _object, vectorup _object]; - deleteVehicle _object; _class = _upgrade select 0; - _newObj = createVehicle[_class, [0,0,0], [], 0, "CAN_COLLIDE"]; - _newObj setVectorDirAndUp[(_worldspace select 1), (_worldspace select 2)]; - _newObj setposATL(_worldspace select 0); + _newObj = [_class,_object] call EPOCH_swapBuilding; }; }; }; diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_swapBuilding.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_swapBuilding.sqf new file mode 100644 index 00000000..744f79e6 --- /dev/null +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_swapBuilding.sqf @@ -0,0 +1,24 @@ +// _newObj = [_class,_object] call EPOCH_swapBuilding; +private ["_objectPos","_newObj"]; +params [["_class",""],["_object",objNull],["_method",0]]; +_newObj = objNull; +if (!isNull _object && !(_class isEqualTo "")) then { + _objectPos = getPosWorld _object; + _newObj = createVehicle [_class, ASLtoAGL _objectPos, [], 0, "CAN_COLLIDE"]; + if (!isNull _newObj) then { + _object hideObjectGlobal true; + + switch (_method) do { + case 0: { + _newObj setVectorDirAndUp [vectordir _object, vectorup _object]; + _newObj setPosWorld _objectPos; + }; + case 1: { + _newObj attachTo [_object,[0,0,0]]; + }; + }; + + deleteVehicle _object; + }; +}; +_newObj diff --git a/Sources/epoch_server/config.cpp b/Sources/epoch_server/config.cpp index 110e2aac..acc0a46f 100644 --- a/Sources/epoch_server/config.cpp +++ b/Sources/epoch_server/config.cpp @@ -47,6 +47,7 @@ class CfgServerFunctions class server_invitePlayer {}; }; class epoch_bases { + class swapBuilding {}; class saveBuilding {}; class server_loadBuildings {}; class server_saveBuilding {}; diff --git a/Sources/epoch_server/treeView.txt b/Sources/epoch_server/treeView.txt index 9f85c3ef..40dc3888 100644 Binary files a/Sources/epoch_server/treeView.txt and b/Sources/epoch_server/treeView.txt differ diff --git a/Sources/epoch_server_core/build.hpp b/Sources/epoch_server_core/build.hpp index 2eb4eb78..134963bd 100644 --- a/Sources/epoch_server_core/build.hpp +++ b/Sources/epoch_server_core/build.hpp @@ -1 +1 @@ -build=544; +build=545; diff --git a/Sources/epoch_server_settings/build.hpp b/Sources/epoch_server_settings/build.hpp index 2eb4eb78..134963bd 100644 --- a/Sources/epoch_server_settings/build.hpp +++ b/Sources/epoch_server_settings/build.hpp @@ -1 +1 @@ -build=544; +build=545; diff --git a/build.txt b/build.txt index aae9761c..5853b977 100644 --- a/build.txt +++ b/build.txt @@ -1 +1 @@ -544 +545