Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
armazac committed Jul 10, 2017
1 parent b882205 commit 7c9fd00
Show file tree
Hide file tree
Showing 21 changed files with 139 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ OT_airportTerminals = ["Land_Airport_01_terminal_F","Land_Airport_02_terminal_F"
OT_portBuilding = "Land_WarehouseShelter_01_F";
OT_policeStation = "Land_Cargo_House_V3_F";
OT_warehouse = "Land_Warehouse_03_F";
OT_warehouses = [OT_warehouse];
OT_warehouses = [OT_warehouse,"Land_dp_smallFactory_F","Land_i_Shed_Ind_F"];
OT_barracks = "Land_Barracks_01_grey_F";
OT_workshopBuilding = "Land_Cargo_House_V4_F";
OT_refugeeCamp = "Land_Medevac_house_V1_F";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OT_objectiveData = [
[[9346.16,3783.97,0],"Malden Naval Base",400],
[[9687.4,3910.9,0],"East Island Base",800],
[[1263.34,689.933,0],"Faro Base",400],
[[1216.21,621.646,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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ OT_airportTerminals = ["Land_Airport_01_terminal_F","Land_Airport_02_terminal_F"
OT_portBuilding = "Land_WarehouseShelter_01_F";
OT_policeStation = "Land_Cargo_House_V3_F";
OT_warehouse = "Land_Warehouse_03_F";
OT_warehouses = [OT_warehouse];
OT_warehouses = [OT_warehouse,"Land_dp_smallFactory_F","Land_i_Shed_Ind_F"];
OT_barracks = "Land_Barracks_01_grey_F";
OT_workshopBuilding = "Land_Cargo_House_V4_F";
OT_refugeeCamp = "Land_Medevac_house_V1_F";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ class EditorData
toggles=521;
class ItemIDProvider
{
nextID=2185;
nextID=2191;
};
class MarkerIDProvider
{
nextID=55;
};
class LayerIndexProvider
{
nextID=464;
nextID=469;
};
class Camera
{
pos[]={9183.4248,278.67508,3141.479};
dir[]={-0.83506131,-0.27595153,0.47605035};
up[]={-0.23975331,0.96115732,0.13667786};
aside[]={0.49527794,1.3224781e-007,0.868792};
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};
};
};
binarizationWanted=0;
Expand Down Expand Up @@ -55,13 +55,15 @@ addons[]=
"ace_ui",
"A3_Modules_F_Curator_Curator",
"A3_Structures_F_Mil_Cargo",
"A3_Structures_F_Ind_DieselPowerPlant"
"A3_Structures_F_Ind_DieselPowerPlant",
"A3_Structures_F_Exp_Industrial_Port",
"A3_Structures_F_Ind_Cargo"
};
class AddonsMetaData
{
class List
{
items=24;
items=25;
class Item0
{
className="A3_Ui_F";
Expand Down Expand Up @@ -230,6 +232,13 @@ class AddonsMetaData
author="Bohemia Interactive";
url="https://www.arma3.com";
};
class Item24
{
className="A3_Structures_F_Exp_Industrial";
name="Arma 3 Apex - Industrial Structures";
author="Bohemia Interactive";
url="https://www.arma3.com";
};
};
};
class DynamicSimulation
Expand Down Expand Up @@ -684,7 +693,7 @@ class Mission
};
class Entities
{
items=81;
items=83;
class Item0
{
dataType="Layer";
Expand All @@ -695,7 +704,7 @@ class Mission
class Item1
{
dataType="Marker";
position[]={7814.208,0,3132.3101};
position[]={7817.9106,0,3111.6802};
name="port_1";
type="loc_Quay";
id=1598;
Expand Down Expand Up @@ -6855,6 +6864,39 @@ class Mission
type="Land_Cargo_Patrol_V1_F";
atlOffset=-2.3841858e-007;
};
class Item81
{
dataType="Object";
class PositionInfo
{
position[]={7817.6577,9.1076508,3111.8335};
angles[]={0,4.4632244,0};
};
side="Empty";
flags=5;
class Attributes
{
};
id=2185;
type="Land_WarehouseShelter_01_F";
atlOffset=4.7683716e-007;
};
class Item82
{
dataType="Object";
class PositionInfo
{
position[]={7811.9946,7.59831,3111.0527};
angles[]={-0,1.2748219,0};
};
side="Empty";
flags=4;
class Attributes
{
};
id=2187;
type="Land_Cargo40_military_green_F";
};
};
class Connections
{
Expand Down
10 changes: 5 additions & 5 deletions addons/overthrow_main/functions/AI/fn_initVCOMAI.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ _Unit setSkill ["spotDistance",1];
_Unit setSkill ["spotTime",1];
_Unit setSkill ["courage",(0.7 + (random 0.3))];
_Unit setSkill ["commanding",1.0];
_Unit setSkill ["aimingSpeed",1];
_Unit setSkill ["aimingSpeed",0.3];
_Unit setSkill ["general",1.0];
_Unit setSkill ["endurance",1.0];
_Unit setSkill ["reloadSpeed",(0.2 + (random 0.3))];
Expand All @@ -88,7 +88,7 @@ _Unit setSkill ["spotDistance",1];
_Unit setSkill ["spotTime",1];
_Unit setSkill ["courage",(0.6 + (random 0.3))];
_Unit setSkill ["commanding",1.0];
_Unit setSkill ["aimingSpeed",0.8];
_Unit setSkill ["aimingSpeed",0.3];
_Unit setSkill ["general",1.0];
_Unit setSkill ["endurance",1.0];
_Unit setSkill ["reloadSpeed",(0.3 + (random 0.3))];
Expand All @@ -103,7 +103,7 @@ _Unit setSkill ["spotDistance",0.9];
_Unit setSkill ["spotTime",1];
_Unit setSkill ["courage",(0.5 + (random 0.3))];
_Unit setSkill ["commanding",1.0];
_Unit setSkill ["aimingSpeed",0.7];
_Unit setSkill ["aimingSpeed",0.3];
_Unit setSkill ["general",1.0];
_Unit setSkill ["endurance",1.0];
_Unit setSkill ["reloadSpeed",(0.4 + (random 0.3))];
Expand All @@ -118,7 +118,7 @@ _Unit setSkill ["spotDistance",0.8];
_Unit setSkill ["spotTime",1];
_Unit setSkill ["courage",(0.4 + (random 0.3))];
_Unit setSkill ["commanding",1.0];
_Unit setSkill ["aimingSpeed",0.6];
_Unit setSkill ["aimingSpeed",0.3];
_Unit setSkill ["general",1.0];
_Unit setSkill ["endurance",0.9];
_Unit setSkill ["reloadSpeed",(0.5 + (random 0.3))];
Expand All @@ -133,7 +133,7 @@ _Unit setSkill ["spotDistance",0.7];
_Unit setSkill ["spotTime",1];
_Unit setSkill ["courage",(0.3 + (random 0.3))];
_Unit setSkill ["commanding",1.0];
_Unit setSkill ["aimingSpeed",0.5];
_Unit setSkill ["aimingSpeed",0.3];
_Unit setSkill ["general",1.0];
_Unit setSkill ["endurance",0.8];
_Unit setSkill ["reloadSpeed",(0.6 + (random 0.3))];
Expand Down
6 changes: 3 additions & 3 deletions addons/overthrow_main/functions/actions/fn_buyBuilding.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ if(_handled) then {
_owned = player getVariable "owned";

if(_type == "buy") then {
[_building,getPlayerUID player] call OT_fnc_setOwner;
_id = [_building] call OT_fnc_getBuildID;
[_id,getPlayerUID player] call OT_fnc_setOwner;
[-_price] call OT_fnc_money;

_id = [_building] call OT_fnc_getBuildID;
buildingpositions setVariable [_id,position _building,true];
_owned pushback _id;
[player,"Building Purchased",format["Bought: %1 in %2 for $%3",getText(configFile >> "CfgVehicles" >> (typeof _building) >> "displayName"),(getpos _building) call OT_fnc_nearestTown,_price]] call BIS_fnc_createLogRecord;
Expand All @@ -46,8 +46,8 @@ if(_handled) then {
_building addEventHandler ["Dammaged",OT_fnc_buildingDamagedHandler];
}else{
if ((typeof _building) in OT_allRealEstate) then {
[_building,nil] call OT_fnc_setOwner;
_id = [_building] call OT_fnc_getBuildID;
[_id,nil] call OT_fnc_setOwner;
_leased = player getVariable ["leased",[]];
_leased deleteAt (_leased find _id);
player setVariable ["leased",_leased,true];
Expand Down
2 changes: 1 addition & 1 deletion addons/overthrow_main/functions/actions/fn_recruitCiv.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if(random 100 > 80) then {
[_town,1] call OT_fnc_standing;
};

_civ = player getvariable "hiringciv";
_civ = OT_interactingWith;
[_civ,getPlayerUID player] call OT_fnc_setOwner;
_civ removeAllEventHandlers "FiredNear";
[_civ] joinSilent nil;
Expand Down
4 changes: 2 additions & 2 deletions addons/overthrow_main/functions/actions/fn_talkToCiv.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ if (_canSellDrugs) then {
};
}] spawn OT_fnc_doConversation;
}else{
[_civ,player,["No, thank you"],{(player getvariable "hiringciv") setVariable ["OT_Talking",false,true];}] spawn OT_fnc_doConversation;
[_civ,player,["No, thank you"],{OT_interactingWith setVariable ["OT_Talking",false,true];}] spawn OT_fnc_doConversation;
};
};
}else{
Expand All @@ -379,7 +379,7 @@ if (_canSellDrugs) then {
[_civ,player,[format["OK I'll give you $%1 for each",_price],"OK"],{[([OT_nation,OT_drugSelling] call OT_fnc_getDrugPrice) * OT_drugQty] call OT_fnc_money;for "_t" from 1 to OT_drugQty do {player removeItem OT_drugSelling};OT_interactingWith setVariable ["OT_Talking",false,true];}] spawn OT_fnc_doConversation;
[_town,-OT_drugQty] call OT_fnc_stability;
}else{
[_civ,player,["No, go away!"],{(player getvariable "hiringciv") setVariable ["OT_Talking",false,true];player setCaptive false;}] spawn OT_fnc_doConversation;
[_civ,player,["No, go away!"],{OT_interactingWith setVariable ["OT_Talking",false,true];player setCaptive false;}] spawn OT_fnc_doConversation;
if(player call OT_fnc_unitSeenCRIM) then {
hint "You are dealing on enemy turf";
player setCaptive false;
Expand Down
2 changes: 1 addition & 1 deletion addons/overthrow_main/functions/fn_setOwner.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ if(typename _obj == "STRING") exitWith {
if(typename _obj != "OBJECT") exitWith {};
if((getObjectType _obj) != 8 and (_obj isKindOf "Building")) exitWith {
_id = [_obj] call OT_fnc_getBuildID;
owners setVariable [str _id,_owner,true];
owners setVariable [_id,_owner,true];
};
_obj setVariable ["owner",_owner,true];
33 changes: 22 additions & 11 deletions addons/overthrow_main/functions/save/fn_loadGame.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,19 @@ private _cc = 0;
_set = true;
if(_key == "civilians") then {
{
OT_civilians setVariable [_x select 0,_x select 1,true];
_y = _x select 0;
if((_y select [0,4]) != "ace_" and (_y select [0,4]) != "cba_" and (_y select [0,4]) != "bis_") then {
OT_civilians setVariable [_x select 0,_x select 1,true];
};
}foreach(_val);
_set = false;
};
if(_key == "buildingpositions") then {
{
buildingpositions setVariable [_x select 0,_x select 1,true];
_y = _x select 0;
if((_y select [0,4]) != "ace_" and (_y select [0,4]) != "cba_" and (_y select [0,4]) != "bis_") then {
buildingpositions setVariable [_x select 0,_x select 1,true];
};
}foreach(_val);
_set = false;
};
Expand Down Expand Up @@ -59,7 +65,10 @@ private _cc = 0;
_set = false;
{
if(typename _x == "ARRAY") then {
warehouse setVariable [_x select 0,_x,true];
_y = _x select 0;
if((_y select [0,4]) != "ace_" and (_y select [0,4]) != "cba_" and (_y select [0,4]) != "bis_") then {
warehouse setVariable [_x select 0,_x,true];
};
};
}foreach(_val);
};
Expand Down Expand Up @@ -217,15 +226,17 @@ private _cc = 0;
};

if(_set and !(isNil "_val")) then {
if(typename _val == "ARRAY") then {
//make a copy
_orig = _val;
_val = [];
{
_val pushback _x;
}foreach(_orig);
if((_key select [0,4]) != "ace_" and (_key select [0,4]) != "cba_" and (_key select [0,4]) != "bis_") then {
if(typename _val == "ARRAY") then {
//make a copy
_orig = _val;
_val = [];
{
_val pushback _x;
}foreach(_orig);
};
server setvariable [_key,_val,true];
};
server setvariable [_key,_val,true];
};
_cc = _cc + 1;
if(_cc == 100) then {
Expand Down
14 changes: 10 additions & 4 deletions addons/overthrow_main/functions/save/fn_saveGame.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if !(_quiet) then {
private _data = [];
//get all server data
{
if !(_x == "StartupType" or _x == "recruits" or _x == "squads" or (_x select [0,11]) == "resgarrison") then {
if !(_x == "StartupType" or _x == "recruits" or _x == "squads" or (_x select [0,11]) == "resgarrison" or (_x select [0,4]) == "ace_" or (_x select [0,4]) == "cba_" or (_x select [0,4]) == "bis_") then {
_val = server getVariable _x;
if !(isNil "_val") then {
if(typename _val == "ARRAY") then {
Expand All @@ -50,15 +50,19 @@ if !(_quiet) then {
};
_poses = [];
{
_poses pushback [_x,buildingpositions getVariable _x];
if((_x select [0,4]) != "ace_" and (_x select [0,4]) != "cba_" and (_x select [0,4]) != "bis_") then {
_poses pushback [_x,buildingpositions getVariable _x];
};
}foreach(allVariables buildingpositions);
_data pushback ["buildingpositions",_poses];
if !(_quiet) then {
"Step 3/11 - Saving civilians" remoteExecCall ["OT_fnc_notifyAndLog",0,false];
};
_civs = [];
{
_civs pushback [_x,OT_civilians getVariable _x];
if((_x select [0,4]) != "ace_" and (_x select [0,4]) != "cba_" and (_x select [0,4]) != "bis_") then {
_civs pushback [_x,OT_civilians getVariable _x];
};
}foreach(allVariables OT_civilians);
_data pushback ["civilians",_civs];

Expand Down Expand Up @@ -154,7 +158,9 @@ private _warehouse = [];
{
_var = warehouse getVariable _x;
if (!isNil "_var") then {
_warehouse pushback _var;
if((_x select [0,4]) != "ace_" and (_x select [0,4]) != "cba_" and (_x select [0,4]) != "bis_") then {
_warehouse pushback _var;
};
};
}foreach(allvariables warehouse);
_data pushback ["warehouse",_warehouse];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ private _possible = [];
if(typename _d == "ARRAY") then {
private _cls = _d select 0;
private _num = _d select 1;
if(_num > 0 and (_cls in OT_allHelmets)) then {
_possible pushback _cls;
if(typename _num == "SCALAR") then {
if(_num > 0 and (_cls in OT_allHelmets)) then {
_possible pushback _cls;
};
}else{
warehouse setvariable [_x,nil,true];
};
};
}foreach(allvariables warehouse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ private _possible = [];
if(typename _d == "ARRAY") then {
private _cls = _d select 0;
private _num = _d select 1;
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(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];
};
};
}foreach(allvariables warehouse);
Expand Down
Loading

0 comments on commit 7c9fd00

Please sign in to comment.