Skip to content

Commit 0383f63

Browse files
authored
Merge pull request #168 from ArmaOverthrow/dev
0.7.5.3
2 parents ed53be3 + 27feb00 commit 0383f63

12 files changed

Lines changed: 60 additions & 49 deletions

File tree

addons/overthrow_main/functions/AI/NPC/fn_initGendarm.sqf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ _base = [_weapon] call BIS_fnc_baseWeapon;
6060
_magazine = (getArray (configFile / "CfgWeapons" / _base / "magazines")) select 0;
6161
_unit addMagazineGlobal _magazine;
6262
_unit addMagazineGlobal _magazine;
63-
_unit addMagazineGlobal _magazine;
64-
_unit addMagazineGlobal _magazine;
65-
_unit addMagazineGlobal _magazine;
6663
_unit addWeaponGlobal _weapon;
6764

6865
if(_hour > 17 or _hour < 6) then {
@@ -73,5 +70,4 @@ _weapon = OT_NATO_weapons_Pistols call BIS_fnc_selectRandom;
7370
_base = [_weapon] call BIS_fnc_baseWeapon;
7471
_magazine = (getArray (configFile / "CfgWeapons" / _base / "magazines")) select 0;
7572
_unit addMagazineGlobal _magazine;
76-
_unit addMagazineGlobal _magazine;
7773
_unit addWeaponGlobal _weapon;

addons/overthrow_main/functions/AI/orders/fn_orderLoot.sqf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,11 @@ format["Looting nearby bodies into the %1",(typeof _target) call OT_fnc_vehicleG
7070
_unit doMove getpos _deadguy;
7171
[_unit,1] call OT_fnc_experience;
7272

73-
waitUntil {sleep 1; (!alive _unit) or (isNull _t) or (_unit distance _deadguy < 10) or (_timeOut < time)};
73+
waitUntil {sleep 1; (!alive _unit) or (isNull _t) or (_unit distance _deadguy < 12) or (_timeOut < time)};
7474
if((!alive _unit) or (_timeOut < time)) exitWith {};
7575

7676
[_deadguy,_unit] call OT_fnc_takeStuff;
7777
sleep 2;
78-
hideBody _deadguy;
7978
if(primaryWeapon _unit == "") then {
8079
_weapon = objNull;
8180
{
@@ -86,7 +85,7 @@ format["Looting nearby bodies into the %1",(typeof _target) call OT_fnc_vehicleG
8685
}foreach(_unit nearentities ["WeaponHolderSimulated",10]);
8786
if !(isNull _weapon) then {
8887
_unit doMove getpos _weapon;
89-
waitUntil {sleep 1; (!alive _unit) or (_unit distance _weapon < 10) or (_timeOut < time)};
88+
waitUntil {sleep 1; (!alive _unit) or (_unit distance _weapon < 12) or (_timeOut < time)};
9089
if(alive _unit and (_timeOut > time)) then {
9190
_s = (weaponsItems _weapon) select 0;
9291

@@ -102,10 +101,11 @@ format["Looting nearby bodies into the %1",(typeof _target) call OT_fnc_vehicleG
102101
};
103102
};
104103
};
104+
deleteVehicle _deadguy;
105105
if(!alive _unit) exitWith {};
106106
_timeout = time + 120;
107107
_unit doMove getpos _t;
108-
waitUntil {sleep 1; (!alive _unit) or (isNull _t) or (_unit distance _t < 10) or (_timeOut < time)};
108+
waitUntil {sleep 1; (!alive _unit) or (isNull _t) or (_unit distance _t < 12) or (_timeOut < time)};
109109
if((!alive _unit) or (_timeOut < time)) exitWith {};
110110

111111
if !([_unit,_t] call OT_fnc_dumpStuff) exitWith {

addons/overthrow_main/functions/UI/dialogs/fn_warehouseDialog.sqf

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,39 @@ _numitems = 0;
66
_d = warehouse getVariable [_x,[_x,0]];
77
if(typename _d == "ARRAY") then {
88
_cls = _d select 0;
9-
_num = _d select 1;
10-
_name = "";
11-
_pic = "";
9+
if(typename _cls != "CODE") then {
10+
_num = _d select 1;
11+
_name = "";
12+
_pic = "";
1213

13-
if(_num > 0) then {
14-
_numitems = _numitems + 1;
15-
call {
16-
if(_cls isKindOf ["Default",configFile >> "CfgWeapons"]) exitWith {
17-
_name = _cls call OT_fnc_weaponGetName;
18-
_pic = _cls call OT_fnc_weaponGetPic;
19-
};
20-
if(_cls isKindOf ["Default",configFile >> "CfgMagazines"]) exitWith {
21-
_name = _cls call OT_fnc_magazineGetName;
22-
_pic = _cls call OT_fnc_magazineGetPic;
23-
};
24-
if(_cls isKindOf "Bag_Base") exitWith {
14+
if(_num > 0) then {
15+
_numitems = _numitems + 1;
16+
call {
17+
if(_cls isKindOf ["Default",configFile >> "CfgWeapons"]) exitWith {
18+
_name = _cls call OT_fnc_weaponGetName;
19+
_pic = _cls call OT_fnc_weaponGetPic;
20+
};
21+
if(_cls isKindOf ["Default",configFile >> "CfgMagazines"]) exitWith {
22+
_name = _cls call OT_fnc_magazineGetName;
23+
_pic = _cls call OT_fnc_magazineGetPic;
24+
};
25+
if(_cls isKindOf "Bag_Base") exitWith {
26+
_name = _cls call OT_fnc_vehicleGetName;
27+
_pic = _cls call OT_fnc_vehicleGetPic;
28+
};
29+
if(isClass (configFile >> "CfgGlasses" >> _cls)) exitWith {
30+
_name = gettext(configFile >> "CfgGlasses" >> _cls >> "displayName");
31+
_pic = gettext(configFile >> "CfgGlasses" >> _cls >> "picture");
32+
};
2533
_name = _cls call OT_fnc_vehicleGetName;
2634
_pic = _cls call OT_fnc_vehicleGetPic;
2735
};
28-
if(isClass (configFile >> "CfgGlasses" >> _cls)) exitWith {
29-
_name = gettext(configFile >> "CfgGlasses" >> _cls >> "displayName");
30-
_pic = gettext(configFile >> "CfgGlasses" >> _cls >> "picture");
31-
};
32-
_name = _cls call OT_fnc_vehicleGetName;
33-
_pic = _cls call OT_fnc_vehicleGetPic;
34-
};
3536

36-
_idx = lbAdd [1500,format["%1 x %2",_num,_name]];
37-
lbSetPicture [1500,_idx,_pic];
38-
lbSetValue [1500,_idx,_num];
39-
lbSetData [1500,_idx,_cls];
37+
_idx = lbAdd [1500,format["%1 x %2",_num,_name]];
38+
lbSetPicture [1500,_idx,_pic];
39+
lbSetValue [1500,_idx,_num];
40+
lbSetData [1500,_idx,_cls];
41+
};
4042
};
4143
};
4244
}foreach(_sorted);

addons/overthrow_main/functions/actions/fn_dumpStuff.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ if(primaryWeapon _unit != "") then {
7474
_t addItemCargoGlobal [_x,1];
7575
}foreach(primaryWeaponItems _unit);
7676
removeAllPrimaryWeaponItems _unit;
77-
_t addWeaponCargoGlobal [primaryWeapon _unit,1];
77+
_t addWeaponCargoGlobal [(primaryWeapon _unit) call BIS_fnc_baseWeapon,1];
7878
_unit removeWeapon primaryWeapon _unit;
7979
};
8080
if(_full and !_istruck) exitWith {false};

addons/overthrow_main/functions/actions/fn_talkToCiv.sqf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -349,14 +349,14 @@ if (_canSellDrugs) then {
349349
if((random 100) > 68) then {
350350
[_civ,player,["How much?",format["$%1",_price],"OK"],
351351
{
352-
352+
private _drugSell = _this select 0;
353353
[
354354
round(
355-
([(getpos player) call OT_fnc_nearestTown,OT_drugSelling] call OT_fnc_getDrugPrice)*1.2
355+
([(getpos player) call OT_fnc_nearestTown,_drugSell] call OT_fnc_getDrugPrice)*1.2
356356
)
357357
] call OT_fnc_money;
358-
player removeItem OT_drugSelling;
359-
OT_interactingWith addItem OT_drugSelling;
358+
player removeItem _drugSell;
359+
OT_interactingWith addItem _drugSell;
360360
OT_interactingWith setVariable ["OT_Talking",false,true];
361361
private _town = (getpos player) call OT_fnc_nearestTown;
362362
if((random 100 > 50) and !isNil "_town") then {
@@ -365,7 +365,7 @@ if (_canSellDrugs) then {
365365
if(random 100 > 80) then {
366366
1 call OT_fnc_influence;
367367
};
368-
}] spawn OT_fnc_doConversation;
368+
}, [OT_drugSelling]] spawn OT_fnc_doConversation;
369369
}else{
370370
[_civ,player,["No, thank you"],{OT_interactingWith setVariable ["OT_Talking",false,true];}] spawn OT_fnc_doConversation;
371371
};

addons/overthrow_main/functions/actions/fn_transferFrom.sqf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ _doTransfer = {
3131
format["Transferring inventory from %1",(typeof _target) call OT_fnc_vehicleGetName] call OT_fnc_notifyMinor;
3232
[5,false] call OT_fnc_progressBar;
3333
_end = time + 5;
34+
[_target, "FakeWeapon"] call CBA_fnc_removeWeaponCargo;
3435
{
3536
_count = 0;
3637
_cls = _x select 0;

addons/overthrow_main/functions/actions/fn_transferTo.sqf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ private _doTransfer = {
5252
format["Transferring inventory to %1",_toname] call OT_fnc_notifyMinor;
5353
[5,false] call OT_fnc_progressBar;
5454
sleep 5;
55+
[_target, "FakeWeapon"] call CBA_fnc_removeWeaponCargo;
5556
if(_iswarehouse) then {
5657
{
5758
_cls = _x select 0;

addons/overthrow_main/functions/fn_unitStock.sqf

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,16 @@ private _allCargo = {
3434
{
3535
if(typename _x == "STRING") then {
3636
if !(_x isEqualTo "") then {
37-
_myitems pushback _x;
37+
if((_x call BIS_fnc_itemType) select 0 == "Weapon") then {
38+
_myitems pushback (_x call BIS_fnc_baseWeapon);
39+
}else{
40+
_myitems pushback _x;
41+
};
42+
};
43+
};
44+
if(typename _x == "ARRAY") then {
45+
if !((_x select 0) isEqualTo "") then {
46+
_myitems pushback (_x select 0);
3847
};
3948
};
4049
}foreach(_x);

addons/overthrow_main/functions/player/fn_setupPlayer.sqf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
player spawn OT_fnc_statsSystem;
22
player spawn OT_fnc_wantedSystem;
3-
player spawn OT_fnc_perkSystem;
3+
if !(isNil "ace_advanced_fatigue_anreserve") then {
4+
player spawn OT_fnc_perkSystem;
5+
};
46
player spawn OT_fnc_mapSystem;
57
disableUserInput false;
68

addons/overthrow_main/functions/player/fn_wantedSystem.sqf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,6 @@ while {alive _unit} do {
239239
sleep 0.2;
240240
_town = (getpos _unit) call OT_fnc_nearestTown;
241241
_totalrep = ((_unit getVariable ["rep",0]) * -0.25) + ((_unit getVariable [format["rep%1",_town],0]) * -1);
242-
243-
_totalrep = abs(_unit getVariable ["rep",0]) * 0.5;
244242
_replim = 50;
245243
_skill = _unit getVariable ["OT_stealth",0];
246244
if(_skill == 1) then {_replim = 75};

0 commit comments

Comments
 (0)