From 88c02d72b0c765adb954831d01796508163865d3 Mon Sep 17 00:00:00 2001 From: vbawol Date: Sun, 18 Oct 2015 18:20:20 -0500 Subject: [PATCH] fix save issue after first placement --- .../@epochhive/addons/a3_epoch_server.pbo | Bin 361171 -> 360988 bytes .../epoch_bases/EPOCH_server_saveBuilding.sqf | 13 +++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo b/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo index dcf3376b2557635d6b40be92d92a08bbba749b5d..dade8007763da1d61bb773dce15a75936905bf4c 100644 GIT binary patch delta 400 zcmV;B0dM}(g%+HI7O)2c20ADtR#Fg?;R7SHFarn;20SPvR%{)UVG{PGy)~FTwQMglh9s%ZBVQg$5MNm&eNMB23c~x*HmvIOKD7T>#1HNRpV0Z&8 z2e*xX1LG67agzg`47U)V17QxA(60jtw|uSxtsu89&jX4Wm%HZ!g|`st0|)}Q8|wp9 z0k?4M18)+SdszetmzswG3%C3J1Me!AlobLIwkiY+5SLp%1Q?gw)B_NgDnJArm#;Jg z2$xwp1a_BUJp^NyGdl#;mtj2w6}KKd1V90oRyhQumjylq_m^;E1PPa4IRu-R1wI6B uw-G=D)daWaLIYz*Og_$QyVe@nm zRz}t|xiGsUn-_|%c4g$;>=XTzkx^l@VeAY>R!$I@d@`<$iIa1)e|!q#=C28p8K+sW zuq^IKVq^iyHg_bqcO)}z??`6)>d0u%S$g~1dgc?tK*6n(ndkBV&D|cffH{$mNkL)z=5@^56d-nP&pglECBY0dfBNU= z%&pwW?m+cjoTYuF^2$y zVEdKV%=tnbKoKyQuE@qDGF|f`qrmp`f6Vu_xWS@en>i<6+%Gjf!HPw2d$}gd8-7O4 z>4}Ui64R?KSylnPz1D&yd3uKx%T=J6vDPf1j9^=Q?O22urysFp=>&2Wwgb7(S%C^n uTv!a0fg!7)(4LacvOOi8b%~V7qRRsNpDbGAHkIX{_OsZ%-}#M>tpEV7*_3nu 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 bbd191cb..d3ecef02 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf @@ -20,7 +20,7 @@ _oemType = typeOf _vehicle; _config = (configFile >> "CfgVehicles" >> _oemType >> "staticClass"); if (isText _config) then { - + _staticClass = getText(_config); if (_staticClass isKindOf "Buildable_Storage" || _staticClass isKindOf "Constructions_lockedstatic_F") then{ @@ -34,7 +34,7 @@ if (isText _config) then { // Secure storage if (getNumber(configFile >> "CfgVehicles" >> _staticClass >> "isSecureStorage") == 1) then{ - // remove sim + // remove sim _vehiclePos = getposATL _vehicle; _vectorDirAndUp = [vectordir _vehicle, vectorup _vehicle]; deleteVehicle _vehicle; @@ -45,10 +45,10 @@ if (isText _config) then { _newVehicle setposATL _vehiclePos; if (!isNull _newVehicle) then{ - + _buildClass = getText(configFile >> "CfgVehicles" >> _staticClass >> "weaponHolderProxy"); if (_buildClass != "") then{ - + // TODO need some sanity checks here _storageObj = createVehicle[_buildClass, _vehiclePos, [], 0.0, "CAN_COLLIDE"]; _storageObj setVectorDirAndUp _vectorDirAndUp; @@ -56,6 +56,7 @@ if (isText _config) then { // set reference to storage object on dummy object _newVehicle setVariable["EPOCH_secStorParent", _storageObj]; + _storageObj setVariable["EPOCH_secStorChild",_newVehicle]; _storageObj setVariable["EPOCH_Locked", false, true]; _storageObj setVariable["STORAGE_OWNERS", [_plyrUID]]; @@ -68,7 +69,7 @@ if (isText _config) then { }; }; - + // insecure storage } else { @@ -76,7 +77,7 @@ if (isText _config) then { _vectorDirAndUp = [vectordir _vehicle, vectorup _vehicle]; deleteVehicle _vehicle; - _storageObj = createVehicle[_staticClass, _vehiclePos, [], 0, "CAN_COLLIDE"]; + _storageObj = createVehicle[_staticClass, _vehiclePos, [], 0, "CAN_COLLIDE"]; _storageObj setVectorDirAndUp _vectorDirAndUp; _storageObj setposATL _vehiclePos;