From e6e302620078ccec0c34c0b8b49cf39841a82616 Mon Sep 17 00:00:00 2001 From: vbawol Date: Fri, 29 Apr 2016 09:54:41 -0500 Subject: [PATCH] sync with 0.3.8.0439 --- Sources/epoch_code/compile/EPOCH_consumeItem.sqf | 4 ++-- Sources/epoch_code/compile/setup/masterLoop/init.sqf | 2 +- .../compile/epoch_bases/EPOCH_server_loadBuildings.sqf | 5 ++--- .../compile/epoch_bases/EPOCH_server_removeBUILD.sqf | 2 +- .../compile/epoch_bases/EPOCH_server_saveBuilding.sqf | 3 +-- .../compile/epoch_bases/EPOCH_server_simToStatic.sqf | 2 +- .../compile/epoch_bases/EPOCH_server_simulSwap.sqf | 4 ++-- .../compile/epoch_bases/EPOCH_server_unsuppported.sqf | 2 +- .../compile/epoch_bases/EPOCH_server_upgradeBUILD.sqf | 4 ++-- 9 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Sources/epoch_code/compile/EPOCH_consumeItem.sqf b/Sources/epoch_code/compile/EPOCH_consumeItem.sqf index ea753850..4c311b04 100644 --- a/Sources/epoch_code/compile/EPOCH_consumeItem.sqf +++ b/Sources/epoch_code/compile/EPOCH_consumeItem.sqf @@ -117,9 +117,9 @@ switch _interactOption do { closeDialog 0; _buildingJammerRange = ["CfgEpochClient", "buildingJammerRange", 75] call EPOCH_fnc_returnConfigEntryV2; _buildingCountLimit = ["CfgEpochClient", "buildingCountLimit", 200] call EPOCH_fnc_returnConfigEntryV2; - + _partCheck = _item in (magazines player); _buildClass = getText(configfile >> "CfgMagazines" >> _item >> "buildClass"); - if (_buildClass != "") then { + if (_buildClass != "" && _partCheck) then { _isStorage = getNumber(configfile >> "CfgMagazines" >> _item >> "isStorage"); _isOk = if (_isStorage == 1 || _buildClass isKindOf "Secure_Storage_Temp") then { EPOCH_StorageSlotsCount > 0 } else { EPOCH_BuildingSlotCount > 0 }; diff --git a/Sources/epoch_code/compile/setup/masterLoop/init.sqf b/Sources/epoch_code/compile/setup/masterLoop/init.sqf index 0d17cb1d..2aa77345 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/init.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/init.sqf @@ -57,7 +57,7 @@ _lootBubble = { _lootDist = 30 + _distanceTraveled; _lootLoc = player getRelPos [_lootDist, (random [-180,0,180])]; _objects = nearestObjects[_lootLoc, _lootClasses, 30]; - _jammer = nearestObjects [_lootLoc, ["PlotPole_EPOCH"], _buildingJammerRange]; + _jammer = nearestObjects [_lootLoc, ["PlotPole_EPOCH","ProtectionZone_Invisible_F"], _buildingJammerRange]; if (!(_objects isEqualTo[]) && (_jammer isEqualTo[])) then { _building = selectRandom _objects; if !(_building in EPOCH_LootedBlds) then { 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 3282fbf7..93f409d2 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf @@ -72,8 +72,7 @@ for "_i" from 0 to _this do { // remove old safes on && !(_class isKindOf 'Constructions_lockedstatic_F') if (isClass (configFile >> "CfgVehicles" >> _class) && (_damage < 1) && !(_class isKindOf 'Constructions_lockedstatic_F')) then { - _baseObj = createVehicle [_class, _location, [], 0, "CAN_COLLIDE"]; - + _baseObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"]; _baseObj setposATL _location; _baseObj setVectorDirAndUp _worldspace; @@ -81,7 +80,7 @@ for "_i" from 0 to _this do { _ammoClass = (configFile >> "CfgVehicles" >> _class >> "ammoClass"); if(isText _ammoClass) then { _ammoClass = getText _ammoClass; - _ammoObj = createVehicle [_ammoClass, _location, [], 0, "CAN_COLLIDE"]; + _ammoObj = createVehicle [_ammoClass, [0,0,0], [], 0, "CAN_COLLIDE"]; _ammoObj setposATL _location; _ammoObj setVectorDirAndUp _worldspace; _baseObj setVariable ["EPOCH_TRAP_OBJ",_ammoObj]; diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_removeBUILD.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_removeBUILD.sqf index 4654af0e..3f69e399 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_removeBUILD.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_removeBUILD.sqf @@ -41,7 +41,7 @@ if (_vehSlot != -1 || _storageSlot != "ABORT" || _isTemporary == 1) then{ _gwh = _nearbyWH select 0; // _posWH = getPosATL _gwh; } else { - _gwh = createVehicle["groundWeaponHolder", _posWH, [], 0, "CAN_COLLIDE"]; + _gwh = createVehicle["groundWeaponHolder", [0,0,0], [], 0, "CAN_COLLIDE"]; _gwh setPosATL _posWH; }; 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 84e1f42f..01053d6d 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf @@ -41,8 +41,7 @@ if (isText _config) then { _vectorDirAndUp = [vectordir _vehicle, vectorup _vehicle]; deleteVehicle _vehicle; - _storageObj = createVehicle[_staticClass, _vehiclePos, [], 0, "CAN_COLLIDE"]; - + _storageObj = createVehicle[_staticClass, [0,0,0], [], 0, "CAN_COLLIDE"]; _storageObj setposATL _vehiclePos; _storageObj setVectorDirAndUp _vectorDirAndUp; 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 178be625..76dd0e00 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simToStatic.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simToStatic.sqf @@ -25,7 +25,7 @@ _entities = allMissionObjects "Constructions_modular_F"; if (_objSlot != -1) then { _worldspace = [_currentPosition,(vectordir _x),(vectorup _x)]; deleteVehicle _x; - _newObj = createVehicle [_class, (_worldspace select 0), [], 0, "CAN_COLLIDE"]; + _newObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"]; _newObj setVariable ["BUILD_SLOT",_objSlot,true]; _newObj call EPOCH_server_buildingInit; 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 8d72ebc3..7aad4355 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simulSwap.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simulSwap.sqf @@ -36,7 +36,7 @@ if (_objSlot != -1) then { _worldspace = [getposATL _object,vectordir _object,vectorup _object]; deleteVehicle _object; - _newObj = createVehicle [_class, _worldspace select 0, [], 0, "CAN_COLLIDE"]; + _newObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"]; _newObj setVariable ["BUILD_SLOT",_objSlot,true]; _newObj call EPOCH_server_buildingInit; @@ -53,7 +53,7 @@ if (_objSlot != -1) then { _ammoClass = (configFile >> "CfgVehicles" >> _class >> "ammoClass"); if (isText _ammoClass) then { _ammoClass = getText _ammoClass; - _ammoObj = createVehicle [_ammoClass, _worldspace select 0, [], 0, "CAN_COLLIDE"]; + _ammoObj = createVehicle [_ammoClass, [0,0,0], [], 0, "CAN_COLLIDE"]; _ammoObj setposATL (_worldspace select 0); _ammoObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)]; _newObj setVariable ["EPOCH_TRAP_OBJ",_ammoObj]; 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 61478a42..46ea0a35 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_unsuppported.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_unsuppported.sqf @@ -43,7 +43,7 @@ _stableCount = 0; _playerUID = _x getVariable["BUILD_OWNER", "-1"]; _slot = _x getVariable["EPOCH_secureStorage", "-1"]; deleteVehicle _x; - _newObj = createVehicle[_class, _objectPos, [], 0, "CAN_COLLIDE"]; + _newObj = createVehicle[_class, [0,0,0], [], 0, "CAN_COLLIDE"]; _newObj setVariable["BUILD_SLOT", _objSlot, true]; _newObj setposASL _objectPos; _newObj setVectorDirAndUp[_vDir, _vUP]; 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 10b023f9..6c2b37fc 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_upgradeBUILD.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_upgradeBUILD.sqf @@ -33,7 +33,7 @@ if (_objSlot != -1) then { deleteVehicle _object; _class = _upgrade select 0; - _newObj = createVehicle [_class, _objectPos, [], 0, "CAN_COLLIDE"]; + _newObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"]; _newObj setVariable ["BUILD_SLOT",_objSlot,true]; _newObj call EPOCH_server_buildingInit; _newObj setposATL _objectPos; @@ -55,7 +55,7 @@ if (_objSlot != -1) then { deleteVehicle _object; _class = _upgrade select 0; - _newObj = createVehicle[_class, (_worldspace select 0), [], 0, "CAN_COLLIDE"]; + _newObj = createVehicle[_class, [0,0,0], [], 0, "CAN_COLLIDE"]; _newObj setposATL(_worldspace select 0); _newObj setVectorDirAndUp[(_worldspace select 1), (_worldspace select 2)]; };