Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
armazac committed Jun 4, 2019
2 parents f81b15d + bcb7a41 commit 68e651a
Show file tree
Hide file tree
Showing 120 changed files with 1,521 additions and 1,339 deletions.
Binary file modified addons/overthrow_main.pbo
Binary file not shown.
7 changes: 7 additions & 0 deletions addons/overthrow_main/CfgFunctions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ class CfgFunctions
class keyHandler {};
class taggedHandler {};
class EnemyDamagedHandler {};
class QRFStartHandler {};
class QRFEndHandler {};
};

class UI
Expand All @@ -138,6 +140,7 @@ class CfgFunctions
class notifyMinor {};
class notifyBig {};
class notifyGood {};
class notifySilent {};
class notifyVehicle {};
class playerDecision {};
class choiceMade {};
Expand Down Expand Up @@ -456,6 +459,8 @@ class CfgFunctions
class createSquad {};
class experience {};
class dangerCaused {};
class randomizeLoadout {};
class getRandomLoadout {};
};

/*
Expand Down Expand Up @@ -528,6 +533,7 @@ class CfgFunctions

class NATOQRF {};
class NATOGroundForces {};
class NATOGroundReinforcements {};
class CTRGSupport {};
class NATOAirSupport {};
class NATOGroundSupport {};
Expand All @@ -554,6 +560,7 @@ class CfgFunctions
class NATOupgradeFOB {};
class NATOsendGendarmerie {};
class NATOreportThreat {};
class NATOGetAttackVectors {};
};

class NATOAI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ OT_NATO_Vehicle_PoliceHeli = "B_Heli_Light_01_F";
OT_NATO_Vehicle_Quad = "B_Quadbike_01_F";
OT_NATO_Vehicle_Police = "B_GEN_Offroad_01_gen_F";
OT_NATO_Vehicle_Transport = ["B_Truck_01_transport_F","B_Truck_01_covered_F"];
OT_NATO_Vehicle_Transport_Light = "B_CTRG_LSV_01_light_F";
OT_NATO_Vehicle_Transport_Light = "B_LSV_01_unarmed_F";
OT_NATO_Vehicles_PoliceSupport = ["B_MRAP_01_hmg_F","B_MRAP_01_gmg_F","B_LSV_01_armed_F","B_Heli_Light_01_armed_F"];
OT_NATO_Vehicles_ReconDrone = "B_UAV_01_F";
OT_NATO_Vehicles_CASDrone = "B_UAV_02_CAS_F";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ OT_NATO_Vehicle_PoliceHeli = "B_Heli_Light_01_F";
OT_NATO_Vehicle_Quad = "B_Quadbike_01_F";
OT_NATO_Vehicle_Police = "B_GEN_Offroad_01_gen_F";
OT_NATO_Vehicle_Transport = ["B_T_Truck_01_transport_F","B_T_Truck_01_covered_F"];
OT_NATO_Vehicle_Transport_Light = "B_CTRG_LSV_01_light_F";
OT_NATO_Vehicle_Transport_Light = "B_LSV_01_unarmed_F";
OT_NATO_Vehicles_PoliceSupport = ["B_T_MRAP_01_hmg_F","B_T_MRAP_01_gmg_F","B_T_LSV_01_armed_F","B_Heli_Light_01_armed_F"];
OT_NATO_Vehicles_ReconDrone = "B_UAV_01_F";
OT_NATO_Vehicles_CASDrone = "B_UAV_02_CAS_F";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ OT_NATO_Vehicle_PoliceHeli = "B_Heli_Light_01_F";
OT_NATO_Vehicle_Quad = "B_Quadbike_01_F";
OT_NATO_Vehicle_Police = "B_GEN_Offroad_01_gen_F";
OT_NATO_Vehicle_Transport = ["B_Truck_01_transport_F","B_Truck_01_covered_F"];
OT_NATO_Vehicle_Transport_Light = "B_CTRG_LSV_01_light_F";
OT_NATO_Vehicle_Transport_Light = "B_LSV_01_unarmed_F";
OT_NATO_Vehicles_PoliceSupport = ["B_MRAP_01_hmg_F","B_MRAP_01_gmg_F","B_LSV_01_armed_F","B_Heli_Light_01_armed_F"];
OT_NATO_Vehicles_ReconDrone = "B_UAV_01_F";
OT_NATO_Vehicles_CASDrone = "B_UAV_02_CAS_F";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ OT_objectiveData = [
[[3939.27,13915,0],"The Camp Remnants",250],
[[3166.18,11038.8,0],"Belfort Naval Base",500],
[[5216.9,3656.3,0],"Chemical Plant",600],
[[11581,7342.56,0],"Kotomo Base",200],
[[11570.3,7345.21,0],"Kotomo Base",200],
[[4501.34,8430.07,0],"Regina Base",200]
];
OT_NATO_HQ = "Tuvanaka Airbase";
OT_NATO_priority = ["Tuvanaka Airbase","Comms Alpha","96FM Georgetown","Comms Whiskey","Lijnhaven","Blue Pearl industrial port","Nani","Belfort","Tuvanaka","Georgetown","Katkoula","Harcourt"];
OT_NATO_priority = ["Tuvanaka Airbase","Comms Alpha","Comms Whiskey","Lijnhaven","Blue Pearl industrial port","Nani","Belfort","Tuvanaka","Georgetown","Katkoula","Harcourt"];
OT_NATO_Navy_HQ = "Belfort Naval Base";

OT_NATO_JetPos = [2078.23,13254.2,1.54746]; //Where to spawn jets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ OT_townData = [
[[12317.8,13929.5,0],"Ipota"]
];

OT_spawnTowns = ["Savaka","Namuvaka","Cerebu","Tavu","Muaceba","Leqa","La Foa","Tobakoro","Lösi","Lailai"];
OT_spawnTowns = ["Savaka","Namuvaka","Tavu","Muaceba","Leqa","Balavu","Rautake"];
OT_capitals = ["Georgetown","Lijnhaven","Katkoula","Balavu","Tuvanaka"]; //region capitals
OT_sprawling = ["Blue Pearl industrial port"];
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ OT_NATO_Vehicle_PoliceHeli = "B_Heli_Light_01_F";
OT_NATO_Vehicle_Quad = "B_Quadbike_01_F";
OT_NATO_Vehicle_Police = "B_GEN_Offroad_01_gen_F";
OT_NATO_Vehicle_Transport = ["B_T_Truck_01_transport_F","B_T_Truck_01_covered_F"];
OT_NATO_Vehicle_Transport_Light = "B_CTRG_LSV_01_light_F";
OT_NATO_Vehicle_Transport_Light = "B_T_LSV_01_unarmed_F";
OT_NATO_Vehicles_PoliceSupport = ["B_T_MRAP_01_hmg_F","B_T_MRAP_01_gmg_F","B_T_LSV_01_armed_F","B_Heli_Light_01_armed_F"];
OT_NATO_Vehicles_ReconDrone = "B_UAV_01_F";
OT_NATO_Vehicles_CASDrone = "B_UAV_02_CAS_F";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ OT_NATO_Vehicle_PoliceHeli = "B_Heli_Light_01_F";
OT_NATO_Vehicle_Quad = "B_Quadbike_01_F";
OT_NATO_Vehicle_Police = "B_GEN_Offroad_01_gen_F";
OT_NATO_Vehicle_Transport = ["B_Truck_01_transport_F","B_Truck_01_covered_F"];
OT_NATO_Vehicle_Transport_Light = "B_CTRG_LSV_01_light_F";
OT_NATO_Vehicle_Transport_Light = "B_LSV_01_unarmed_F";
OT_NATO_Vehicles_PoliceSupport = ["B_MRAP_01_hmg_F","B_MRAP_01_gmg_F","B_LSV_01_armed_F","B_Heli_Light_01_armed_F"];
OT_NATO_Vehicles_ReconDrone = "B_UAV_01_F";
OT_NATO_Vehicles_CASDrone = "B_UAV_02_CAS_F";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ OT_NATO_Vehicle_PoliceHeli = "B_Heli_Light_01_F";
OT_NATO_Vehicle_Quad = "B_Quadbike_01_F";
OT_NATO_Vehicle_Police = "B_GEN_Offroad_01_gen_F";
OT_NATO_Vehicle_Transport = ["B_Truck_01_transport_F","B_Truck_01_covered_F"];
OT_NATO_Vehicle_Transport_Light = "B_CTRG_LSV_01_light_F";
OT_NATO_Vehicle_Transport_Light = "B_LSV_01_unarmed_F";
OT_NATO_Vehicles_PoliceSupport = ["B_MRAP_01_hmg_F","B_MRAP_01_gmg_F","B_LSV_01_armed_F","B_Heli_Light_01_armed_F"];
OT_NATO_Vehicles_ReconDrone = "B_UAV_01_F";
OT_NATO_Vehicles_CASDrone = "B_UAV_02_CAS_F";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ OT_objectiveData = [
[[3939.27,13915,0],"The Camp Remnants",250],
[[3166.18,11038.8,0],"Belfort Naval Base",500],
[[5216.9,3656.3,0],"Chemical Plant",600],
[[11581,7342.56,0],"Kotomo Base",200],
[[11570.3,7345.21,0],"Kotomo Base",200],
[[4501.34,8430.07,0],"Regina Base",200]
];
OT_NATO_HQ = "Tuvanaka Airbase";
OT_NATO_priority = ["Tuvanaka Airbase","Comms Alpha","96FM Georgetown","Comms Whiskey","Lijnhaven","Blue Pearl industrial port","Nani","Belfort","Tuvanaka","Georgetown","Katkoula","Harcourt"];
OT_NATO_priority = ["Tuvanaka Airbase","Comms Alpha","Comms Whiskey","Lijnhaven","Blue Pearl industrial port","Nani","Belfort","Tuvanaka","Georgetown","Katkoula","Harcourt"];
OT_NATO_Navy_HQ = "Belfort Naval Base";

OT_NATO_JetPos = [2078.23,13254.2,1.54746]; //Where to spawn jets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ OT_townData = [
[[12317.8,13929.5,0],"Ipota"]
];

OT_spawnTowns = ["Savaka","Namuvaka","Cerebu","Tavu","Muaceba","Leqa","La Foa","Tobakoro","Lösi","Lailai"];
OT_spawnTowns = ["Savaka","Namuvaka","Tavu","Muaceba","Leqa","Balavu","Rautake"];
OT_capitals = ["Georgetown","Lijnhaven","Katkoula","Balavu","Tuvanaka"]; //region capitals
OT_sprawling = ["Blue Pearl industrial port"];
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ OT_NATO_Vehicle_PoliceHeli = "B_Heli_Light_01_F";
OT_NATO_Vehicle_Quad = "B_Quadbike_01_F";
OT_NATO_Vehicle_Police = "B_GEN_Offroad_01_gen_F";
OT_NATO_Vehicle_Transport = ["B_T_Truck_01_transport_F","B_T_Truck_01_covered_F"];
OT_NATO_Vehicle_Transport_Light = "B_CTRG_LSV_01_light_F";
OT_NATO_Vehicle_Transport_Light = "B_T_LSV_01_unarmed_F";
OT_NATO_Vehicles_PoliceSupport = ["B_T_MRAP_01_hmg_F","B_T_MRAP_01_gmg_F","B_T_LSV_01_armed_F","B_Heli_Light_01_armed_F"];
OT_NATO_Vehicles_ReconDrone = "B_UAV_01_F";
OT_NATO_Vehicles_CASDrone = "B_UAV_02_CAS_F";
Expand Down
2 changes: 1 addition & 1 deletion addons/overthrow_main/data/prices.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ OT_priceData = [
['I_HMG_01_high_weapon_F',[2000,1,0,1]],
['I_GMG_01_high_weapon_F',[4000,1,0,1]],
['I_HMG_01_support_high_F',[50,1,0,0]],
['I_Mortar_01_weapon_F',[9000,1,0,1]],
['I_Mortar_01_weapon_F',[12000,1,0,1]],
['I_Mortar_01_support_F',[100,1,0,0]],
['I_AT_01_weapon_F',[10000,1,0,1]],
['I_AA_01_weapon_F',[10000,1,0,1]],
Expand Down
81 changes: 7 additions & 74 deletions addons/overthrow_main/functions/AI/NPC/fn_initCrimLeader.sqf
Original file line number Diff line number Diff line change
@@ -1,32 +1,20 @@
private ["_unit","_numslots","_weapon","_magazine","_base","_config"];
_unit = _this select 0;
_town = _this select 1;
params ["_unit","_town","_gangid"];

(group _unit) setVariable ["VCM_NORESCUE",true];
(group _unit) setVariable ["VCM_TOUGHSQUAD",true];

_unit disableAI "PATH";

_unit setVariable ["crimleader",true,false];
_unit setVariable ["hometown",_town,false];

_unit addEventHandler ["HandleDamage", {
_me = _this select 0;
_src = _this select 3;
if(captive _src) then {
if((vehicle _src) != _src || (_src call OT_fnc_unitSeenCRIM)) then {
_src setCaptive false;
};
};
}];

[_unit, (OT_faces_local call BIS_fnc_selectRandom)] remoteExecCall ["setFace", 0, _unit];
[_unit, (OT_voices_local call BIS_fnc_selectRandom)] remoteExecCall ["setSpeaker", 0, _unit];
_unit forceAddUniform (OT_CRIM_Clothes call BIS_fnc_selectRandom);

removeAllItems _unit;
removeHeadgear _unit;
removeAllWeapons _unit;
removeVest _unit;
removeAllAssignedItems _unit;
private _loadout = (format["gang%1",_gangid]) call OT_fnc_getRandomLoadout;

_unit setUnitLoadout [_loadout,true];

if((random 100) < 50) then {
_unit addItem "OT_Ganja";
Expand All @@ -35,62 +23,7 @@ if((random 100) < 50) then {
_unit addItem "OT_Blow";
};

_unit addHeadgear "H_Bandanna_khk_hs";

_unit linkItem "ItemMap";
_unit linkItem "ItemCompass";
_unit addVest (OT_allExpensiveVests call BIS_fnc_selectRandom);
if(OT_hasTFAR) then {
_unit linkItem "tf_fadak";
}else{
_unit linkItem "ItemRadio";
};
_hour = date select 3;
if(_hour < 8 || _hour > 15) then {
_unit linkItem "NVGoggles_OPFOR";
};
_unit linkItem "ItemWatch";

_weapon = (OT_CRIM_Weapons + OT_allCheapRifles) call BIS_fnc_selectRandom;
_base = [_weapon] call BIS_fnc_baseWeapon;
_magazine = (getArray (configFile / "CfgWeapons" / _base / "magazines")) select 0;
_unit addMagazine _magazine;
_unit addMagazine _magazine;
_unit addMagazine _magazine;
_unit addMagazine _magazine;
_unit addWeaponGlobal _weapon;

_config = configfile >> "CfgWeapons" >> _weapon >> "WeaponSlotsInfo";
_numslots = count(_config);
for "_i" from 0 to (_numslots-1) do {
if (isClass (_config select _i)) then {
_slot = configName(_config select _i);
if(_slot != "MuzzleSlot") then {
_com = _config >> _slot >> "compatibleItems";
_items = [];
if (isClass (_com)) then {
for "_t" from 0 to (count(_com)-1) do {
_items pushback (configName(_com select _t));
};
}else{
_items = getArray(_com);
};
if(count _items > 0) then {
_cls = _items call BIS_fnc_selectRandom;
_unit addPrimaryWeaponItem _cls;
};
};
};
};

_weapon = OT_allHandguns call BIS_fnc_selectRandom;
_unit addWeaponGlobal _weapon;
_base = [_weapon] call BIS_fnc_baseWeapon;
_magazine = (getArray (configFile / "CfgWeapons" / _base / "magazines")) select 0;
if !(isNil "_magazine") then {
_unit addItem _magazine;
};

_unit addGoggles (OT_CRIM_Goggles call BIS_fnc_selectRandom);

_unit addEventHandler ["Dammaged", OT_fnc_EnemyDamagedHandler];
_unit addEventHandler ["FiredNear", {params ["_unit"];_unit enableAI "PATH"}];
74 changes: 5 additions & 69 deletions addons/overthrow_main/functions/AI/NPC/fn_initCriminal.sqf
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
private ["_unit","_numslots","_weapon","_magazine","_base","_config"];
_unit = _this select 0;
_town = _this select 1;
_vest = _this select 2;
params ["_unit","_town","_vest","_gangid"];

_unit setVariable ["criminal",true,false];
_unit setVariable ["civ",nil,false];
Expand All @@ -12,53 +9,9 @@ _unit setSkill 0.4 + (random 0.4);

_unit removeAllEventHandlers "FiredNear";

_unit addEventHandler ["HandleDamage", {
_me = _this select 0;
_src = _this select 3;
if(captive _src) then {
if((vehicle _src) != _src || (_src call OT_fnc_unitSeenCRIM)) then {
_src setCaptive false;
};
};
}];

removeAllItems _unit;
removeHeadgear _unit;
removeAllWeapons _unit;
removeVest _unit;
removeAllAssignedItems _unit;

_unit linkItem "ItemMap";
_unit linkItem "ItemCompass";
_unit addVest _vest;
if(OT_hasTFAR) then {
_unit linkItem "tf_fadak";
}else{
_unit linkItem "ItemRadio";
};
_hour = date select 3;
_unit linkItem "ItemWatch";

_weapon = "";

if(random 100 > 30) then {
_weapon = selectRandom (OT_CRIM_Weapons + OT_allCheapRifles);
}else{
_weapon = selectRandom OT_allHandguns;
};
_base = [_weapon] call BIS_fnc_baseWeapon;
_magazine = (getArray (configFile / "CfgWeapons" / _base / "magazines")) select 0;
if (isNil "_magazine") then {_weapon = (OT_allHandguns) call BIS_fnc_selectRandom;_base = [_weapon] call BIS_fnc_baseWeapon;_magazine = (getArray (configFile / "CfgWeapons" / _base / "magazines")) select 0;};

if !(isNil "_magazine") then {
_unit addMagazine _magazine;
_unit addMagazine _magazine;
_unit addMagazine _magazine;
_unit addMagazine _magazine;
_unit addMagazine _magazine;
};
private _loadout = (format["gang%1",_gangid]) call OT_fnc_getRandomLoadout;

_unit addWeaponGlobal _weapon;
_unit setUnitLoadout [_loadout,true];

if((random 100) < 15) then {
_unit addItem "OT_Ganja";
Expand Down Expand Up @@ -87,31 +40,14 @@ if((random 100) < 15) then {
_unit addItemToBackpack "ACE_Clacker";
_unit addItemToBackpack "ACE_DeadManSwitch";

_unit addItemToBackpack "Toolkit";
_unit addItemToBackpack "ToolKit";
};
if((random 100) > 97) exitWith {
//This guy just has a bit of weed
//This guy is a drug runner
_unit addBackpack (OT_allBackpacks call BIS_fnc_selectRandom);
for "_i" from 1 to round(random 15) do {_unit addItemToBackpack "OT_Ganja";};
};
};



if((random 100) > 80) then {
_unit addItem "SmokeShell";
};

if((random 100) > 50) then {
_unit addItem "HandGrenade";
}else{
_unit addItem "MiniGrenade";
};

if((random 100) > 90) then {
_unit addItem "ACE_M84";
};

_unit addGoggles (OT_CRIM_Goggles call BIS_fnc_selectRandom);

_unit addEventHandler ["Dammaged", OT_fnc_EnemyDamagedHandler];
Loading

0 comments on commit 68e651a

Please sign in to comment.