Skip to content

Commit

Permalink
Fix some SP bugs (#712)
Browse files Browse the repository at this point in the history
Fixed some trivial SP bugs:

    Main UI garage button now redirects to the faction garage rather than blackholing.
    SP difficulty setup code now waits for its server init dependencies.
    SP player now gets the medic and engineer traits, as befor
  • Loading branch information
jaj22 authored and Spoffy committed Jan 19, 2020
1 parent fadd2a1 commit 7143788
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
13 changes: 7 additions & 6 deletions A3-Antistasi/functions/Dialogs/fn_createDialog_setParams.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,23 @@ if (!isNil "loadLastSave" && {!loadLastSave}) then {
hint "Choose a difficulty level";
waitUntil {!dialog};

if (!isNil "skillMult" && {skillMult != 2}) then
{
//Easy Difficulty Tweaks
[] spawn {
waitUntil {(!isNil "serverInitDone")}; // need following params to be initialized
if (isNil "skillMult") exitWith {};
if (skillMult == 1) then
{
//Easy Difficulty Tweaks
server setVariable ["hr",25,true];
server setVariable ["resourcesFIA",5000,true];
vehInGarage = [vehSDKTruck,vehSDKTruck,SDKMortar,SDKMGStatic,staticAAteamPlayer];
minWeaps = 15;
if !(hasTFAR) then
{
"ItemRadio" call A3A_fnc_unlockEquipment;
["ItemRadio"] call A3A_fnc_unlockEquipment;
haveRadio = true;
};
}
else
};
if (skillMult == 3) then
{
//Hard Difficulty Tweaks
server setVariable ["hr",0,true];
Expand Down
2 changes: 1 addition & 1 deletion A3-Antistasi/functions/Garage/fn_garageVehicle.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

private ["_pool","_veh","_typeVehX"];
_pool = false;
if (_this select 0) then {_pool = true};
if (_this select 0 || !isMultiplayer) then {_pool = true};

if (side player != teamPlayer) exitWith {hint "Only rebels can add vehicles to the garage."};
if (!([player] call A3A_fnc_isMember)) exitWith {hint "Only server members have the garage feature enabled"};
Expand Down
2 changes: 2 additions & 0 deletions A3-Antistasi/functions/init/fn_initClient.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ else {
player setIdentity "protagonista";
player setUnitRank "COLONEL";
player hcSetGroup [group player];
player setUnitTrait ["medic", true];
player setUnitTrait ["engineer", true];
waitUntil {/*(scriptdone _introshot) and */(!isNil "serverInitDone")};
};

Expand Down

0 comments on commit 7143788

Please sign in to comment.