Skip to content

Commit

Permalink
Fix for garrison saves
Browse files Browse the repository at this point in the history
  • Loading branch information
armazac committed Jul 15, 2017
1 parent 01dd3cc commit 2d980b0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions addons/overthrow_main/functions/AI/orders/fn_orderLoot.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ format["Looting nearby bodies into the %1",(typeof _target) call OT_fnc_vehicleG
_unit doMove getpos _deadguy;
[_unit,1] call OT_fnc_experience;

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

[_deadguy,_unit] call OT_fnc_takeStuff;
sleep 2;
hideBody _deadguy;
deleteVehicle _deadguy;
if(primaryWeapon _unit == "") then {
_weapon = objNull;
{
Expand All @@ -86,7 +86,7 @@ format["Looting nearby bodies into the %1",(typeof _target) call OT_fnc_vehicleG
}foreach(_unit nearentities ["WeaponHolderSimulated",10]);
if !(isNull _weapon) then {
_unit doMove getpos _weapon;
waitUntil {sleep 1; (!alive _unit) or (_unit distance _weapon < 10) or (_timeOut < time)};
waitUntil {sleep 1; (!alive _unit) or (_unit distance _weapon < 12) or (_timeOut < time)};
if(alive _unit and (_timeOut > time)) then {
_s = (weaponsItems _weapon) select 0;

Expand All @@ -105,7 +105,7 @@ format["Looting nearby bodies into the %1",(typeof _target) call OT_fnc_vehicleG
if(!alive _unit) exitWith {};
_timeout = time + 120;
_unit doMove getpos _t;
waitUntil {sleep 1; (!alive _unit) or (isNull _t) or (_unit distance _t < 10) or (_timeOut < time)};
waitUntil {sleep 1; (!alive _unit) or (isNull _t) or (_unit distance _t < 12) or (_timeOut < time)};
if((!alive _unit) or (_timeOut < time)) exitWith {};

if !([_unit,_t] call OT_fnc_dumpStuff) exitWith {
Expand Down
4 changes: 2 additions & 2 deletions addons/overthrow_main/functions/save/fn_loadGame.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ sleep 0.2;
_garrison = server getVariable [format["resgarrison%1",_code],[]];
if(count _garrison > 0) then {
_group = creategroup resistance;
spawner setVariable [format["resgarrison",_code],_group,true];
spawner setVariable [format["resgarrison%1",_code],_group,true];
{
_x params ["_cls","_loadout"];

Expand All @@ -275,7 +275,7 @@ sleep 0.2;
_garrison = server getVariable [format["resgarrison%1",_code],[]];
if(count _garrison > 0) then {
_group = creategroup resistance;
spawner setVariable [format["resgarrison",_code],_group,true];
spawner setVariable [format["resgarrison%1",_code],_group,true];
{
_x params ["_cls","_loadout"];
if(_cls != "HMG" and _cls != "GMG") then {
Expand Down
2 changes: 1 addition & 1 deletion addons/overthrow_main/script_version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
#define MAJOR 0
#define MINOR 7
#define PATCHLVL 5
#define BUILD 2
#define BUILD 3

0 comments on commit 2d980b0

Please sign in to comment.