From d3bfecf3fa12002e649fc386847f66601ad285e6 Mon Sep 17 00:00:00 2001 From: Spoffy Date: Thu, 25 Jul 2019 01:33:38 +0100 Subject: [PATCH 01/18] Fixes performance logging not working --- A3-Antistasi/initServer.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/A3-Antistasi/initServer.sqf b/A3-Antistasi/initServer.sqf index 250ad0b090..0173da2a2a 100644 --- a/A3-Antistasi/initServer.sqf +++ b/A3-Antistasi/initServer.sqf @@ -180,7 +180,7 @@ resourcecheck = [] execVM "resourcecheck.sqf"; [] execVM "Scripts\fn_advancedTowingInit.sqf"; savingServer = false; -[] call A3A_fnc_spawnDebuggingLoop; +[] spawn A3A_fnc_spawnDebuggingLoop; //Enable performance logging [] spawn { From 4d4e960d54e1ef6fdd3f330b409db497840e18f3 Mon Sep 17 00:00:00 2001 From: Spoffy Date: Thu, 25 Jul 2019 02:13:18 +0100 Subject: [PATCH 02/18] Improves moveHQObject reliability (in theory) Should fix objects vanishing into the floor --- A3-Antistasi/moveHQObject.sqf | 46 +++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/A3-Antistasi/moveHQObject.sqf b/A3-Antistasi/moveHQObject.sqf index 6f52cbda6d..c0c45f4171 100644 --- a/A3-Antistasi/moveHQObject.sqf +++ b/A3-Antistasi/moveHQObject.sqf @@ -15,29 +15,43 @@ _size = [_markerX] call A3A_fnc_sizeMarker; _positionX = getMarkerPos _markerX; if (_playerX distance2D _positionX > _size) exitWith {hint "This asset needs to be closer to it relative zone center to be able to be moved"}; +_thingX setVariable ["objectBeingMoved", true]; + _thingX removeAction _id; _thingX attachTo [_playerX,[0,2,1]]; -private _actionX = _playerX addAction ["Drop Here", {detach (_this select 3 select 0); player removeAction (_this select 2);}, [_thingX],0,false,true,"",""]; - -waitUntil {sleep 1; (_playerX != attachedTo _thingX) or (vehicle _playerX != _playerX) or (_playerX distance2D _positionX > (_size-3)) or !([_playerX] call A3A_fnc_canFight) or (!isPlayer _playerX)}; - -if (_playerX == attachedTo _thingX) then { - detach _thingX; - _playerX removeAction _actionX; +private _fnc_placeObject = { + params [["_thingX", objNull], ["_playerX", objNull], ["_dropObjectActionIndex", -1]]; + + if (isNull _thingX) exitWith {diag_log "[Antistasi] Error, trying to place invalid HQ object"}; + if (isNull _playerX) exitWith {diag_log "[Antistasi] Error, trying to place HQ object with invalid player"}; + + if (!(_thingX getVariable ["objectBeingMoved", false])) exitWith {}; + + if (_playerX == attachedTo _thingX) then { + detach _thingX; + }; + + if (_dropObjectActionIndex != -1) then { + _playerX removeAction _dropObjectActionIndex; + }; + + _thingX setVectorUp surfaceNormal position _thingX; + _thingX setPosATL [getPosATL _thingX select 0,getPosATL _thingX select 1,0.1]; + + _thingX setVariable ["objectBeingMoved", false]; + _thingX addAction ["Move this asset", "moveHQObject.sqf",nil,0,false,true,"","(_this == theBoss)"]; }; -/* -for "_i" from 0 to (_playerX addAction ["",""]) do - { - _playerX removeAction _i; - }; -*/ +private _actionX = _playerX addAction ["Drop Here", { + (_this select 3) params ["_thingX", "_fnc_placeObject"]; + + [_thingX, player, (_this select 2)] call _fnc_placeObject; +}, [_thingX, _fnc_placeObject],0,false,true,"",""]; -_thingX addAction ["Move this asset", "moveHQObject.sqf",nil,0,false,true,"","(_this == theBoss)"]; +waitUntil {sleep 1; (_playerX != attachedTo _thingX) or (vehicle _playerX != _playerX) or (_playerX distance2D _positionX > (_size-3)) or !([_playerX] call A3A_fnc_canFight) or (!isPlayer _playerX)}; -_thingX setPosATL [getPosATL _thingX select 0,getPosATL _thingX select 1,0]; -_thingX setVectorUp surfaceNormal position _thingX; +[_thingX, _playerX, _actionX] call _fnc_placeObject; if (vehicle _playerX != _playerX) exitWith {hint "You cannot move HQ assets while in a vehicle"}; From 328318413097473932b8dfcbf949aff8a4e3ee20 Mon Sep 17 00:00:00 2001 From: Spoffy Date: Thu, 25 Jul 2019 16:09:44 +0100 Subject: [PATCH 03/18] Fixes Arsenal duplication issue Improves notification phrasing when items not found --- .../JNA/fn_arsenal_loadInventory.sqf | 45 +++++++++++++------ 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/A3-Antistasi/JeroenArsenal/JNA/fn_arsenal_loadInventory.sqf b/A3-Antistasi/JeroenArsenal/JNA/fn_arsenal_loadInventory.sqf index b6e3af0fc6..f6835234eb 100644 --- a/A3-Antistasi/JeroenArsenal/JNA/fn_arsenal_loadInventory.sqf +++ b/A3-Antistasi/JeroenArsenal/JNA/fn_arsenal_loadInventory.sqf @@ -312,9 +312,12 @@ _backpackItems = _inventory select 2 select 1; //add containers _containers = [_uniform,_vest,_backpack]; -private _invCallArray = [{removeUniform player;player forceAddUniform _uniform;},//todo remove - {removeVest player;player addVest _vest;}, - {removeBackpackGlobal player;player addBackpack _backpack;}]; +private _removeContainerFuncs = [{removeUniform player;},{removeVest player;},{removeBackpackGlobal player;}]; +private _addContainerFuncs = [ + {player forceAddUniform (_this select 0);}, + {player addVest (_this select 0);}, + {player addBackpack (_this select 0);} + ]; { _item = _x; if!(_item isEqualTo "")then{ @@ -324,20 +327,22 @@ private _invCallArray = [{removeUniform player;player forceAddUniform _uniform;} IDC_RSCDISPLAYARSENAL_TAB_VEST, IDC_RSCDISPLAYARSENAL_TAB_BACKPACK ] select _foreachindex; - + + _addContainerFunc = (_addContainerFuncs select _foreachindex); + call { if ([_itemCounts select _index, _item] call jn_fnc_arsenal_itemCount == -1) exitWith { - call (_invCallArray select _foreachindex); + [_item] call _addContainerFunc; }; if ([_availableItems select _index, _item] call jn_fnc_arsenal_itemCount > 0) then { - call (_invCallArray select _foreachindex); + [_item] call _addContainerFunc; [_arrayTaken,_index,_item,_amount] call _addToArray; [_availableItems,_index,_item,_amount] call _removeFromArray; } else { _oldItem = [_uniform_old,_vest_old,_backpack_old] select _foreachindex; if !(_oldItem isEqualTo "") then { - call (_invCallArray select _foreachindex); + [_oldItem] call _addContainerFunc; _arrayReplaced = [_arrayReplaced,[_item,_oldItem]] call jn_fnc_arsenal_addToArray; [_arrayTaken,_index,_oldItem,1] call _addToArray; } else { @@ -407,11 +412,23 @@ private _invCallArray = [{removeUniform player;player forceAddUniform _uniform;} ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Update global ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +private _lookupConfigName = { + private _class = param [0]; + private _configs = "configName _x == _class" configClasses (configFile >> "CfgWeapons"); + if (count _configs > 0) exitWith { + [_configs select 0] call BIS_fnc_displayName; + }; + private _configs = "configName _x == _class" configClasses (configFile >> "CfgMagazines"); + if (count _configs > 0) exitWith { + [_configs select 0] call BIS_fnc_displayName; + }; + _class; +}; + _arrayAdd = [_arrayPlaced, _arrayTaken] call _subtractArrays; //remove items that where not added _arrayRemove = [_arrayTaken, _arrayPlaced] call _subtractArrays; _arrayAdd call jn_fnc_arsenal_addItem; -diag_log "adadadadada"; diag_log _arrayTaken; diag_log _arrayPlaced; _arrayRemove call jn_fnc_arsenal_removeItem; @@ -422,24 +439,24 @@ _arrayRemove call jn_fnc_arsenal_removeItem; _reportTotal = ""; _reportReplaced = ""; { - _nameNew = _x select 0; - _nameOld = _x select 1; - _reportReplaced = _reportReplaced + _nameOld + " instead of " + _nameNew + "\n"; + _nameNew = [_x select 0] call _lookupConfigName; + _nameOld = [_x select 1] call _lookupConfigName; + _reportReplaced = _reportReplaced + _nameOld + " has been kept, because there is no " + _nameNew + "\n"; } forEach _arrayReplaced; if!(_reportReplaced isEqualTo "")then{ - _reportTotal = ("I keep this items because i couldn't find the other ones:\n" + _reportReplaced+"\n"); + _reportTotal = ("These items were not in the Arsenal, so the originals have been kept:\n" + _reportReplaced+"\n"); }; _reportMissing = ""; { - _name = _x select 0; + _name = [_x select 0] call _lookupConfigName; _amount = _x select 1; _reportMissing = _reportMissing + _name + " (" + (str _amount) + "x)\n"; }forEach _arrayMissing; if!(_reportMissing isEqualTo "")then{ - _reportTotal = (_reportTotal+"I couldn't find the following items:\n" + _reportMissing+"\n"); + _reportTotal = (_reportTotal+"These items were not in the Arsenal:\n" + _reportMissing+"\n"); }; if!(_reportTotal isEqualTo "")then{ From 018f118896f54cca5bf42048119865ffc78d849a Mon Sep 17 00:00:00 2001 From: Spoffy Date: Thu, 25 Jul 2019 16:23:37 +0100 Subject: [PATCH 04/18] Fixes petros running off when HQ is built --- A3-Antistasi/buildHQ.sqf | 1 + 1 file changed, 1 insertion(+) diff --git a/A3-Antistasi/buildHQ.sqf b/A3-Antistasi/buildHQ.sqf index e454b00975..cde04ae639 100644 --- a/A3-Antistasi/buildHQ.sqf +++ b/A3-Antistasi/buildHQ.sqf @@ -8,6 +8,7 @@ if (petros != (leader group petros)) then [petros] join groupPetros; }; [petros,"remove"] remoteExec ["A3A_fnc_flagaction",0,petros]; +petros switchAction "PlayerStand"; petros disableAI "MOVE"; petros disableAI "AUTOTARGET"; respawnTeamPlayer setMarkerPos getPos petros; From 4a6bc5ab82d3c8e7e5fa4dae723d13c29fb703f3 Mon Sep 17 00:00:00 2001 From: Spoffy Date: Thu, 25 Jul 2019 17:57:07 +0100 Subject: [PATCH 05/18] Fixes civs being able to be killed without penalty --- A3-Antistasi/CREATE/CIVinit.sqf | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/A3-Antistasi/CREATE/CIVinit.sqf b/A3-Antistasi/CREATE/CIVinit.sqf index 5f5038b961..70a278cf9b 100644 --- a/A3-Antistasi/CREATE/CIVinit.sqf +++ b/A3-Antistasi/CREATE/CIVinit.sqf @@ -11,12 +11,17 @@ _unit disableAI "AUTOTARGET"; _unit addEventHandler ["HandleDamage", { + private _unit = _this select 0; _dam = _this select 2; _proy = _this select 4; + _injurer = _this select 3; + if(!isNil "_injurer" && isPlayer _injurer) then { + _unit setVariable ["injuredByPlayer", _injurer, true]; + _unit setVariable ["lastInjuredByPlayer", time, true]; + }; if (_proy == "") then { - _injurer = _this select 3; - if ((_dam > 0.95) and (!isPlayer _injurer)) then {_dam = 0.9}; + if ((_dam > 0.95) and (!isPlayer _injurer)) then {_dam = 0.9}; }; _dam } @@ -25,6 +30,12 @@ _EHkilledIdx = _unit addEventHandler ["killed", { _victim = _this select 0; _killer = _this select 1; + if (time - (_victim getVariable ["lastInjuredByPlayer", 0]) < 120) then { + _killer = _victim getVariable ["injuredByPlayer", _killer]; + }; + if (isNull _killer) then { + _killer = _victim; + }; if (_victim == _killer) then { _nul = [-1,-1,getPos _victim] remoteExec ["A3A_fnc_citySupportChange",2]; From 19f58914ccaa5383c8eda231ba3a6f6835458a9a Mon Sep 17 00:00:00 2001 From: Spoffy Date: Thu, 25 Jul 2019 18:52:55 +0100 Subject: [PATCH 06/18] Fixes killing guard dogs damaging prestige --- A3-Antistasi/AI/AAFKilledEH.sqf | 2 +- A3-Antistasi/AI/guardDog.sqf | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/A3-Antistasi/AI/AAFKilledEH.sqf b/A3-Antistasi/AI/AAFKilledEH.sqf index a9144b3e04..40aad6ac9a 100644 --- a/A3-Antistasi/AI/AAFKilledEH.sqf +++ b/A3-Antistasi/AI/AAFKilledEH.sqf @@ -50,7 +50,7 @@ if (side (group _killer) == teamPlayer) then if ((player distance _victim < 300) and (captive player)) then {player setCaptive false}; }; }; - if (count weapons _victim < 1) then + if (count weapons _victim < 1 && !(_victim getVariable ["isAnimal", false])) then { if (_sideX == Occupants) then { diff --git a/A3-Antistasi/AI/guardDog.sqf b/A3-Antistasi/AI/guardDog.sqf index 6394c43ca4..1cfa9dcad0 100644 --- a/A3-Antistasi/AI/guardDog.sqf +++ b/A3-Antistasi/AI/guardDog.sqf @@ -7,6 +7,7 @@ _dog setVariable ["BIS_fnc_animalBehaviour_disable", true]; _dog disableAI "FSM"; _dog setBehaviour "CARELESS"; _dog setRank "PRIVATE"; +_dog setVariable ["isAnimal", true, true]; while {alive _dog} do { From f035370befbb611b7fab213cebf7a2cf2c126e42 Mon Sep 17 00:00:00 2001 From: Mocksybren <38662261+Mocksybren@users.noreply.github.com> Date: Sat, 27 Jul 2019 10:58:18 +0200 Subject: [PATCH 07/18] removing Infinite TNT No more Suicide cars everywhere --- A3-Antistasi/initVar.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/A3-Antistasi/initVar.sqf b/A3-Antistasi/initVar.sqf index 5c2a238c30..fa784b71b3 100644 --- a/A3-Antistasi/initVar.sqf +++ b/A3-Antistasi/initVar.sqf @@ -604,7 +604,7 @@ if (!activeGREF) then { unlockedWeapons = ["LIB_PTRD","LIB_M2_Flamethrower","LIB_Binocular_GER","LIB_K98","LIB_M1895","LIB_FLARE_PISTOL"];//"LMG_03_F" unlockedRifles = ["LIB_K98"];//standard rifles for AI riflemen, medics engineers etc. are picked from this array. Add only rifles. - unlockedMagazines = ["LIB_1Rnd_145x114","LIB_M2_Flamethrower_Mag","LIB_5Rnd_792x57","LIB_Pwm","LIB_Rg42","LIB_US_TNT_4pound_mag","LIB_7Rnd_762x38","LIB_1Rnd_flare_red","LIB_1Rnd_flare_green","LIB_1Rnd_flare_white","LIB_1Rnd_flare_yellow"]; + unlockedMagazines = ["LIB_1Rnd_145x114","LIB_M2_Flamethrower_Mag","LIB_5Rnd_792x57","LIB_Pwm","LIB_Rg42","LIB_7Rnd_762x38","LIB_1Rnd_flare_red","LIB_1Rnd_flare_green","LIB_1Rnd_flare_white","LIB_1Rnd_flare_yellow"]; initialRifles = ["LIB_K98"]; unlockedAT = []; }; From 9706d974d1dc7e9fed324976808ea455ef88e7d5 Mon Sep 17 00:00:00 2001 From: Spoffy Date: Sun, 28 Jul 2019 13:12:19 +0100 Subject: [PATCH 08/18] Fixes original 1.4 saves not loading Cause is the code generating a new campaignID for an old save, causing it to no longer be able to find the old save. Defaults to "" now if no old ID can be found, meaning it should load the old save. --- A3-Antistasi/initServer.sqf | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/A3-Antistasi/initServer.sqf b/A3-Antistasi/initServer.sqf index 0173da2a2a..977d9198dc 100644 --- a/A3-Antistasi/initServer.sqf +++ b/A3-Antistasi/initServer.sqf @@ -36,14 +36,12 @@ limitedFT = if ("allowFT" call BIS_fnc_getParamValue == 1) then {true} else {fal //Load Campaign ID if resuming game if(loadLastSave) then { - campaignID = profileNameSpace getVariable ["ss_CampaignID",nil]; -}; -if(isNil "campaignID") then - { + campaignID = profileNameSpace getVariable ["ss_CampaignID",""]; +} else { campaignID = str(round((random(100000)) + random 10000)); profileNameSpace setVariable ["ss_CampaignID", campaignID]; - }; - +}; + publicVariable "campaignID"; _nul = call compile preprocessFileLineNumbers "initVar.sqf"; From c7197685cf84a586259b63d458f35ea5bcbe6bf0 Mon Sep 17 00:00:00 2001 From: Spoffy Date: Sun, 28 Jul 2019 19:35:08 +0100 Subject: [PATCH 09/18] Fixes singleplayer runtime of memberOnlyMagLimit not being defined --- A3-Antistasi/init.sqf | 1 + 1 file changed, 1 insertion(+) diff --git a/A3-Antistasi/init.sqf b/A3-Antistasi/init.sqf index f9aa8694e6..6d8822551b 100644 --- a/A3-Antistasi/init.sqf +++ b/A3-Antistasi/init.sqf @@ -47,6 +47,7 @@ if (!isMultiPlayer) then _nul = [] execVM "modBlacklist.sqf"; autoSave = false; membershipEnabled = false; + memberOnlyMagLimit = 0; switchCom = false; tkPunish = false; distanceMission = if (hasIFA) then {2000} else {4000}; From 21a7f43cef528f729ff1ecd89e6b81519431e4bc Mon Sep 17 00:00:00 2001 From: Spoffy Date: Sun, 28 Jul 2019 19:38:00 +0100 Subject: [PATCH 10/18] Fixes runtime error when code gets stuck compiling mission path --- A3-Antistasi/initVar.sqf | 1 + 1 file changed, 1 insertion(+) diff --git a/A3-Antistasi/initVar.sqf b/A3-Antistasi/initVar.sqf index fa784b71b3..432dbcdedf 100644 --- a/A3-Antistasi/initVar.sqf +++ b/A3-Antistasi/initVar.sqf @@ -421,6 +421,7 @@ waitUntil if (scriptDone _getMissionPath) then {true} else { hint "Stuck on compiling missionPath, re-launch the mission."; + false; } }; hint "Done compiling missionPath"; From 53afb24a3be42e44957c0ea76dcba6ced1ddee7a Mon Sep 17 00:00:00 2001 From: Spoffy Date: Sun, 28 Jul 2019 20:06:54 +0100 Subject: [PATCH 11/18] Fixes singleplayer loading --- A3-Antistasi/dialogs.hpp | 2 +- A3-Antistasi/functions.hpp | 1 + A3-Antistasi/statSave/loadPreviousSession.sqf | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 A3-Antistasi/statSave/loadPreviousSession.sqf diff --git a/A3-Antistasi/dialogs.hpp b/A3-Antistasi/dialogs.hpp index 88888f5d8a..9591cb2154 100644 --- a/A3-Antistasi/dialogs.hpp +++ b/A3-Antistasi/dialogs.hpp @@ -31,7 +31,7 @@ class first_load { w = 0.175015 * safezoneW; h = 0.0560125 * safezoneH; tooltip = "Loads the previous personal session"; - action = "closeDialog 0;nul = [] execVM ""statSave\loadPlayer.sqf"";"; + action = "closeDialog 0;nul = [] spawn A3A_fnc_loadPreviousSession;"; }; class HQ_button_Gstatic: RscButton { diff --git a/A3-Antistasi/functions.hpp b/A3-Antistasi/functions.hpp index de1b114a71..57cac0350a 100644 --- a/A3-Antistasi/functions.hpp +++ b/A3-Antistasi/functions.hpp @@ -276,6 +276,7 @@ class A3A { class loadPlayer {file="statSave\loadPlayer.sqf";}; class savePlayer {file="statSave\savePlayer.sqf";}; + class loadPreviousSession {file="statSave\loadPreviousSession.sqf";}; } class Utility diff --git a/A3-Antistasi/statSave/loadPreviousSession.sqf b/A3-Antistasi/statSave/loadPreviousSession.sqf new file mode 100644 index 0000000000..0d6c95d8a3 --- /dev/null +++ b/A3-Antistasi/statSave/loadPreviousSession.sqf @@ -0,0 +1,7 @@ +if (hasInterface) then { + [] call A3A_fnc_loadPlayer; +}; + +if (!isMultiplayer) then { + [] execVM "statSave\loadServer.sqf"; +}; From e1963e97abbad2ca4d2669a34900bb0cacf49ea7 Mon Sep 17 00:00:00 2001 From: Spoffy Date: Tue, 30 Jul 2019 00:10:57 +0100 Subject: [PATCH 12/18] Adds log for when a player is saved --- A3-Antistasi/statSave/savePlayer.sqf | 1 + 1 file changed, 1 insertion(+) diff --git a/A3-Antistasi/statSave/savePlayer.sqf b/A3-Antistasi/statSave/savePlayer.sqf index b68d2e5645..845d06ea03 100644 --- a/A3-Antistasi/statSave/savePlayer.sqf +++ b/A3-Antistasi/statSave/savePlayer.sqf @@ -17,6 +17,7 @@ if (isNil "_playerId" || isNil "_playerUnit" || { isNull _playerUnit }) exitWith }; savingClient = true; +diag_log format ["[Antistasi] Saving player %1", _playerId]; private _canSaveLoadout = true; if (hasACEMedical && {[_playerUnit] call ace_medical_fnc_getUnconsciousCondition}) then From 6c349187940d7b06bebe6256e386ffcdf1031b4d Mon Sep 17 00:00:00 2001 From: Spoffy Date: Tue, 30 Jul 2019 00:13:52 +0100 Subject: [PATCH 13/18] Fix for players not saving on disconnect --- A3-Antistasi/onPlayerDisconnect.sqf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/A3-Antistasi/onPlayerDisconnect.sqf b/A3-Antistasi/onPlayerDisconnect.sqf index fca20bf7e3..aea40b2bf1 100644 --- a/A3-Antistasi/onPlayerDisconnect.sqf +++ b/A3-Antistasi/onPlayerDisconnect.sqf @@ -6,6 +6,8 @@ _owner = _this select 4; _resourcesX = 0; _hr = 0; +diag_log format ["[Antistasi] Player disconnected with id %1 and unit %2 on side %3", _uid, _unit, (side _unit)]; + if (_unit == theBoss) then { { @@ -59,7 +61,7 @@ if (_unit == theBoss) then if (group petros == group _unit) then {[] spawn A3A_fnc_buildHQ}; }; //{if (groupOwner _x ==)} forEach allGroups select {(side _x == civilian) and (!isPlayer leader _x)}; -if (side group _unit == teamPlayer) then +if (side _unit == teamPlayer) then { if ((_hr > 0) or (_resourcesX > 0)) then {[_hr,_resourcesX] spawn A3A_fnc_resourcesFIA}; if (membershipEnabled and pvpEnabled) then From ce2fed0a693274240be586a055b93c16222a0de6 Mon Sep 17 00:00:00 2001 From: Spoffy Date: Tue, 30 Jul 2019 02:32:14 +0100 Subject: [PATCH 14/18] Fix for commander being deleted early when disconnecting --- A3-Antistasi/onPlayerDisconnect.sqf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/A3-Antistasi/onPlayerDisconnect.sqf b/A3-Antistasi/onPlayerDisconnect.sqf index aea40b2bf1..11fa881279 100644 --- a/A3-Antistasi/onPlayerDisconnect.sqf +++ b/A3-Antistasi/onPlayerDisconnect.sqf @@ -17,6 +17,8 @@ if (_unit == theBoss) then { _uds = units _x; { + //Once a player has disconnected, they no longer count as a player - so isPlayer doesn't filter them out. + if (_x isEqualTo _unit) exitWith {}; if (alive _x) then { _resourcesX = _resourcesX + (server getVariable (typeOf _x)); From c72b1399ff5f7cbebf8da3ad2ed2769403420f1c Mon Sep 17 00:00:00 2001 From: Spoffy Date: Tue, 30 Jul 2019 02:37:30 +0100 Subject: [PATCH 15/18] Fixes box/flag/map not moving when placed --- A3-Antistasi/placementselection.sqf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/A3-Antistasi/placementselection.sqf b/A3-Antistasi/placementselection.sqf index 32eedb2c13..883f95d137 100644 --- a/A3-Antistasi/placementselection.sqf +++ b/A3-Antistasi/placementselection.sqf @@ -106,21 +106,21 @@ if (visiblemap) then [respawnTeamPlayer,1] remoteExec ["setMarkerAlphaLocal",[teamPlayer,civilian]]; [respawnTeamPlayer,0] remoteExec ["setMarkerAlphaLocal",[Occupants,Invaders]]; if (isMultiplayer) then {hint "Please wait while moving HQ Assets to selected position";sleep 5}; - _pos = [_positionTel, 3, getDir petros] call BIS_Fnc_relPos; - fireX setPos _pos; + private _firePos = [_positionTel, 3, getDir petros] call BIS_Fnc_relPos; + fireX setPos _firePos; _rnd = getdir Petros; if (isMultiplayer) then {sleep 5}; - _pos = [getPos fireX, 3, _rnd] call BIS_Fnc_relPos; + _pos = [_firePos, 3, _rnd] call BIS_Fnc_relPos; boxX setPos _pos; _rnd = _rnd + 45; - _pos = [getPos fireX, 3, _rnd] call BIS_Fnc_relPos; + _pos = [_firePos, 3, _rnd] call BIS_Fnc_relPos; mapX setPos _pos; - mapX setDir ([fireX, mapX] call BIS_fnc_dirTo); + mapX setDir ([_firePos, mapX] call BIS_fnc_dirTo); _rnd = _rnd + 45; - _pos = [getPos fireX, 3, _rnd] call BIS_Fnc_relPos; + _pos = [_firePos, 3, _rnd] call BIS_Fnc_relPos; flagX setPos _pos; _rnd = _rnd + 45; - _pos = [getPos fireX, 3, _rnd] call BIS_Fnc_relPos; + _pos = [_firePos, 3, _rnd] call BIS_Fnc_relPos; vehicleBox setPos _pos; if (isNil "placementDone") then {if (isMultiplayer) then {{if ((side _x == teamPlayer) or (side _x == civilian)) then {_x setPos getPos petros}} forEach playableUnits} else {theBoss setPos (getMarkerPos respawnTeamPlayer)}}; theBoss allowDamage true; From 85e6e3fa23190b0e9097244c764d8309343089cc Mon Sep 17 00:00:00 2001 From: Bob-Murphy <50651578+Bob-Murphy@users.noreply.github.com> Date: Wed, 31 Jul 2019 02:26:37 +0200 Subject: [PATCH 16/18] Version number update to 1.4c1.04 --- A3-Antistasi/Templates/A3-AA-BLUFORTemplate.Altis/mission.sqm | 2 +- A3-Antistasi/Templates/A3-AATemplate.Altis/mission.sqm | 2 +- .../A3-ArmiaKrajowaTemplate.chernarus_summer/mission.sqm | 2 +- A3-Antistasi/Templates/A3-WotPTemplate.Tanoa/mission.sqm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/A3-Antistasi/Templates/A3-AA-BLUFORTemplate.Altis/mission.sqm b/A3-Antistasi/Templates/A3-AA-BLUFORTemplate.Altis/mission.sqm index 24038fdc21..73891fc1c8 100644 --- a/A3-Antistasi/Templates/A3-AA-BLUFORTemplate.Altis/mission.sqm +++ b/A3-Antistasi/Templates/A3-AA-BLUFORTemplate.Altis/mission.sqm @@ -153,7 +153,7 @@ class Mission { class Intel { - briefingName="A3-Antistasi Altis BLUEFOR 1.4c1.03"; + briefingName="A3-Antistasi Altis BLUEFOR 1.4c1.04"; overviewText="Build FIA Army from scratch and defeat the AAF and CSAT forces in a whole map Dynamic Mission."; resistanceWest=0; startWeather=0; diff --git a/A3-Antistasi/Templates/A3-AATemplate.Altis/mission.sqm b/A3-Antistasi/Templates/A3-AATemplate.Altis/mission.sqm index e9cad0a458..c6983ddd10 100644 --- a/A3-Antistasi/Templates/A3-AATemplate.Altis/mission.sqm +++ b/A3-Antistasi/Templates/A3-AATemplate.Altis/mission.sqm @@ -161,7 +161,7 @@ class Mission { class Intel { - briefingName="A3-Antistasi Altis 1.4c1.03"; + briefingName="A3-Antistasi Altis 1.4c1.04"; overviewText="Build FIA Army from scratch and defeat the AAF and CSAT forces in a whole map Dynamic Mission."; resistanceWest=0; startWeather=0; diff --git a/A3-Antistasi/Templates/A3-ArmiaKrajowaTemplate.chernarus_summer/mission.sqm b/A3-Antistasi/Templates/A3-ArmiaKrajowaTemplate.chernarus_summer/mission.sqm index 20d98a019e..2bab9eed39 100644 --- a/A3-Antistasi/Templates/A3-ArmiaKrajowaTemplate.chernarus_summer/mission.sqm +++ b/A3-Antistasi/Templates/A3-ArmiaKrajowaTemplate.chernarus_summer/mission.sqm @@ -179,7 +179,7 @@ class Mission { class Intel { - briefingName="A3-Antistasi Armia Krajowa Chernarus 1.4c1.03"; + briefingName="A3-Antistasi Armia Krajowa Chernarus 1.4c1.04"; resistanceWest=0; timeOfChanges=1800.0002; startWeather=0.25; diff --git a/A3-Antistasi/Templates/A3-WotPTemplate.Tanoa/mission.sqm b/A3-Antistasi/Templates/A3-WotPTemplate.Tanoa/mission.sqm index 831ac0e30f..d2c36f320e 100644 --- a/A3-Antistasi/Templates/A3-WotPTemplate.Tanoa/mission.sqm +++ b/A3-Antistasi/Templates/A3-WotPTemplate.Tanoa/mission.sqm @@ -425,7 +425,7 @@ class Mission { class Intel { - briefingName="Antistasi - Warlords of the Pacific - 1.4c1.03"; + briefingName="Antistasi - Warlords of the Pacific - 1.4c1.04"; overviewText="Build a Syndikat Army from scratch and defeat NATO and CSAT forces in a persistent mission with Tanoa as AO."; resistanceWest=0; timeOfChanges=1800.0002; From 689b84218a1cf871742661a995a1df0b16a669c6 Mon Sep 17 00:00:00 2001 From: Spoffy Date: Wed, 31 Jul 2019 02:45:11 +0100 Subject: [PATCH 17/18] Adds cleaning Occupants and Invaders groups to the debugging loop --- A3-Antistasi/Debugging/spawnDebuggingLoop.sqf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/A3-Antistasi/Debugging/spawnDebuggingLoop.sqf b/A3-Antistasi/Debugging/spawnDebuggingLoop.sqf index d93d0b80db..91fa95a135 100644 --- a/A3-Antistasi/Debugging/spawnDebuggingLoop.sqf +++ b/A3-Antistasi/Debugging/spawnDebuggingLoop.sqf @@ -12,6 +12,8 @@ while {shouldRunDebuggingLoop} do { diag_log "[Antistasi] Cleaning groups"; [teamPlayer] remoteExec ["A3A_fnc_deleteEmptyGroupsOnSide", 0]; [civilian] remoteExec ["A3A_fnc_deleteEmptyGroupsOnSide", 0]; + [Occupants] remoteExec ["A3A_fnc_deleteEmptyGroupsOnSide", 0]; + [Invaders] remoteExec ["A3A_fnc_deleteEmptyGroupsOnSide", 0]; _lastGroupCleanTime = serverTime; }; From 2a51408f05370ea7c11da1493a271d687beb6c1b Mon Sep 17 00:00:00 2001 From: Spoffy Date: Wed, 31 Jul 2019 02:47:01 +0100 Subject: [PATCH 18/18] Refactors game parameters to be initialised earlier in Singleplayer Completes fix found in c719768 --- A3-Antistasi/init.sqf | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/A3-Antistasi/init.sqf b/A3-Antistasi/init.sqf index 6d8822551b..f671c0f211 100644 --- a/A3-Antistasi/init.sqf +++ b/A3-Antistasi/init.sqf @@ -6,7 +6,18 @@ if (isServer and (isNil "serverInitDone")) then {skipTime random 24}; if (!isMultiPlayer) then { + //Init server parameters gameMode = 1; + autoSave = false; + membershipEnabled = false; + memberOnlyMagLimit = 0; + switchCom = false; + tkPunish = false; + skillMult = 1; + minWeaps = 24; + civTraffic = 1; + limitedFT = false; + diag_log "Starting Antistasi SP"; call compile preprocessFileLineNumbers "initVar.sqf";//this is the file where you can modify a few things. initVar = true; @@ -45,16 +56,9 @@ if (!isMultiPlayer) then serverInitDone = true; diag_log "Antistasi SP. serverInitDone is true. Arsenal loaded"; _nul = [] execVM "modBlacklist.sqf"; - autoSave = false; - membershipEnabled = false; - memberOnlyMagLimit = 0; - switchCom = false; - tkPunish = false; + distanceMission = if (hasIFA) then {2000} else {4000}; - skillMult = 1; - minWeaps = 24; - civTraffic = 1; - limitedFT = false; + { private _index = _x call jn_fnc_arsenal_itemType; [_index,_x,-1] call jn_fnc_arsenal_addItem;