From 55199a920b2da74adf364d92d7923433f6fb2012 Mon Sep 17 00:00:00 2001 From: ARMAzac Date: Mon, 10 Jul 2017 23:37:42 +1000 Subject: [PATCH] more bugs --- .../Overthrow.Malden/data/objectives.sqf | 2 +- .../missions/Overthrow.Malden/mission.sqm | 16 +++++++-------- .../warehouse/fn_findHelmetInWarehouse.sqf | 8 +++++--- .../warehouse/fn_findScopeInWarehouse.sqf | 20 ++++++++++--------- .../warehouse/fn_findVestInWarehouse.sqf | 8 +++++--- .../warehouse/fn_findWeaponInWarehouse.sqf | 14 +++++++------ 6 files changed, 38 insertions(+), 30 deletions(-) diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Malden/data/objectives.sqf b/addons/overthrow_main/campaign/missions/Overthrow.Malden/data/objectives.sqf index 10bdea7c..566b8d38 100644 --- a/addons/overthrow_main/campaign/missions/Overthrow.Malden/data/objectives.sqf +++ b/addons/overthrow_main/campaign/missions/Overthrow.Malden/data/objectives.sqf @@ -1,7 +1,7 @@ OT_objectiveData = [ [[9346.16,3783.97,0],"Malden Naval Base",400], [[9687.4,3910.9,0],"East Island Base",800], - [[1216.21,621.646,0],"Faro Base",400], + [[1263.34,689.933,0],"Faro Base",400], [[4917.22,8658.72,0],"Larche Base",250], [[5384.13,3698.11,0],"Chemical Plant",600], [[5111.3,7349.41,0],"Arudy Base",250] diff --git a/addons/overthrow_main/campaign/missions/Overthrow.Malden/mission.sqm b/addons/overthrow_main/campaign/missions/Overthrow.Malden/mission.sqm index 62a487fc..55971ee2 100644 --- a/addons/overthrow_main/campaign/missions/Overthrow.Malden/mission.sqm +++ b/addons/overthrow_main/campaign/missions/Overthrow.Malden/mission.sqm @@ -16,14 +16,14 @@ class EditorData }; class LayerIndexProvider { - nextID=469; + nextID=474; }; class Camera { - pos[]={7854.2075,43.982349,3087.0303}; - dir[]={-0.43173364,-0.42325979,0.79659659}; - up[]={-0.20169996,0.90598685,0.3721588}; - aside[]={0.87922704,6.5295171e-007,0.4765175}; + pos[]={1233.9298,45.340958,613.59607}; + dir[]={-0.10257814,-0.24268723,0.96469754}; + up[]={-0.02566319,0.9700973,0.24134192}; + aside[]={0.99442244,1.9163781e-007,0.10574175}; }; }; binarizationWanted=0; @@ -6719,7 +6719,7 @@ class Mission dataType="Object"; class PositionInfo { - position[]={1204.514,38.42271,614.09338}; + position[]={1216.2902,45.955498,661.77649}; angles[]={0,4.1927366,0}; }; side="Empty"; @@ -6729,7 +6729,7 @@ class Mission }; id=2175; type="Land_Cargo_Tower_V1_F"; - atlOffset=-0.2177887; + atlOffset=-0.42855072; }; class Item73 { @@ -6887,7 +6887,7 @@ class Mission class PositionInfo { position[]={7811.9946,7.59831,3111.0527}; - angles[]={-0,1.2748219,0}; + angles[]={0,1.2748219,0}; }; side="Empty"; flags=4; diff --git a/addons/overthrow_main/functions/warehouse/fn_findHelmetInWarehouse.sqf b/addons/overthrow_main/functions/warehouse/fn_findHelmetInWarehouse.sqf index a3cf46c2..21fc99f4 100644 --- a/addons/overthrow_main/functions/warehouse/fn_findHelmetInWarehouse.sqf +++ b/addons/overthrow_main/functions/warehouse/fn_findHelmetInWarehouse.sqf @@ -5,9 +5,11 @@ private _possible = []; if(typename _d == "ARRAY") then { private _cls = _d select 0; private _num = _d select 1; - if(typename _num == "SCALAR") then { - if(_num > 0 and (_cls in OT_allHelmets)) then { - _possible pushback _cls; + if(!isNil "_num") then { + if(typename _num == "SCALAR") then { + if(_num > 0 and (_cls in OT_allHelmets)) then { + _possible pushback _cls; + }; }; }else{ warehouse setvariable [_x,nil,true]; diff --git a/addons/overthrow_main/functions/warehouse/fn_findScopeInWarehouse.sqf b/addons/overthrow_main/functions/warehouse/fn_findScopeInWarehouse.sqf index 21efa7ab..30514f00 100644 --- a/addons/overthrow_main/functions/warehouse/fn_findScopeInWarehouse.sqf +++ b/addons/overthrow_main/functions/warehouse/fn_findScopeInWarehouse.sqf @@ -6,16 +6,18 @@ private _possible = []; if(typename _d == "ARRAY") then { private _cls = _d select 0; private _num = _d select 1; - if(typename _num == "SCALAR") then { - if(_num > 0 and (_cls in OT_allOptics)) then { - private _allModes = "true" configClasses ( configFile >> "cfgWeapons" >> _cls >> "ItemInfo" >> "OpticsModes" ); - _max = 0; - { - _mode = configName _x; - _max = _max max getNumber (configFile >> "cfgWeapons" >> _cls >> "ItemInfo" >> "OpticsModes" >> _mode >> "distanceZoomMax"); - }foreach(_allModes); + if(!isNil "_num") then { + if(typename _num == "SCALAR") then { + if(_num > 0 and (_cls in OT_allOptics)) then { + private _allModes = "true" configClasses ( configFile >> "cfgWeapons" >> _cls >> "ItemInfo" >> "OpticsModes" ); + _max = 0; + { + _mode = configName _x; + _max = _max max getNumber (configFile >> "cfgWeapons" >> _cls >> "ItemInfo" >> "OpticsModes" >> _mode >> "distanceZoomMax"); + }foreach(_allModes); - if(_max >= _range) then {_possible pushback _cls}; + if(_max >= _range) then {_possible pushback _cls}; + }; }; }else{ warehouse setvariable [_x,nil,true]; diff --git a/addons/overthrow_main/functions/warehouse/fn_findVestInWarehouse.sqf b/addons/overthrow_main/functions/warehouse/fn_findVestInWarehouse.sqf index 36f7dfaa..00eb7d47 100644 --- a/addons/overthrow_main/functions/warehouse/fn_findVestInWarehouse.sqf +++ b/addons/overthrow_main/functions/warehouse/fn_findVestInWarehouse.sqf @@ -5,9 +5,11 @@ private _possible = []; if(typename _d == "ARRAY") then { private _cls = _d select 0; private _num = _d select 1; - if(typename _num == "SCALAR") then { - if(_num > 0 and (_cls in OT_allVests)) then { - _possible pushback _cls; + if(!isNil "_num") then { + if(typename _num == "SCALAR") then { + if(_num > 0 and (_cls in OT_allVests)) then { + _possible pushback _cls; + }; }; }else{ warehouse setvariable [_x,nil,true]; diff --git a/addons/overthrow_main/functions/warehouse/fn_findWeaponInWarehouse.sqf b/addons/overthrow_main/functions/warehouse/fn_findWeaponInWarehouse.sqf index 354caebc..28b55fab 100644 --- a/addons/overthrow_main/functions/warehouse/fn_findWeaponInWarehouse.sqf +++ b/addons/overthrow_main/functions/warehouse/fn_findWeaponInWarehouse.sqf @@ -6,12 +6,14 @@ private _possible = []; if(typename _d == "ARRAY") then { private _cls = _d select 0; private _num = _d select 1; - if(typename _num == "SCALAR") then { - if(_num > 0) then { - private _weapon = [_cls] call BIS_fnc_itemType; - private _weaponType = _weapon select 1; - if(_weaponType == "AssaultRifle" and (_cls find "_GL_") > -1) then {_weaponType = "GrenadeLauncher"}; - if(_weaponType == _type) then {_possible pushback _cls}; + if(!isNil "_num") then { + if(typename _num == "SCALAR") then { + if(_num > 0) then { + private _weapon = [_cls] call BIS_fnc_itemType; + private _weaponType = _weapon select 1; + if(_weaponType == "AssaultRifle" and (_cls find "_GL_") > -1) then {_weaponType = "GrenadeLauncher"}; + if(_weaponType == _type) then {_possible pushback _cls}; + }; }; }else{ warehouse setvariable [_x,nil,true];