diff --git a/Code/Scripts/Escape/CivilEnemy.sqf b/Code/Scripts/Escape/CivilEnemy.sqf index 55b22a16..fe58de98 100644 --- a/Code/Scripts/Escape/CivilEnemy.sqf +++ b/Code/Scripts/Escape/CivilEnemy.sqf @@ -2,8 +2,6 @@ * Transports a group to a position with a civilian vehicle. */ -if (!isServer) exitWith {}; - private ["_referenceGroup", "_vehicle", "_fncOnUnloadGroup", "_debug"]; private ["_group", "_waypoint", "_currentEntityNo", "_destinationPos"]; private ["_fnc_GetDestinationPos"]; @@ -74,7 +72,7 @@ while {!_enemySighted} do { _waypoint setWaypointType "MOVE"; _waypoint setWaypointBehaviour "SAFE"; _waypoint setWaypointSpeed "NORMAL"; - _waypoint setWaypointStatements ["true", vehicleVarName _vehicle + " setVariable [""waypointFulfilled"", true];"]; + _waypoint setWaypointStatements ["true", "if (!local this) exitWith {}; " + vehicleVarName _vehicle + " setVariable [""waypointFulfilled"", true];"]; _waypoint setWaypointCombatMode "BLUE"; _vehicle setFuel 0.3 + random 0.6; @@ -162,7 +160,7 @@ if (count _dropPos > 0) then { _waypoint setWaypointType "MOVE"; _waypoint setWaypointBehaviour "SAFE"; _waypoint setWaypointSpeed "NORMAL"; - _waypoint setWaypointStatements ["true", vehicleVarName _truck + " setVariable [""waypointFulfilled"", true];"]; + _waypoint setWaypointStatements ["true", "if (!local this) exitWith {}; " + vehicleVarName _truck + " setVariable [""waypointFulfilled"", true];"]; _waypoint setWaypointCombatMode "BLUE"; sleep 1; diff --git a/Code/Scripts/Escape/CreateCivilEnemy.sqf b/Code/Scripts/Escape/CreateCivilEnemy.sqf index d45d776a..a576b9bd 100644 --- a/Code/Scripts/Escape/CreateCivilEnemy.sqf +++ b/Code/Scripts/Escape/CreateCivilEnemy.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - private ["_referenceGroup", "_spawnPos", "_side", "_vehicleTypes", "_unitTypes", "_enemyFrequency", "_debug"]; private ["_group","_vehicle", "_vehicleClass"]; private ["_fnc_OnDroppingGroup", "_vehicleVarNameBase", "_vehicleVarNameNo", "_vehicleVarName"]; diff --git a/Code/Scripts/Escape/CreateDropChopper.sqf b/Code/Scripts/Escape/CreateDropChopper.sqf index 74ee16f3..5b872fe6 100644 --- a/Code/Scripts/Escape/CreateDropChopper.sqf +++ b/Code/Scripts/Escape/CreateDropChopper.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - private ["_spawnPos", "_side", "_minSkill", "_maxSkill", "_onGroupDropped", "_dropUnits", "_debug", "_chopper", "_group", "_pilot", "_gunner1", "_gunner2", "_currentInstanceNo", "_crewType", "_chopperType", "_dropPosition"]; private ["_vehicleVarName"]; diff --git a/Code/Scripts/Escape/CreateMotorizedSearchGroup.sqf b/Code/Scripts/Escape/CreateMotorizedSearchGroup.sqf index ed9737c9..05269c69 100644 --- a/Code/Scripts/Escape/CreateMotorizedSearchGroup.sqf +++ b/Code/Scripts/Escape/CreateMotorizedSearchGroup.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - private ["_spawnPos", "_searchAreaMarker", "_enemyFrequency", "_minSkill", "_maxSkill", "_debug"]; private ["_group","_vehicle","_insurgentSoldier","_insurgentSoldiers", "_index", "_vehicleClass", "_vehicleMaxCargo", "_result", "_crew", "_soldiersCount", "_infantryTypes", "_infantryType"]; diff --git a/Code/Scripts/Escape/CreateReinforcementTruck.sqf b/Code/Scripts/Escape/CreateReinforcementTruck.sqf index b0ebac5e..6276a2f3 100644 --- a/Code/Scripts/Escape/CreateReinforcementTruck.sqf +++ b/Code/Scripts/Escape/CreateReinforcementTruck.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - private ["_spawnPos", "_minSkill", "_maxSkill", "_enemyFrequency", "_debug"]; private ["_group","_vehicle","_insurgentSoldier","_insurgentSoldiers", "_index", "_vehicleClass", "_vehicleMaxCargo", "_result", "_crew", "_soldiersCount", "_infantryType"]; private ["_fnc_OnDroppingGroup", "_cargoGroup", "_vehicleVarNameBase", "_vehicleVarNameNo", "_vehicleVarName"]; diff --git a/Code/Scripts/Escape/CreateSearchChopper.sqf b/Code/Scripts/Escape/CreateSearchChopper.sqf index 36a36937..aa6fcf3c 100644 --- a/Code/Scripts/Escape/CreateSearchChopper.sqf +++ b/Code/Scripts/Escape/CreateSearchChopper.sqf @@ -14,8 +14,6 @@ _debug: Optional. true if you want to monitor the chopper's different states through the player's side chat. */ -if (!isServer) exitWith {}; - private ["_homePos", "_side", "_searchAreaMarker", "_searchTimeMin", "_refuelTimeMin", "_minSkill", "_maxSkill", "_unitArray", "_debug"]; private ["_chopper", "_chopperspawn"]; private ["_vehicleVarName", "_vehicleVarNameBase", "_vehicleVarNameNo"]; diff --git a/Code/Scripts/Escape/DropChopper.sqf b/Code/Scripts/Escape/DropChopper.sqf index 6ea79d2e..0c75d315 100644 --- a/Code/Scripts/Escape/DropChopper.sqf +++ b/Code/Scripts/Escape/DropChopper.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - private ["_chopper", "_dropPosition", "_onGroupDropped", "_debug", "_group", "_waypoint", "_dropUnits"]; _chopper = _this select 0; @@ -122,14 +120,14 @@ _waypoint = _group addWaypoint [_dropPosition, 0]; _waypoint setWaypointType "MOVE"; _waypoint setWaypointBehaviour "SAFE"; _waypoint setWaypointSpeed "FULL"; -_waypoint setWaypointStatements ["true", vehicleVarName _chopper + " setVariable [""waypointFulfilled"", true];"]; +_waypoint setWaypointStatements ["true", "if (!local this) exitWith {}; " + vehicleVarName _chopper + " setVariable [""waypointFulfilled"", true];"]; _waypoint = _group addWaypoint [getPos _chopper, 0]; _waypoint setWaypointType "MOVE"; _waypoint setWaypointBehaviour "SAFE"; _waypoint setWaypointSpeed "FULL"; -_waypoint setWaypointStatements ["true", vehicleVarName _chopper + " setVariable [""missionCompleted"", true];"]; +_waypoint setWaypointStatements ["true", "if (!local this) exitWith {}; " + vehicleVarName _chopper + " setVariable [""missionCompleted"", true];"]; diff --git a/Code/Scripts/Escape/EscapeSurprises.sqf b/Code/Scripts/Escape/EscapeSurprises.sqf index dee20367..6c25cf10 100644 --- a/Code/Scripts/Escape/EscapeSurprises.sqf +++ b/Code/Scripts/Escape/EscapeSurprises.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - private ["_minEnemySkill", "_maxEnemySkill", "_debug"]; private ["_surprises", "_surprise", "_executedSurprises", "_surpriseID", "_surpriseTimeSec", "_condition", "_isExecuted", "_surpriseArgs", "_timeInSek", "_enemyFrequency", "_spawnSegment"]; diff --git a/Code/Scripts/Escape/SearchLeader.sqf b/Code/Scripts/Escape/SearchLeader.sqf index f6a3d54f..2743d822 100644 --- a/Code/Scripts/Escape/SearchLeader.sqf +++ b/Code/Scripts/Escape/SearchLeader.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - private ["_searchAreaMarkerName"]; private ["_trigger","_trigger2","_marker", "_state", "_timeUntilMarkerSizeMediumMin", "_timeUntilMarkerSizeLargeMin", "_searchStartTimeSek", "_markerState", "_lostContactTimeSek", "_maxKnowledge", "_detectedUnit"]; private ["_unitIsDetected", "_enemyUnit", "_knowledge", "_detectedUnitsPosition", "_unitThatDetected", "_unitThatDetectedPositionAccuracy", "_minTimeUntilReportToHQSec", "_maxTimeUntilReportToHQSec", "_timeUntilReportToHQSec"]; @@ -202,7 +200,7 @@ while {true} do { if (_searchAreaMarkerCreated) then { _markerState = "MEDIUM"; - _marker setMarkerSizeLocal [_searchAreaDiamMedium / 2, _searchAreaDiamMedium / 2]; + _marker setMarkerSize [_searchAreaDiamMedium / 2, _searchAreaDiamMedium / 2]; if (A3E_Debug) then { _DebugMsg = "Search area has expanded to size MEDIUM."; @@ -218,7 +216,7 @@ while {true} do { if (diag_tickTime > _lostContactTimeSek + _timeUntilMarkerSizeLargeMin * 60 && _markerState == "MEDIUM") then { if (_searchAreaMarkerCreated) then { _markerState = "LARGE"; - _marker setMarkerSizeLocal [_searchAreaDiamLarge / 2, _searchAreaDiamLarge / 2]; + _marker setMarkerSize [_searchAreaDiamLarge / 2, _searchAreaDiamLarge / 2]; if (A3E_Debug) then { _DebugMsg = "Search area has expanded to size LARGE."; @@ -256,7 +254,7 @@ while {true} do { _knownPosition setvariable["A3E_Accuracy",_unitThatDetectedPositionAccuracy,true]; _knownPosition setvariable["A3E_FirstSight",diag_tickTime,true]; [_knownPosition] spawn A3E_fnc_watchKnownPosition; - [_knownPosition] spawn a3e_fnc_OrderSearch; + [_knownPosition] remoteExec ["a3e_fnc_OrderSearch", a3e_searchTargets]; } else { _list = _detectedUnitsPosition nearObjects [_knownPositionHelperObject, _knownPositionMinDistance]; _knownPosition = (_list select 0); @@ -303,18 +301,18 @@ while {true} do { // If search area marker is not yet created, create it. if (!_searchAreaMarkerCreated) then { - _marker = createMarkerLocal [_searchAreaMarkerName, _detectedUnitsPosition]; - _marker setMarkerShapeLocal "RECTANGLE"; - _marker setMarkerSizeLocal [_searchAreaDiamSmall, _searchAreaDiamSmall]; + _marker = createMarker [_searchAreaMarkerName, _detectedUnitsPosition]; + _marker setMarkerShape "RECTANGLE"; + _marker setMarkerSize [_searchAreaDiamSmall, _searchAreaDiamSmall]; _searchAreaMarkerCreated = true; if (!A3E_Debug) then { - _marker setMarkerAlphaLocal 0; + _marker setMarkerAlpha 0; }; }; - _marker setMarkerPosLocal _detectedUnitsPosition; + _marker setMarkerPos _detectedUnitsPosition; _markerState = "SMALL"; - _marker setMarkerSizeLocal [_searchAreaDiamSmall / 2, _searchAreaDiamSmall / 2]; + _marker setMarkerSize [_searchAreaDiamSmall / 2, _searchAreaDiamSmall / 2]; if (A3E_Debug) then { _DebugMsg = name _reportingUnit + " has reported in to HQ."; diff --git a/Code/Scripts/tort/tort_DynamicWeather.sqf b/Code/Scripts/tort/tort_DynamicWeather.sqf index 51ef89b0..b9ba5f44 100644 --- a/Code/Scripts/tort/tort_DynamicWeather.sqf +++ b/Code/Scripts/tort/tort_DynamicWeather.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - /* tort_DynamicWeather Version: 1.08 diff --git a/Code/functions/AI/fn_AquaticPatrol.sqf b/Code/functions/AI/fn_AquaticPatrol.sqf index dd730916..58e65327 100644 --- a/Code/functions/AI/fn_AquaticPatrol.sqf +++ b/Code/functions/AI/fn_AquaticPatrol.sqf @@ -1,5 +1,4 @@ private["_group","_markername","_searchRange","_oncomplete","_destinationPos","_waypoint","_leader"]; -if(!isserver) exitwith {}; _group = _this select 0; _markerName = _this select 1; diff --git a/Code/functions/AI/fn_CallCAS.sqf b/Code/functions/AI/fn_CallCAS.sqf index b92a4812..e9670b6e 100644 --- a/Code/functions/AI/fn_CallCAS.sqf +++ b/Code/functions/AI/fn_CallCAS.sqf @@ -31,4 +31,4 @@ _cas setVariable ["type", selectRandom[0,0,1,2,3]]; }; _success = true; -_success; \ No newline at end of file +_success; diff --git a/Code/functions/AI/fn_ExtractionChopper.sqf b/Code/functions/AI/fn_ExtractionChopper.sqf index 1f8721b0..3a29078c 100644 --- a/Code/functions/AI/fn_ExtractionChopper.sqf +++ b/Code/functions/AI/fn_ExtractionChopper.sqf @@ -12,7 +12,7 @@ while {alive _heli && !_extract} do { _waypoint setWaypointSpeed "FULL"; _waypoint setWaypointBehaviour "CARELESS"; _waypoint setWaypointFormation "WEDGE"; - _waypoint setWaypointStatements ["true", "(vehicle this) setvariable [""State"",""Land""];"]; + _waypoint setWaypointStatements ["true", "if (!local this) exitWith {}; (vehicle this) setvariable [""State"",""Land""];"]; }; case "Approach": { systemchat "Approaching"; diff --git a/Code/functions/AI/fn_FireArtillery.sqf b/Code/functions/AI/fn_FireArtillery.sqf index e611c607..1234a4d9 100644 --- a/Code/functions/AI/fn_FireArtillery.sqf +++ b/Code/functions/AI/fn_FireArtillery.sqf @@ -37,7 +37,7 @@ _success = false; _rotation = [_position,getposATL((units _group) select 0)] call bis_fnc_DirTo; _rotation = _rotation; _fleepos = [(_pos select 0)+sin(_rotation)*2*a3e_var_artillery_fleeingDistance,(_pos select 1)+cos(_rotation)*2*a3e_var_artillery_fleeingDistance,0]; - [_group,_fleepos] spawn a3e_fnc_Flee; + [_group,_fleepos] remoteExec ["a3e_fnc_Flee", _group]; }; }; } foreach AllGroups; diff --git a/Code/functions/AI/fn_Flee.sqf b/Code/functions/AI/fn_Flee.sqf index 6139ccde..1a8196aa 100644 --- a/Code/functions/AI/fn_Flee.sqf +++ b/Code/functions/AI/fn_Flee.sqf @@ -1,5 +1,4 @@ private["_group","_targetposition","_searchRange","_oncomplete","_destinationPos","_waypoint","_homeMarker"]; -if(!isserver) exitwith {}; _group = _this select 0; _targetposition = _this select 1; diff --git a/Code/functions/AI/fn_LeafletDrone.sqf b/Code/functions/AI/fn_LeafletDrone.sqf index 9e414fe6..eccbdc6c 100644 --- a/Code/functions/AI/fn_LeafletDrone.sqf +++ b/Code/functions/AI/fn_LeafletDrone.sqf @@ -1,8 +1,6 @@ // Search Chopper v1.0 // Author: Engima of Östgöta Ops -if (!isServer) exitWith {}; - private ["_chopper", "_searchAreaMarker", "_searchTimeMin", "_refuelTimeMin", "_group", "_side", "_state", "_exitScript", "_position", "_waypoint", "_moveOutTimeSek", "_refuelStartTimeSek"]; private ["_oldGroup", "_homePos"]; @@ -66,7 +64,7 @@ while {!_exitScript} do { _waypoint setWaypointType "MOVE"; _waypoint setWaypointBehaviour "SAFE"; _waypoint setWaypointSpeed "FULL"; - _waypoint setWaypointStatements ["true", vehicleVarName _chopper + " setVariable [""waypointFulfilled"", true];"]; + _waypoint setWaypointStatements ["true", "if (!local this) exitWith {}; " + vehicleVarName _chopper + " setVariable [""waypointFulfilled"", true];"]; if (A3E_Debug) then { //"SmokeShellBlue" createVehicle _position; @@ -95,7 +93,7 @@ while {!_exitScript} do { _waypoint setWaypointSpeed "LIMITED"; //_waypoint setWaypointLoiterType "CIRCLE"; //_waypoint setWaypointLoiterRadius ((random 75) + 75); - _waypoint setWaypointStatements ["true", vehicleVarName _chopper + " setVariable [""waypointFulfilled"", true];"]; + _waypoint setWaypointStatements ["true", "if (!local this) exitWith {}; " + vehicleVarName _chopper + " setVariable [""waypointFulfilled"", true];"]; _chopper flyInHeight 25; @@ -120,7 +118,7 @@ while {!_exitScript} do { _waypoint setWaypointType "MOVE"; _waypoint setWaypointBehaviour "SAFE"; _waypoint setWaypointSpeed "NORMAL"; - _waypoint setWaypointStatements ["true", vehicleVarName _chopper + " setVariable [""waypointFulfilled"", true];"]; + _waypoint setWaypointStatements ["true", "if (!local this) exitWith {}; " + vehicleVarName _chopper + " setVariable [""waypointFulfilled"", true];"]; if (A3E_Debug) then { //"SmokeShellBlue" createVehicle _homePos; diff --git a/Code/functions/AI/fn_OrderSearch.sqf b/Code/functions/AI/fn_OrderSearch.sqf index b9aba64e..81739c4a 100644 --- a/Code/functions/AI/fn_OrderSearch.sqf +++ b/Code/functions/AI/fn_OrderSearch.sqf @@ -3,7 +3,7 @@ _position = _this select 0; { _group = _x; - if((side _group) == A3E_VAR_Side_Ind || (side _group) == A3E_VAR_Side_Opfor) then { + if(local _group && {(side _group) == A3E_VAR_Side_Ind || (side _group) == A3E_VAR_Side_Opfor}) then { if((((units _group) select 0) distance _position)=A3E_CronTimer && A3E_CronTick", "[] call a3e_fnc_chronos_run;A3E_CronTick = false;", "A3E_CronTick = true;"]; -}; \ No newline at end of file +private["_DTrg"]; +//_DTrg="EmptyDetector" createvehicle [0,0,0]; +_DTrg=createvehicle ["EmptyDetector",[0,0,0],false]; +_DTrg setTriggerArea[0,0,0,true]; +_DTrg setTriggerActivation["NONE","PRESENT",true]; +_DTrg setTriggerStatements["diag_tickTime>=A3E_CronTimer && A3E_CronTick", "[] call a3e_fnc_chronos_run;A3E_CronTick = false;", "A3E_CronTick = true;"]; diff --git a/Code/functions/Common/fn_bootstrapEscape.sqf b/Code/functions/Common/fn_bootstrapEscape.sqf index 00e0db83..aeb6ad94 100644 --- a/Code/functions/Common/fn_bootstrapEscape.sqf +++ b/Code/functions/Common/fn_bootstrapEscape.sqf @@ -3,11 +3,40 @@ diag_log "Escape: Bootstrapping mission..."; call compile preprocessFileLineNumbers "config.sqf"; call compile preprocessFileLineNumbers "Island\WorldConfig.sqf"; -if(isServer) then { +private _isHC = !isServer && {!hasInterface}; + +if (isServer) then { [] spawn a3e_fnc_missionFlow; + a3e_hcArray = entities "HeadlessClient_F"; + a3e_hcReady = +a3e_hcArray; + "a3e_hc" addPublicVariableEventHandler { + params ["", "_hc"]; + ("HC ready " + str _hc) call a3e_fnc_rptLog; + a3e_hcReady = a3e_hcReady - [_hc]; + }; + call a3e_fnc_parameterInit; +}; + +if (_isHC) then { + waitUntil {!isNil "A3E_ParamsParsed"}; +}; + +call compile preprocessFileLineNumbers "Scripts\DRN\CommonLib\CommonLib.sqf"; + +if (isServer || {_isHC}) then { + call a3e_fnc_initServerHC; +}; + +if (_isHC) then { + waituntil {!isNull player}; + a3e_hc = player; + publicVariableServer "a3e_hc"; +}; + +if (isServer) then { [] spawn a3e_fnc_initServer; - }; + if(hasInterface) then { [] spawn { titleText [localize "STR_A3E_initLocalPlayer_Loading", "BLACK",0.1]; @@ -15,4 +44,4 @@ if(hasInterface) then { sleep 2; titleFadeOut 2.0; }; -}; \ No newline at end of file +}; diff --git a/Code/functions/DRN/fn_AmbientInfantry.sqf b/Code/functions/DRN/fn_AmbientInfantry.sqf index 63054545..c94fe466 100644 --- a/Code/functions/DRN/fn_AmbientInfantry.sqf +++ b/Code/functions/DRN/fn_AmbientInfantry.sqf @@ -19,8 +19,6 @@ * Dependencies: CommonLib v1.01 */ -if (!isServer) exitWith {}; - private ["_referenceGroup", "_side", "_groupsCount", "_minSpawnDistance", "_maxSpawnDistance", "_infantryClasses", "_minSkill", "_maxSkill", "_garbageCollectDistance"]; private ["_activeGroups", "_activeUnits", "_spawnPos", "_group", "_possibleInfantryTypes", "_infantryType", "_minDistance", "_skill", "_vehicleVarName", "_factionsArray"]; private ["_minUnitsInGroup", "_maxUnitsInGroup", "_i", "_atScriptStartUp", "_currentEntityNo", "_DebugMsg", "_farAwayUnits", "_farAwayUnitsCount", "_unitsToDeleteCount", "_groupsToDeleteCount"]; diff --git a/Code/functions/DRN/fn_DepopulateAquaticPatrol.sqf b/Code/functions/DRN/fn_DepopulateAquaticPatrol.sqf index 61641b73..aca21358 100644 --- a/Code/functions/DRN/fn_DepopulateAquaticPatrol.sqf +++ b/Code/functions/DRN/fn_DepopulateAquaticPatrol.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - private ["_village", "_markerName", "_soldiers", "_soldier", "_spawned", "_damage", "_soldierObj"]; private ["_groups", "_soldierPos", "_group", "_hasScript", "_boats"]; private ["_deleteGroupDelayed","_flag"]; diff --git a/Code/functions/DRN/fn_DepopulateLocation.sqf b/Code/functions/DRN/fn_DepopulateLocation.sqf index ad8305e6..53ddd833 100644 --- a/Code/functions/DRN/fn_DepopulateLocation.sqf +++ b/Code/functions/DRN/fn_DepopulateLocation.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - private ["_location", "_markerName", "_soldierObjects", "_spawned", "_damage", "_soldier", "_script"]; _location = _this select 0; diff --git a/Code/functions/DRN/fn_DepopulateVillage.sqf b/Code/functions/DRN/fn_DepopulateVillage.sqf index 471a4806..5659753f 100644 --- a/Code/functions/DRN/fn_DepopulateVillage.sqf +++ b/Code/functions/DRN/fn_DepopulateVillage.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - private ["_village", "_markerName", "_soldiers", "_soldier", "_spawned", "_damage", "_soldierObj"]; private ["_groups", "_soldierPos", "_group", "_hasScript"]; private ["_deleteGroupDelayed"]; diff --git a/Code/functions/DRN/fn_InitAquaticPatrolMarkers.sqf b/Code/functions/DRN/fn_InitAquaticPatrolMarkers.sqf index 3327fed2..b9766228 100644 --- a/Code/functions/DRN/fn_InitAquaticPatrolMarkers.sqf +++ b/Code/functions/DRN/fn_InitAquaticPatrolMarkers.sqf @@ -1,39 +1,34 @@ +call compile preprocessFileLineNumbers ("Island\PatrolBoatMarkers.sqf"); -if (isServer) then { - call compile preprocessFileLineNumbers ("Island\PatrolBoatMarkers.sqf"); - - if(isNil "a3e_patrolBoatMarkers") exitwith { - ["Patrolboatmarkers not found!"] call BIS_fnc_error; - }; - private ["_showMarkers"]; - private ["_markerName", "_villageIndex"]; - - _showMarkers = A3E_Debug; - _villageIndex = 0; - - { - private ["_marker", "_pos", "_shape", "_dir", "_size"]; +if(isNil "a3e_patrolBoatMarkers") exitwith { + ["Patrolboatmarkers not found!"] call BIS_fnc_error; +}; +private ["_showMarkers"]; +private ["_markerName", "_villageIndex"]; - _markerName = "a3e_aquaticPatrolMarker" + str _villageIndex; +_showMarkers = A3E_Debug; +_villageIndex = 0; - _pos = _x select 0; - _dir = _x select 1; - _shape = _x select 2; - _size = _x select 3; +{ + private ["_marker", "_pos", "_shape", "_dir", "_size"]; - _marker = createMarkerLocal [_markerName, _pos]; - - if (!_showMarkers) then { - _marker setMarkerAlphaLocal 0; - }; + _markerName = "a3e_aquaticPatrolMarker" + str _villageIndex; - _marker setMarkerShapeLocal _shape; - _marker setMarkerDirLocal _dir; - _marker setMarkerSizeLocal _size; + _pos = _x select 0; + _dir = _x select 1; + _shape = _x select 2; + _size = _x select 3; - _villageIndex = _villageIndex + 1; - } foreach a3e_patrolBoatMarkers; - a3e_var_aquaticPatrolMarkersInitialized = true; -}; + _marker = createMarkerLocal [_markerName, _pos]; + + if (!_showMarkers) then { + _marker setMarkerAlphaLocal 0; + }; + _marker setMarkerShapeLocal _shape; + _marker setMarkerDirLocal _dir; + _marker setMarkerSizeLocal _size; + _villageIndex = _villageIndex + 1; +} foreach a3e_patrolBoatMarkers; +a3e_var_aquaticPatrolMarkersInitialized = true; diff --git a/Code/functions/DRN/fn_InitAquaticPatrols.sqf b/Code/functions/DRN/fn_InitAquaticPatrols.sqf index 9b5fbfee..bb25b9b7 100644 --- a/Code/functions/DRN/fn_InitAquaticPatrols.sqf +++ b/Code/functions/DRN/fn_InitAquaticPatrols.sqf @@ -1,19 +1,9 @@ -// Initialization for server -if (!isServer) exitWith {}; - private ["_referenceUnit", "_side", "_infantryClasses", "_minSkill", "_maxSkill", "_debug", "_spawnRadius", "_aquaticPatrolZonePos", "_minSoldiersPerGroup", "_maxSoldiersPerGroup", "_areaPerGroup"]; private ["_village", "_possibleInfantryTypes", "_soldierType", "_soldierCount", "_soldier", "_soldiers", "_i", "_isFaction"]; private ["_aquaticPatrolZoneNo", "_aquaticPatrolZoneSize", "_maxGroupsCount", "_groupsCount", "_groups", "_groupIndex", "_damage", "_spawned", "_soldierObj"]; private ["_script", "_skill", "_ammo", "_trigger", "_soldierPos", "_rank", "_hasScript", "_groupPos", "_roadSegments", "_roadSegment"]; private ["_message", "_aquaticPatrolZoneName", "_fnc_onSpawnGroup"]; -if (isNil "a3e_var_villageMarkersInitialized") exitWith { - [] spawn { - player sideChat "Scripts\DRN\VillageMarkers\InitVillageMarkers.sqf must be called before call to Scripts/DRN/VillagePatrols/InitVillagePatrols.sqf."; - sleep 10; - }; -}; - _referenceUnit = _this select 0; _side = _this select 1; if (count _this > 2) then {_infantryClasses = _this select 2;} else {_infantryClasses = [];}; diff --git a/Code/functions/DRN/fn_InitGuardedLocations.sqf b/Code/functions/DRN/fn_InitGuardedLocations.sqf index c7f590d7..b6b80072 100644 --- a/Code/functions/DRN/fn_InitGuardedLocations.sqf +++ b/Code/functions/DRN/fn_InitGuardedLocations.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - private ["_referenceGroup", "_locationMarkerName", "_side", "_infantryClasses", "_minSkill", "_maxSkill", "_spawnRadius", "_debug"]; private ["_locationNo", "_locationFullName", "_locationExists", "_isFaction", "_location", "_soldierType", "_soldierCount", "_soldier", "_soldiers", "_i"]; private ["_locationPos", "_minSoldierCount", "_maxSoldierCount", "_maxGroupsCount", "_possibleInfantryTypes", "_instanceNo"]; diff --git a/Code/functions/DRN/fn_InitVillageMarkers.sqf b/Code/functions/DRN/fn_InitVillageMarkers.sqf index fb41a1c1..ef188717 100644 --- a/Code/functions/DRN/fn_InitVillageMarkers.sqf +++ b/Code/functions/DRN/fn_InitVillageMarkers.sqf @@ -1,37 +1,33 @@ call compile preprocessFileLineNumbers ("Island\VillageMarkers.sqf"); -if (isServer) then { - - if(isNil "a3e_villageMarkers") exitwith { - ["Village markers not found!"] call BIS_fnc_error; - }; - private ["_showMarkers"]; - private ["_markerName", "_villageIndex"]; +if(isNil "a3e_villageMarkers") exitwith { + ["Village markers not found!"] call BIS_fnc_error; +}; +private ["_showMarkers"]; +private ["_markerName", "_villageIndex"]; - _showMarkers = A3E_Debug; - _villageIndex = 0; +_showMarkers = A3E_Debug; +_villageIndex = 0; - { - private ["_marker", "_pos", "_shape", "_dir", "_size"]; +{ + private ["_marker", "_pos", "_shape", "_dir", "_size"]; - _markerName = "drn_villageMarker" + str _villageIndex; + _markerName = "drn_villageMarker" + str _villageIndex; - _pos = _x select 0; - _dir = _x select 1; - _shape = _x select 2; - _size = _x select 3; + _pos = _x select 0; + _dir = _x select 1; + _shape = _x select 2; + _size = _x select 3; - _marker = createMarkerLocal [_markerName, _pos]; - - if (!_showMarkers) then { - _marker setMarkerAlphaLocal 0; - }; + _marker = createMarkerLocal [_markerName, _pos]; + + if (!_showMarkers) then { + _marker setMarkerAlphaLocal 0; + }; - _marker setMarkerShapeLocal _shape; - _marker setMarkerDirLocal _dir; - _marker setMarkerSizeLocal _size; + _marker setMarkerShapeLocal _shape; + _marker setMarkerDirLocal _dir; + _marker setMarkerSizeLocal _size; - _villageIndex = _villageIndex + 1; - } foreach a3e_villageMarkers; - a3e_var_villageMarkersInitialized = true; -}; + _villageIndex = _villageIndex + 1; +} foreach a3e_villageMarkers; diff --git a/Code/functions/DRN/fn_InsertionTruck.sqf b/Code/functions/DRN/fn_InsertionTruck.sqf index 1a01961d..a78ef045 100644 --- a/Code/functions/DRN/fn_InsertionTruck.sqf +++ b/Code/functions/DRN/fn_InsertionTruck.sqf @@ -9,8 +9,6 @@ * _debug: true to output debug information, else false. */ -if (!isServer) exitWith {}; - private ["_truck", "_cargoGroup", "_dropMarker", "_attackOnSight", "_fncOnUnloadGroup", "_debug"]; private ["_crewGroup", "_waypoint", "_startPos", "_cargoUnits", "_currentEntityNo", "_dropPos"]; private ["_fnc_GetDropPosition", "_fnc_ClearAllWaypoints"]; @@ -179,7 +177,7 @@ _truck setVariable ["missionCompleted", false]; _waypoint setWaypointType "MOVE"; _waypoint setWaypointBehaviour "SAFE"; _waypoint setWaypointSpeed "FULL"; - _waypoint setWaypointStatements ["true", vehicleVarName _truck + " setVariable [""missionCompleted"", true];"]; + _waypoint setWaypointStatements ["true", "if (!local this) exitWith {}; " + vehicleVarName _truck + " setVariable [""missionCompleted"", true];"]; _waypoint setWaypointCombatMode "BLUE"; while {!(_truck getVariable "missionCompleted")} do { @@ -243,7 +241,7 @@ if (count _dropPos > 0) then { _waypoint setWaypointType "MOVE"; _waypoint setWaypointBehaviour "SAFE"; _waypoint setWaypointSpeed "NORMAL"; - _waypoint setWaypointStatements ["true", vehicleVarName _truck + " setVariable [""waypointFulfilled"", true];"]; + _waypoint setWaypointStatements ["true", "if (!local this) exitWith {}; " + vehicleVarName _truck + " setVariable [""waypointFulfilled"", true];"]; _waypoint setWaypointCombatMode "BLUE"; sleep 1; diff --git a/Code/functions/DRN/fn_MilitaryTraffic.sqf b/Code/functions/DRN/fn_MilitaryTraffic.sqf index 5f9b1bd0..3e0b76eb 100644 --- a/Code/functions/DRN/fn_MilitaryTraffic.sqf +++ b/Code/functions/DRN/fn_MilitaryTraffic.sqf @@ -100,7 +100,7 @@ if (isNil "drn_fnc_MilitaryTraffic_MoveVehicle") then { _waypoint setWaypointBehaviour "SAFE"; _waypoint setWaypointSpeed _speed; _waypoint setWaypointCompletionRadius 10; - _waypoint setWaypointStatements ["true", "_nil = [" + vehicleVarName _vehicle + ", [], " + str _debug + "] spawn drn_fnc_MilitaryTraffic_MoveVehicle;"]; + _waypoint setWaypointStatements ["true", "if (!local this) exitWith {}; private _nil = [" + vehicleVarName _vehicle + ", [], " + str _debug + "] spawn drn_fnc_MilitaryTraffic_MoveVehicle;"]; }; }; diff --git a/Code/functions/DRN/fn_MotorizedSearchGroup.sqf b/Code/functions/DRN/fn_MotorizedSearchGroup.sqf index 0334de2b..39dd97dc 100644 --- a/Code/functions/DRN/fn_MotorizedSearchGroup.sqf +++ b/Code/functions/DRN/fn_MotorizedSearchGroup.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - private ["_vehicle", "_searchAreaMarker"]; private ["_maxStationaryTimeSec", "_maxWalkDistanceMeters", "_state", "_searchAreaExists", "_shownMissingSearchAreaMsg", "_searchGroupExists", "_destinationPos", "_group", "_soldiers"]; private ["_side", "_garbageGroup", "_lastPos", "_stationaryTimeSec", "_useVehicle", "_enemyPos", "_enemySighted", "_waypoint", "_currentEntityNo"]; diff --git a/Code/functions/DRN/fn_MoveInfantryGroup.sqf b/Code/functions/DRN/fn_MoveInfantryGroup.sqf index 206cb8e5..101cd520 100644 --- a/Code/functions/DRN/fn_MoveInfantryGroup.sqf +++ b/Code/functions/DRN/fn_MoveInfantryGroup.sqf @@ -1,4 +1,3 @@ -if (!isServer) exitWith {}; //This file is obsolete now! private ["_unit", "_debug"]; private ["_destinationPos", "_worldSizeX", "_worldSizeY", "_group"]; @@ -27,4 +26,4 @@ _waypoint setWaypointBehaviour "SAFE"; _waypoint setWaypointSpeed "LIMITED"; _waypoint setWaypointFormation _formation; _waypoint setWaypointCompletionRadius 10; -_waypoint setWaypointStatements ["true", "_nil = [" + vehicleVarName _unit + ", " + str _debug + "] execVM ""Scripts\DRN\AmbientInfantry\MoveInfantryGroup.sqf"";"]; +_waypoint setWaypointStatements ["true", "if (!local this) exitWith {}; private _nil = [" + vehicleVarName _unit + ", " + str _debug + "] execVM ""Scripts\DRN\AmbientInfantry\MoveInfantryGroup.sqf"";"]; diff --git a/Code/functions/DRN/fn_MoveVehicle.sqf b/Code/functions/DRN/fn_MoveVehicle.sqf index cd92a63b..366cae6e 100644 --- a/Code/functions/DRN/fn_MoveVehicle.sqf +++ b/Code/functions/DRN/fn_MoveVehicle.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - private ["_vehicle", "_firstDestinationPos", "_debug"]; private ["_speed", "_roadSegments", "_destinationSegment"]; private ["_destinationPos"]; @@ -52,6 +50,6 @@ _waypoint = group _vehicle addWaypoint [_destinationPos, 10]; _waypoint setWaypointBehaviour "SAFE"; _waypoint setWaypointSpeed _speed; _waypoint setWaypointCompletionRadius 10; -_waypoint setWaypointStatements ["true", "_nil = [" + vehicleVarName _vehicle + ", [], " + str _debug + "] spawn drn_fnc_MoveVehicle;"]; +_waypoint setWaypointStatements ["true", "if (!local this) exitWith {}; private _nil = [" + vehicleVarName _vehicle + ", [], " + str _debug + "] spawn drn_fnc_MoveVehicle;"]; diff --git a/Code/functions/DRN/fn_PopulateAquaticPatrol.sqf b/Code/functions/DRN/fn_PopulateAquaticPatrol.sqf index 9ec444ca..bfcf1dd0 100644 --- a/Code/functions/DRN/fn_PopulateAquaticPatrol.sqf +++ b/Code/functions/DRN/fn_PopulateAquaticPatrol.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - private ["_village", "_markerName", "_debug", "_soldiers", "_soldier", "_skill", "_soldierType", "_spawned", "_damage", "_soldierObj"]; private ["_villagePos", "_script", "_groups", "_newGroup", "_soldierPos", "_rank", "_villageSide"]; diff --git a/Code/functions/DRN/fn_PopulateLocation.sqf b/Code/functions/DRN/fn_PopulateLocation.sqf index 66c93017..7f9b8b07 100644 --- a/Code/functions/DRN/fn_PopulateLocation.sqf +++ b/Code/functions/DRN/fn_PopulateLocation.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - private ["_locationObject", "_side", "_maxGroupsCount", "_debug"]; private ["_markerName", "_soldierObjects", "_skill", "_soldierType", "_spawned", "_damage", "_group"]; private ["_script", "_groupMemberCount", "_fortify", "_noFollow", "_locationPos", "_maxGroupSize"]; diff --git a/Code/functions/DRN/fn_PopulateVillage.sqf b/Code/functions/DRN/fn_PopulateVillage.sqf index 350482a1..27504b20 100644 --- a/Code/functions/DRN/fn_PopulateVillage.sqf +++ b/Code/functions/DRN/fn_PopulateVillage.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - private ["_village", "_markerName", "_debug", "_soldiers", "_soldier", "_skill", "_soldierType", "_spawned", "_damage", "_soldierObj"]; private ["_villagePos", "_script", "_groups", "_newGroup", "_soldierPos", "_rank", "_villageSide"]; diff --git a/Code/functions/DRN/fn_SearchChopper.sqf b/Code/functions/DRN/fn_SearchChopper.sqf index ba741157..b1e0cc28 100644 --- a/Code/functions/DRN/fn_SearchChopper.sqf +++ b/Code/functions/DRN/fn_SearchChopper.sqf @@ -86,7 +86,7 @@ while {!_exitScript} do { _waypoint setWaypointType "MOVE"; _waypoint setWaypointBehaviour "SAFE"; _waypoint setWaypointSpeed "FULL"; - _waypoint setWaypointStatements ["true", vehicleVarName _chopper + " setVariable [""waypointFulfilled"", true];"]; + _waypoint setWaypointStatements ["true", "if (!local this) exitWith {}; " + vehicleVarName _chopper + " setVariable [""waypointFulfilled"", true];"]; _group setCurrentWaypoint _waypoint; if (_debug) then { //"SmokeShellBlue" createVehicle _position; @@ -131,7 +131,7 @@ while {!_exitScript} do { _waypoint setWaypointType "MOVE"; _waypoint setWaypointBehaviour "SAFE"; _waypoint setWaypointSpeed "NORMAL"; - _waypoint setWaypointStatements ["true", vehicleVarName _chopper + " setVariable [""waypointFulfilled"", true];"]; + _waypoint setWaypointStatements ["true", "if (!local this) exitWith {}; " + vehicleVarName _chopper + " setVariable [""waypointFulfilled"", true];"]; _group setCurrentWaypoint _waypoint; if (_debug) then { //"SmokeShellBlue" createVehicle _homePos; diff --git a/Code/functions/DRN/fn_SearchGroup.sqf b/Code/functions/DRN/fn_SearchGroup.sqf index e8fb4575..6b18ea9e 100644 --- a/Code/functions/DRN/fn_SearchGroup.sqf +++ b/Code/functions/DRN/fn_SearchGroup.sqf @@ -9,8 +9,6 @@ * Dependencies: CommonLib v1.01 */ -if (!isServer) exitWith {}; - private ["_group", "_searchAreaMarkerName", "_firstPos", "_debug"]; private ["_position", "_side", "_state", "_moveCompleted", "_moveToFirstPos", "_exitScript", "_soldiers", "_garbageGroup", "_enemyPos", "_firstUnit", "_enemyUnit"]; private ["_subAreaSearchTimeSec", "_subAreaSize", "_defaultSearchAreaMarkerName", "_subAreaCreatedTime", "_stationaryMaxTimeSec", "_currentPos", "_lastPos", "_lastMoveTime"]; diff --git a/Code/functions/Server/fn_RunExtraction - Kopie.sqf b/Code/functions/Server/fn_RunExtraction - Kopie.sqf index 98e7bc5e..f5422fef 100644 --- a/Code/functions/Server/fn_RunExtraction - Kopie.sqf +++ b/Code/functions/Server/fn_RunExtraction - Kopie.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - params["_extractionPointNo",["_isWater",false]]; private _extraction = (A3E_ExtractionPositions select {_x select 0 == _extractionPointNo}) select 0; diff --git a/Code/functions/Server/fn_RunExtraction.sqf b/Code/functions/Server/fn_RunExtraction.sqf index 50e57995..2927d2df 100644 --- a/Code/functions/Server/fn_RunExtraction.sqf +++ b/Code/functions/Server/fn_RunExtraction.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - params["_extractionPointNo",["_isWater",false]]; private _extraction = (A3E_ExtractionPositions select {_x select 0 == _extractionPointNo}) select 0; diff --git a/Code/functions/Server/fn_RunExtractionBoat.sqf b/Code/functions/Server/fn_RunExtractionBoat.sqf index e4766100..c3dd1d0c 100644 --- a/Code/functions/Server/fn_RunExtractionBoat.sqf +++ b/Code/functions/Server/fn_RunExtractionBoat.sqf @@ -1,5 +1,3 @@ -if (!isServer) exitWith {}; - private ["_extractionPointNo"]; private ["_spawnMarkerName", "_extractionMarkerName", "_extractionMarkerName2", "_result", "_boat1", "_boat2", "_boat3", "_group1", "_group2", "_group3", "_waypoint"]; @@ -17,7 +15,7 @@ _waypoint = _group1 addWaypoint [getMarkerPos _extractionMarkerName, 0]; _waypoint setWaypointSpeed "FULL"; _waypoint setWaypointBehaviour "CARELESS"; _waypoint setWaypointFormation "WEDGE"; -_waypoint setWaypointStatements ["true", "vehicle this land 'GET IN'"]; +_waypoint setWaypointStatements ["true", "if (!local this) exitWith {}; vehicle this land 'GET IN'"]; sleep 1; @@ -42,7 +40,7 @@ _waypoint = _group2 addWaypoint [getMarkerPos _extractionMarkerName2, 0]; _waypoint setWaypointSpeed "FULL"; _waypoint setWaypointBehaviour "CARELESS"; _waypoint setWaypointFormation "WEDGE"; -_waypoint setWaypointStatements ["true", "vehicle this land 'GET IN'"]; +_waypoint setWaypointStatements ["true", "if (!local this) exitWith {}; vehicle this land 'GET IN'"]; diag_log format["fn_RunExtractionBoat: Extraction boats spawned: %1, %2 and %3",_boat1,_boat2,_boat3]; diff --git a/Code/functions/Server/fn_createAmmoDepots.sqf b/Code/functions/Server/fn_createAmmoDepots.sqf index 369f6929..fcac1c7a 100644 --- a/Code/functions/Server/fn_createAmmoDepots.sqf +++ b/Code/functions/Server/fn_createAmmoDepots.sqf @@ -1,5 +1,3 @@ -if(!isserver) exitwith {}; - private ["_positions", "_i", "_j", "_tooCloseAnotherPos", "_pos", "_countNW", "_countNE", "_countSE", "_countSW", "_isOk","_regionCount"]; _positions = []; diff --git a/Code/functions/Server/fn_createComCenters.sqf b/Code/functions/Server/fn_createComCenters.sqf index 3246428f..5c9a5fd1 100644 --- a/Code/functions/Server/fn_createComCenters.sqf +++ b/Code/functions/Server/fn_createComCenters.sqf @@ -1,5 +1,3 @@ -if(!isserver) exitwith {}; - if (isNil "A3E_MinComCenterDistance") then { A3E_MinComCenterDistance = 2000; }; diff --git a/Code/functions/Server/fn_createMortarSites.sqf b/Code/functions/Server/fn_createMortarSites.sqf index 6970539c..bff406a9 100644 --- a/Code/functions/Server/fn_createMortarSites.sqf +++ b/Code/functions/Server/fn_createMortarSites.sqf @@ -1,5 +1,3 @@ -if(!isserver) exitwith {}; - private ["_positions", "_i", "_j", "_tooCloseAnotherPos", "_pos", "_countNW", "_countNE", "_countSE", "_countSW", "_isOk","_regionCount"]; _positions = []; @@ -98,6 +96,4 @@ while {count _positions < _mortarSiteCount} do { if (_blah == 1) then { [_x] call A3E_fnc_MortarSite2; }; - private _playergroup = [] call A3E_fnc_getPlayerGroup; - [_playergroup, "A3E_MortarSitePatrolMarker", A3E_VAR_Side_Opfor, "INS", 1, 1, 2, Param_EnemySkill, Param_EnemySkill, Param_EnemySpawnDistance, false] spawn drn_fnc_InitGuardedLocations; } foreach _positions; \ No newline at end of file diff --git a/Code/functions/Server/fn_createMotorPool.sqf b/Code/functions/Server/fn_createMotorPool.sqf index ef2ea0c5..2ec536e0 100644 --- a/Code/functions/Server/fn_createMotorPool.sqf +++ b/Code/functions/Server/fn_createMotorPool.sqf @@ -1,5 +1,3 @@ -if(!isserver) exitwith {}; - private ["_mpPosition", "_createMPcount", "_newPosition", "_mapsize", "_mpc"]; _mpPosition = []; @@ -73,9 +71,6 @@ private _playergroup = [] call A3E_fnc_getPlayerGroup; a3e_arr_ComCenParkedVehicles, a3e_arr_ComCenDefence_lightArmorClasses + a3e_arr_ComCenDefence_heavyArmorClasses] call A3E_fnc_BuildMotorPool; - - [_playergroup, "A3E_MotorPoolPatrolMarker", A3E_VAR_Side_Opfor, "INS", 5, 5, 8, - Param_EnemySkill, Param_EnemySkill, Param_EnemySpawnDistance, false] spawn drn_fnc_InitGuardedLocations; } foreach _mpPosition; a3e_var_Escape_MotorPoolPositions = _mpPosition; diff --git a/Code/functions/Server/fn_initServer.sqf b/Code/functions/Server/fn_initServer.sqf index b8525e0a..a09edcf2 100644 --- a/Code/functions/Server/fn_initServer.sqf +++ b/Code/functions/Server/fn_initServer.sqf @@ -1,29 +1,5 @@ //waituntil{!isNil("BIS_fnc_init")}; -if(!isServer) exitwith {}; ["Server started."] spawn a3e_fnc_debugmsg; -if(isNil("a3e_var_commonLibInitialized")) then { - call compile preprocessFileLineNumbers "Scripts\DRN\CommonLib\CommonLib.sqf"; -}; - - -//Parse the parameters -call a3e_fnc_parameterInit; - -call compile preprocessFileLineNumbers "Scripts\Escape\Functions.sqf"; -call compile preprocessFileLineNumbers "Scripts\Escape\AIskills.sqf"; - -if(!isNil("Param_Debug")) then { - if((Param_Debug)==0 && !(missionNamespace getVariable ["a3e_debug_overwrite",false])) then { - A3E_Debug = false; - } else { - A3E_Debug = true; - ["Debug mode active!."] spawn a3e_fnc_debugmsg; - }; -} else { - A3E_Debug = true; - ["Warning! Debug was set to true because of missing param!."] spawn a3e_fnc_debugmsg; -}; -publicVariable "A3E_Debug"; //ACE Revive AT_Revive_Camera = Param_ReviveView; //Needs to be stored on server now @@ -43,13 +19,11 @@ publicVariable "ACE_MedicalServer"; //############## -private ["_villagePatrolSpawnArea","_EnemyCount","_enemyMinSkill", "_enemyMaxSkill", "_searchChopperSearchTimeMin", "_searchChopperRefuelTimeMin", "_enemySpawnDistance", "_playerGroup", "_enemyFrequency", "_scriptHandle"]; +private ["_EnemyCount","_enemyMinSkill", "_enemyMaxSkill", "_searchChopperSearchTimeMin", "_searchChopperRefuelTimeMin", "_enemySpawnDistance", "_playerGroup", "_enemyFrequency"]; _enemyFrequency = (Param_EnemyFrequency); _enemySpawnDistance = (Param_EnemySpawnDistance); -[_enemyFrequency] call compile preprocessFileLineNumbers "Units\UnitClasses.sqf"; - // prison is created locally, clients need flag texture path publicVariable "A3E_VAR_Flag_Ind"; @@ -107,7 +81,6 @@ publicVariable "a3e_var_Escape_hoursSkipped"; setTimeMultiplier Param_TimeMultiplier; -call compile preprocessFileLineNumbers ("Island\CommunicationCenterMarkers.sqf"); // Game Control Variables, do not edit! @@ -147,10 +120,6 @@ _searchChopperSearchTimeMin = (5 + random 10); _searchChopperRefuelTimeMin = (5 + random 10); -_villagePatrolSpawnArea = (Param_VillageSpawnCount); - -drn_searchAreaMarkerName = "drn_searchAreaMarker"; - // Choose a start position A3E_StartPos = [] call a3e_fnc_findFlatArea; @@ -169,46 +138,62 @@ private _backpack = [] call A3E_fnc_createStartpos; //### The following is a mission function now -[true] call drn_fnc_InitVillageMarkers; -[true] call drn_fnc_InitAquaticPatrolMarkers; - //Wait for players to actually arrive ingame. This may be a long time if server is set to persistent waituntil{uisleep 1; count([] call A3E_FNC_GetPlayers)>0}; _playerGroup = [] call A3E_fnc_GetPlayerGroup; +a3e_searchTargets = [2]; -[_enemyMinSkill, _enemyMaxSkill, _enemyFrequency, A3E_Debug] execVM "Scripts\Escape\EscapeSurprises.sqf"; +private _hasHC = !(a3e_hcArray isEqualTo []); +if (_hasHC) then { + "waiting for HC ready" call a3e_fnc_rptLog; + waitUntil {a3e_hcReady isEqualTo []}; + "all HC ready" call a3e_fnc_rptLog; + a3e_nextHC = 0; + a3e_searchTargets append a3e_hcArray; +}; +private _getExecTarget = if (!_hasHC) then { + {2} // server +} else { + { + private _next = a3e_nextHC; + a3e_nextHC = a3e_nextHC + 1; + if (a3e_nextHC >= count a3e_hcArray) then { + a3e_nextHC = 0; + }; + a3e_hcArray select _next + } +}; + +[[_enemyMinSkill, _enemyMaxSkill, _enemyFrequency, A3E_Debug], "Scripts\Escape\EscapeSurprises.sqf"] remoteExec ["execVM", call _getExecTarget]; // Initialize communication centers +call compile preprocessFileLineNumbers ("Island\CommunicationCenterMarkers.sqf"); [] call A3E_fnc_createComCenters; _EnemyCount = [3] call A3E_fnc_GetEnemyCount; -[_playerGroup, "drn_CommunicationCenterPatrolMarker", A3E_VAR_Side_Opfor, "INS", 4, _EnemyCount select 0, _EnemyCount select 1, _enemyMinSkill, _enemyMaxSkill, _enemySpawnDistance] call drn_fnc_InitGuardedLocations; - -// Initialize Motor Pools - -private _UseMotorPools = Param_MotorPools; - if (_UseMotorPools == 1) then { - [] call A3E_fnc_createMotorPool; - }; - +[_playerGroup, "drn_CommunicationCenterPatrolMarker", A3E_VAR_Side_Opfor, "INS", 4, _EnemyCount select 0, _EnemyCount select 1, _enemyMinSkill, _enemyMaxSkill, _enemySpawnDistance, A3E_Debug] call drn_fnc_InitGuardedLocations; // Initialize armor defence at communication centers - - [_playerGroup, a3e_var_Escape_communicationCenterPositions, _enemySpawnDistance, _enemyFrequency] call drn_fnc_Escape_InitializeComCenArmor; +// Initialize Motor Pools +if (Param_MotorPools == 1) then { + _EnemyCount = [2] call A3E_fnc_GetEnemyCount; + [] call A3E_fnc_createMotorPool; + [_playergroup, "A3E_MotorPoolPatrolMarker", A3E_VAR_Side_Opfor, "INS", 3, _EnemyCount select 0, _EnemyCount select 1, _enemyMinSkill, _enemyMaxSkill, _enemySpawnDistance, A3E_Debug] call drn_fnc_InitGuardedLocations; +}; // Initialize ammo depots [_enemyMinSkill, _enemyMaxSkill, _enemySpawnDistance, _playerGroup, _enemyFrequency] spawn { params ["_enemyMinSkill", "_enemyMaxSkill", "_enemySpawnDistance", "_playerGroup", "_enemyFrequency"]; - private ["_playerGroup", "_minEnemies", "_maxEnemies", "_bannedPositions", "_scriptHandle"]; + private ["_playerGroup", "_minEnemies", "_maxEnemies", "_bannedPositions"]; private _EnemyCount = [2] call A3E_fnc_GetEnemyCount; _EnemyCount params ["_minEnemies", "_maxEnemies"]; @@ -218,7 +203,7 @@ private _UseMotorPools = Param_MotorPools; [] call A3E_fnc_createAmmoDepots; - [_playerGroup, "drn_AmmoDepotPatrolMarker", A3E_VAR_Side_Opfor , "INS", 3, _minEnemies, _maxEnemies, _enemyMinSkill, _enemyMaxSkill, _enemySpawnDistance, A3E_Debug] spawn drn_fnc_InitGuardedLocations; + [_playerGroup, "drn_AmmoDepotPatrolMarker", A3E_VAR_Side_Opfor , "INS", 3, _minEnemies, _maxEnemies, _enemyMinSkill, _enemyMaxSkill, _enemySpawnDistance, A3E_Debug] call drn_fnc_InitGuardedLocations; }; @@ -229,291 +214,47 @@ private _UseMotorPools = Param_MotorPools; [_playerGroup, 750, A3E_Debug] spawn drn_fnc_CL_RunGarbageCollector; -// Run initialization for scripts that need the players to be gathered at the start position -[] spawn A3E_fnc_initVillages; - -[_enemyMinSkill, _enemyMaxSkill, _enemySpawnDistance, _enemyFrequency] spawn { - params ["_enemyMinSkill", "_enemyMaxSkill", "_enemySpawnDistance", "_enemyFrequency"]; - - private ["_fnc_OnSpawnAmbientInfantryGroup", "_fnc_OnSpawnAmbientInfantryUnit", "_scriptHandle"]; - private ["_playerGroup", "_minEnemiesPerGroup", "_maxEnemiesPerGroup", "_fnc_OnSpawnGroup"]; - - _playerGroup = [] call A3E_fnc_GetPlayerGroup; - - switch (_enemyFrequency) do - { - case 1: // 1-2 players - { - _minEnemiesPerGroup = 2; - _maxEnemiesPerGroup = 4; - }; - case 2: // 3-5 players - { - _minEnemiesPerGroup = 3; - _maxEnemiesPerGroup = 6; - }; - default // 6-8 players - { - _minEnemiesPerGroup = 4; - _maxEnemiesPerGroup = 8; - }; - }; - - _fnc_OnSpawnGroup = { - { - _x call drn_fnc_Escape_OnSpawnGeneralSoldierUnit; - } foreach units _this; - }; - - [(units _playerGroup) select 0, A3E_VAR_Side_Opfor, a3e_arr_Escape_InfantryTypes, _minEnemiesPerGroup, _maxEnemiesPerGroup, 500000, _enemyMinSkill, _enemyMaxSkill, _enemySpawnDistance + 250, _fnc_OnSpawnGroup, A3E_Debug] call drn_fnc_InitAquaticPatrols; - - - - - - // Initialize ambient infantry groups - - _fnc_OnSpawnAmbientInfantryUnit = { - _this call drn_fnc_Escape_OnSpawnGeneralSoldierUnit; - }; - - _fnc_OnSpawnAmbientInfantryGroup = { - private ["_unit", "_enemyUnit"]; - private ["_scriptHandle"]; - - _unit = units _this select 0; - - while {!(isNull _unit)} do { - _enemyUnit = _unit findNearestEnemy (getPos _unit); - if (!(isNull _enemyUnit)) exitWith { - - private _i = 0; - for [{_i = (count waypoints _this) - 1}, {_i >= 0}, {_i = _i - 1}] do { - deleteWaypoint [_this, _i]; - }; - - _scriptHandle = [_this, drn_searchAreaMarkerName, (getPos _enemyUnit), A3E_Debug] spawn drn_fnc_searchGroup; - _this setVariable ["drn_scriptHandle", _scriptHandle]; - }; - - sleep 5; - }; - }; - - private ["_infantryGroupsCount", "_radius", "_groupsPerSqkm"]; - - switch (_enemyFrequency) do - { - case 1: // 1-2 players - { - _minEnemiesPerGroup = 2; - _maxEnemiesPerGroup = 4; - _groupsPerSqkm = 1; - }; - case 2: // 3-5 players - { - _minEnemiesPerGroup = 2; - _maxEnemiesPerGroup = 8; - _groupsPerSqkm = 1.2; - }; - default // 6-8 players - { - _minEnemiesPerGroup = 2; - _maxEnemiesPerGroup = 12; - _groupsPerSqkm = 1.4; - }; - }; - - _radius = (_enemySpawnDistance + 500) / 1000; - _infantryGroupsCount = round (_groupsPerSqkm * _radius * _radius * 3.141592); - - [_playerGroup, A3E_VAR_Side_Opfor, a3e_arr_Escape_InfantryTypes, _infantryGroupsCount, _enemySpawnDistance + 200, _enemySpawnDistance + 500, _minEnemiesPerGroup, _maxEnemiesPerGroup, _enemyMinSkill, _enemyMaxSkill, 750, _fnc_OnSpawnAmbientInfantryUnit, _fnc_OnSpawnAmbientInfantryGroup, A3E_Debug] spawn drn_fnc_AmbientInfantry; - - - // Initialize the Escape military and civilian traffic - private ["_vehiclesPerSqkm", "_radius", "_vehiclesCount", "_fnc_onSpawnCivilian"]; - - // Civilian traffic - - switch (_enemyFrequency) do - { - case 1: // 1-3 players - { - _vehiclesPerSqkm = 1.6; - }; - case 2: // 4-6 players - { - _vehiclesPerSqkm = 1.4; - }; - default // 7-8 players - { - _vehiclesPerSqkm = 1.2; - }; - }; - - _radius = _enemySpawnDistance + 500; - _vehiclesCount = round (_vehiclesPerSqkm * (_radius / 1000) * (_radius / 1000) * 3.141592); - - _fnc_onSpawnCivilian = { - private ["_vehicle", "_crew"]; - _vehicle = _this select 0; - _crew = _this select 1; - //_vehiclesGroup = _result select 2; - - { - { - _x removeWeapon "ItemMap"; - } foreach _crew; // foreach crew - - _x addeventhandler ["killed",{ - if ((_this select 1) in (call A3E_fnc_GetPlayers)) then { - if((isNil("a3e_var_Escape_SearchLeader_civilianReporting"))||!a3e_var_Escape_SearchLeader_civilianReporting) then { - a3e_var_Escape_SearchLeader_civilianReporting = true; - publicVariable "a3e_var_Escape_SearchLeader_civilianReporting"; - (_this select 1) addScore -5; - } else { - (_this select 1) addScore -1; - }; - (_this select 1) addRating 1000; //Even out the minus score by killing civilians - [name (_this select 1) + " has killed a civilian."] call drn_fnc_CL_ShowCommandTextAllClients; - }; - if (isClass(configFile >> "CfgPatches" >> "ACE_Medical")) then { - _killer = (_this select 0) getVariable ["ace_medical_lastDamageSource", objNull]; - if (_killer in (call A3E_fnc_GetPlayers)) then { - if((isNil("a3e_var_Escape_SearchLeader_civilianReporting"))||!a3e_var_Escape_SearchLeader_civilianReporting) then { - a3e_var_Escape_SearchLeader_civilianReporting = true; - publicVariable "a3e_var_Escape_SearchLeader_civilianReporting"; - (_killer) addScore -5; - } else { - (_killer) addScore -1; - }; - (_killer) addRating 1000; //Even out the minus score by killing civilians - [name (_killer) + " has killed a civilian."] call drn_fnc_CL_ShowCommandTextAllClients; - }; - }; - }]; - } foreach _crew; - - clearitemcargoglobal _vehicle; - clearWeaponCargoGlobal _vehicle; - clearMagazineCargoGlobal _vehicle; - - if (random 100 < 20) then { - private ["_weaponItem"]; - - _weaponItem = selectRandom a3e_arr_CivilianCarWeapons; - - _vehicle addWeaponCargoGlobal [_weaponItem select 0, 1]; - _vehicle addMagazineCargoGlobal [_weaponItem select 1, _weaponItem select 2]; - }; - if (random 100 < 80) then { - _vehicle addItemCargoglobal ["firstaidkit", 3]; - }; - if (random 100 < 80) then { - _vehicle addMagazineCargoglobal ["smokeshellRed", 2]; - }; - if (random 100 < 80) then { - _vehicle addMagazineCargoglobal ["Chemlight_green", 5]; - }; - }; - - [civilian, [], _vehiclesCount, _enemySpawnDistance, _radius, 0.5, 0.5, _fnc_onSpawnCivilian, A3E_Debug] spawn drn_fnc_MilitaryTraffic; +remoteExec ["A3E_fnc_initVillages", call _getExecTarget]; - - // Enemy military traffic - - switch (_enemyFrequency) do - { - case 1: // 1-3 players - { - _vehiclesPerSqkm = 0.6; - }; - case 2: // 4-6 players - { - _vehiclesPerSqkm = 0.8; - }; - default // 7-8 players - { - _vehiclesPerSqkm = 1; - }; - }; - - _radius = _enemySpawnDistance + 500; - _vehiclesCount = round (_vehiclesPerSqkm * (_radius / 1000) * (_radius / 1000) * 3.141592); - [_vehiclesCount,_enemySpawnDistance,_radius,_enemyMinSkill, _enemyMaxSkill] spawn { - params["_vehiclesCount","_enemySpawnDistance","_radius","_enemyMinSkill", "_enemyMaxSkill"]; - sleep 60*15; //Wait 15 Minutes before heavy vehicles may arrive - [A3E_VAR_Side_Opfor, [], _vehiclesCount/2, _enemySpawnDistance, _radius, _enemyMinSkill, _enemyMaxSkill, drn_fnc_Escape_TrafficSearch, A3E_Debug] spawn drn_fnc_MilitaryTraffic; - [A3E_VAR_Side_Ind, [], _vehiclesCount/2, _enemySpawnDistance, _radius, _enemyMinSkill, _enemyMaxSkill, drn_fnc_Escape_TrafficSearch, A3E_Debug] spawn drn_fnc_MilitaryTraffic; - }; +[_enemyMinSkill, _enemyMaxSkill, _enemySpawnDistance, _enemyFrequency] remoteExec ["A3E_fnc_prepareAquaticPatrols", call _getExecTarget]; +[_enemyMinSkill, _enemyMaxSkill, _enemySpawnDistance, _enemyFrequency] remoteExec ["A3E_fnc_initAmbientInfantry", call _getExecTarget]; +[_enemyMinSkill, _enemyMaxSkill, _enemySpawnDistance, _enemyFrequency] remoteExec ["A3E_fnc_initMilitaryTraffic", call _getExecTarget]; - private ["_areaPerRoadBlock", "_maxEnemySpawnDistanceKm", "_roadBlockCount"]; - private ["_fnc_OnSpawnInfantryGroup", "_fnc_OnSpawnMannedVehicle"]; - - _fnc_OnSpawnInfantryGroup = {{_x call drn_fnc_Escape_OnSpawnGeneralSoldierUnit;} foreach units _this;}; - _fnc_OnSpawnMannedVehicle = {{_x call drn_fnc_Escape_OnSpawnGeneralSoldierUnit;} foreach (_this select 1);}; - - switch (_enemyFrequency) do { - case 1: { - _areaPerRoadBlock = 4.19; - }; - case 2: { - _areaPerRoadBlock = 3.14; - }; - default { - _areaPerRoadBlock = 2.5; - }; - }; - - _maxEnemySpawnDistanceKm = (_enemySpawnDistance + 500) / 1000; - _roadBlockCount = round ((_maxEnemySpawnDistanceKm * _maxEnemySpawnDistanceKm * 3.141592) / _areaPerRoadBlock); - - if (_roadBlockCount < 1) then { - _roadBlockCount = 1; - }; - //A3E_VAR_Side_Ind - [a3e_arr_Escape_InfantryTypes, a3e_arr_Escape_RoadBlock_MannedVehicleTypes, _fnc_OnSpawnInfantryGroup, _fnc_OnSpawnMannedVehicle, A3E_Debug] spawn A3E_fnc_RoadBlocks; +[_enemySpawnDistance, _enemyFrequency] remoteExec ["A3E_fnc_initCivilianTraffic", call _getExecTarget]; +[_enemySpawnDistance, _enemyFrequency] remoteExec ["A3E_fnc_initRoadBlocks", call _getExecTarget]; +[_enemyMinSkill, _enemyMaxSkill, _enemySpawnDistance, _playerGroup] spawn { + params ["_enemyMinSkill", "_enemyMaxSkill", "_enemySpawnDistance", "_playerGroup"]; //Spawn crashsites - private _crashSiteCount = ceil(random(missionNamespace getvariable["CrashSiteCountMax",3])); for "_i" from 1 to _crashSiteCount step 1 do { private _pos = [] call A3E_fnc_findFlatArea; [_pos] call A3E_fnc_crashSite; }; - switch (_enemyFrequency) do - { - case 1: // 1-2 players - { - _minEnemiesPerGroup = 2; - _maxEnemiesPerGroup = 4; - }; - case 2: // 3-5 players - { - _minEnemiesPerGroup = 3; - _maxEnemiesPerGroup = 6; - }; - default // 6-8 players - { - _minEnemiesPerGroup = 4; - _maxEnemiesPerGroup = 8; - }; - }; - - - + private _EnemyCount = [2] call A3E_fnc_GetEnemyCount; + //Spawn mortar sites [] call A3E_fnc_createMortarSites; + [_playergroup, "A3E_MortarSitePatrolMarker", A3E_VAR_Side_Opfor, "INS", 2, _EnemyCount select 0, _EnemyCount select 1, _enemyMinSkill, _enemyMaxSkill, _enemySpawnDistance, A3E_Debug] call drn_fnc_InitGuardedLocations; }; // Create search chopper - -private ["_scriptHandle"]; -_scriptHandle = [getMarkerPos "drn_searchChopperStartPosMarker", A3E_VAR_Side_Opfor, drn_searchAreaMarkerName, _searchChopperSearchTimeMin, _searchChopperRefuelTimeMin, _enemyMinSkill, _enemyMaxSkill, [], A3E_Debug] execVM "Scripts\Escape\CreateSearchChopper.sqf"; -waitUntil {scriptDone _scriptHandle}; - +[ + [ + getMarkerPos "drn_searchChopperStartPosMarker", + A3E_VAR_Side_Opfor, + drn_searchAreaMarkerName, + _searchChopperSearchTimeMin, + _searchChopperRefuelTimeMin, + _enemyMinSkill, + _enemyMaxSkill, + [], + A3E_Debug + ], + "Scripts\Escape\CreateSearchChopper.sqf" +] remoteExec ["execVM", call _getExecTarget]; // Spawn creation of start position settings [A3E_StartPos, _backPack, _enemyFrequency] spawn { diff --git a/Code/functions/Server/fn_initServerHC.sqf b/Code/functions/Server/fn_initServerHC.sqf new file mode 100644 index 00000000..57c0aeb1 --- /dev/null +++ b/Code/functions/Server/fn_initServerHC.sqf @@ -0,0 +1,10 @@ +"Server/HC init" call a3e_fnc_rptLog; + +call compile preprocessFileLineNumbers "Scripts\Escape\Functions.sqf"; +call compile preprocessFileLineNumbers "Scripts\Escape\AIskills.sqf"; + +private _enemyFrequency = Param_EnemyFrequency; + +[_enemyFrequency] call compile preprocessFileLineNumbers "Units\UnitClasses.sqf"; + +drn_searchAreaMarkerName = "drn_searchAreaMarker"; diff --git a/Code/functions/Server/fn_missionFlow.sqf b/Code/functions/Server/fn_missionFlow.sqf index 23e49e9e..07495984 100644 --- a/Code/functions/Server/fn_missionFlow.sqf +++ b/Code/functions/Server/fn_missionFlow.sqf @@ -1,61 +1,59 @@ private ["_trigger"]; -if(isServer) then { - - a3e_var_Escape_AllPlayersDead = false; - a3e_var_Escape_SearchLeader_civilianReporting = false; - a3e_var_Escape_MissionComplete = false; - a3e_var_Escape_MissionFailed_LeftBehind = false; - //Win mission server - _trigger = createTrigger["EmptyDetector", [0,0,0], false]; - _trigger setTriggerInterval 2; - _trigger setTriggerArea[0, 0, 0, false]; - _trigger setTriggerActivation["NONE", "PRESENT", false]; - _trigger setTriggerTimeout [3, 3, 3, true]; - _trigger setTriggerStatements["a3e_var_Escape_MissionComplete && !a3e_var_Escape_SearchLeader_civilianReporting && !a3e_var_Escape_AllPlayersDead", """end2"" call A3E_fnc_endMissionServer;", ""]; - - - //Mission win (but failed by killing civilians) - _trigger = createTrigger["EmptyDetector", [0,0,0], false]; - _trigger setTriggerInterval 2; - _trigger setTriggerArea[0, 0, 0, false]; - _trigger setTriggerActivation["NONE", "PRESENT", false]; - _trigger setTriggerTimeout [3, 3, 3, true]; - _trigger setTriggerStatements["a3e_var_Escape_MissionComplete && a3e_var_Escape_SearchLeader_civilianReporting && !a3e_var_Escape_AllPlayersDead", """end4"" call A3E_fnc_endMissionServer;", ""]; - - //Mission failed by MIA - _trigger = createTrigger["EmptyDetector", [0,0,0], false]; - _trigger setTriggerInterval 2; - _trigger setTriggerArea[0, 0, 0, false]; - _trigger setTriggerActivation["NONE", "PRESENT", false]; - _trigger setTriggerTimeout [3, 3, 3, true]; - _trigger setTriggerStatements["a3e_var_Escape_MissionFailed_LeftBehind && !a3e_var_Escape_AllPlayersDead", """end3"" call A3E_fnc_endMissionServer;", ""]; - - //Mission failed - _trigger = createTrigger["EmptyDetector", [0,0,0], false]; - _trigger setTriggerInterval 2; - _trigger setTriggerArea[0, 0, 0, false]; - _trigger setTriggerActivation["NONE", "PRESENT", false]; - _trigger setTriggerTimeout [2, 2, 2, true]; - _trigger setTriggerStatements["a3e_var_Escape_AllPlayersDead", """end1"" call A3E_fnc_endMissionServer;", ""]; - - _trigger = createTrigger["EmptyDetector", [0,0,0], false]; - _trigger setTriggerInterval 2; - _trigger setTriggerArea[0, 0, 0, false]; - _trigger setTriggerActivation["NONE", "PRESENT", false]; - _trigger setTriggerTimeout [0, 0, 0, false]; - _trigger setTriggerStatements["A3E_EscapeHasStarted && (({!(_x getVariable [""AT_Revive_isUnconscious"",false])} count ([] call BIS_fnc_listPlayers) == 0)||({!(_x getVariable [""ACE_Revive_isUnconscious"",false])} count ([] call BIS_fnc_listPlayers) == 0))", "a3e_var_Escape_AllPlayersDead = true;publicVariable ""a3e_var_Escape_AllPlayersDead"";[] spawn A3E_FNC_FailTasks;", ""]; - - _trigger = createTrigger["EmptyDetector", [0,0,0], false]; - _trigger setTriggerInterval 2; - _trigger setTriggerArea[0, 0, 0, false]; - _trigger setTriggerActivation["NONE", "PRESENT", false]; - _trigger setTriggerTimeout [0, 0, 0, false]; - _trigger setTriggerStatements["A3E_EscapeHasStarted && ({(_x distance A3E_StartPos) > 50} count (call BIS_fnc_listPlayers))>0", "A3E_Task_Prison_Complete = true;publicVariable ""A3E_Task_Prison_Complete"";", ""]; - - _trigger = createTrigger["EmptyDetector", [0,0,0], false]; - _trigger setTriggerInterval 2; - _trigger setTriggerArea[0, 0, 0, false]; - _trigger setTriggerActivation["NONE", "PRESENT", false]; - _trigger setTriggerTimeout [0, 0, 0, false]; - _trigger setTriggerStatements["A3E_EscapeHasStarted && ({""ItemMap"" in (assignedItems _x)} count playableunits)>0", "A3E_Task_Map_Complete = true; publicvariable ""A3E_Task_Map_Complete"";", ""]; -}; + +a3e_var_Escape_AllPlayersDead = false; +a3e_var_Escape_SearchLeader_civilianReporting = false; +a3e_var_Escape_MissionComplete = false; +a3e_var_Escape_MissionFailed_LeftBehind = false; +//Win mission server +_trigger = createTrigger["EmptyDetector", [0,0,0], false]; +_trigger setTriggerInterval 2; +_trigger setTriggerArea[0, 0, 0, false]; +_trigger setTriggerActivation["NONE", "PRESENT", false]; +_trigger setTriggerTimeout [3, 3, 3, true]; +_trigger setTriggerStatements["a3e_var_Escape_MissionComplete && !a3e_var_Escape_SearchLeader_civilianReporting && !a3e_var_Escape_AllPlayersDead", """end2"" call A3E_fnc_endMissionServer;", ""]; + + +//Mission win (but failed by killing civilians) +_trigger = createTrigger["EmptyDetector", [0,0,0], false]; +_trigger setTriggerInterval 2; +_trigger setTriggerArea[0, 0, 0, false]; +_trigger setTriggerActivation["NONE", "PRESENT", false]; +_trigger setTriggerTimeout [3, 3, 3, true]; +_trigger setTriggerStatements["a3e_var_Escape_MissionComplete && a3e_var_Escape_SearchLeader_civilianReporting && !a3e_var_Escape_AllPlayersDead", """end4"" call A3E_fnc_endMissionServer;", ""]; + +//Mission failed by MIA +_trigger = createTrigger["EmptyDetector", [0,0,0], false]; +_trigger setTriggerInterval 2; +_trigger setTriggerArea[0, 0, 0, false]; +_trigger setTriggerActivation["NONE", "PRESENT", false]; +_trigger setTriggerTimeout [3, 3, 3, true]; +_trigger setTriggerStatements["a3e_var_Escape_MissionFailed_LeftBehind && !a3e_var_Escape_AllPlayersDead", """end3"" call A3E_fnc_endMissionServer;", ""]; + +//Mission failed +_trigger = createTrigger["EmptyDetector", [0,0,0], false]; +_trigger setTriggerInterval 2; +_trigger setTriggerArea[0, 0, 0, false]; +_trigger setTriggerActivation["NONE", "PRESENT", false]; +_trigger setTriggerTimeout [2, 2, 2, true]; +_trigger setTriggerStatements["a3e_var_Escape_AllPlayersDead", """end1"" call A3E_fnc_endMissionServer;", ""]; + +_trigger = createTrigger["EmptyDetector", [0,0,0], false]; +_trigger setTriggerInterval 2; +_trigger setTriggerArea[0, 0, 0, false]; +_trigger setTriggerActivation["NONE", "PRESENT", false]; +_trigger setTriggerTimeout [0, 0, 0, false]; +_trigger setTriggerStatements["A3E_EscapeHasStarted && (({!(_x getVariable [""AT_Revive_isUnconscious"",false])} count ([] call BIS_fnc_listPlayers) == 0)||({!(_x getVariable [""ACE_Revive_isUnconscious"",false])} count ([] call BIS_fnc_listPlayers) == 0))", "a3e_var_Escape_AllPlayersDead = true;publicVariable ""a3e_var_Escape_AllPlayersDead"";[] spawn A3E_FNC_FailTasks;", ""]; + +_trigger = createTrigger["EmptyDetector", [0,0,0], false]; +_trigger setTriggerInterval 2; +_trigger setTriggerArea[0, 0, 0, false]; +_trigger setTriggerActivation["NONE", "PRESENT", false]; +_trigger setTriggerTimeout [0, 0, 0, false]; +_trigger setTriggerStatements["A3E_EscapeHasStarted && ({(_x distance A3E_StartPos) > 50} count (call BIS_fnc_listPlayers))>0", "A3E_Task_Prison_Complete = true;publicVariable ""A3E_Task_Prison_Complete"";", ""]; + +_trigger = createTrigger["EmptyDetector", [0,0,0], false]; +_trigger setTriggerInterval 2; +_trigger setTriggerArea[0, 0, 0, false]; +_trigger setTriggerActivation["NONE", "PRESENT", false]; +_trigger setTriggerTimeout [0, 0, 0, false]; +_trigger setTriggerStatements["A3E_EscapeHasStarted && ({""ItemMap"" in (assignedItems _x)} count playableunits)>0", "A3E_Task_Map_Complete = true; publicvariable ""A3E_Task_Map_Complete"";", ""]; diff --git a/Code/functions/Server/fn_parameterInit.sqf b/Code/functions/Server/fn_parameterInit.sqf index 734f4435..5c6354a8 100644 --- a/Code/functions/Server/fn_parameterInit.sqf +++ b/Code/functions/Server/fn_parameterInit.sqf @@ -90,6 +90,19 @@ for [ {_i=1}, {_i<_c}, {_i=_i+1} ] do { _paramsBriefing remoteExec ["A3E_fnc_WriteParamBriefing", 0, true]; diag_log _paramsBriefing; +if(!isNil("Param_Debug")) then { + if((Param_Debug)==0 && !(missionNamespace getVariable ["a3e_debug_overwrite",false])) then { + A3E_Debug = false; + } else { + A3E_Debug = true; + ["Debug mode active!."] spawn a3e_fnc_debugmsg; + }; +} else { + A3E_Debug = true; + ["Warning! Debug was set to true because of missing param!."] spawn a3e_fnc_debugmsg; +}; +publicVariable "A3E_Debug"; + A3E_ParamsParsed = true; publicVariable "A3E_ParamsParsed"; diff --git a/Code/functions/Spawning/fn_initAmbientInfantry.sqf b/Code/functions/Spawning/fn_initAmbientInfantry.sqf new file mode 100644 index 00000000..0f437438 --- /dev/null +++ b/Code/functions/Spawning/fn_initAmbientInfantry.sqf @@ -0,0 +1,64 @@ +diag_log "Initialize ambient infantry groups"; + +params ["_enemyMinSkill", "_enemyMaxSkill", "_enemySpawnDistance", "_enemyFrequency"]; + +private ["_fnc_OnSpawnAmbientInfantryGroup", "_fnc_OnSpawnAmbientInfantryUnit"]; +private ["_playerGroup", "_minEnemiesPerGroup", "_maxEnemiesPerGroup"]; + +_playerGroup = [] call A3E_fnc_GetPlayerGroup; + +_fnc_OnSpawnAmbientInfantryUnit = { + _this call drn_fnc_Escape_OnSpawnGeneralSoldierUnit; +}; + +_fnc_OnSpawnAmbientInfantryGroup = { + private ["_unit", "_enemyUnit"]; + private ["_scriptHandle"]; + + _unit = units _this select 0; + + while {!(isNull _unit)} do { + _enemyUnit = _unit findNearestEnemy (getPos _unit); + if (!(isNull _enemyUnit)) exitWith { + + private _i = 0; + for [{_i = (count waypoints _this) - 1}, {_i >= 0}, {_i = _i - 1}] do { + deleteWaypoint [_this, _i]; + }; + + _scriptHandle = [_this, drn_searchAreaMarkerName, (getPos _enemyUnit), A3E_Debug] spawn drn_fnc_searchGroup; + _this setVariable ["drn_scriptHandle", _scriptHandle]; + }; + + sleep 5; + }; +}; + +private ["_infantryGroupsCount", "_radius", "_groupsPerSqkm"]; + +switch (_enemyFrequency) do +{ + case 1: // 1-2 players + { + _minEnemiesPerGroup = 2; + _maxEnemiesPerGroup = 4; + _groupsPerSqkm = 1; + }; + case 2: // 3-5 players + { + _minEnemiesPerGroup = 2; + _maxEnemiesPerGroup = 8; + _groupsPerSqkm = 1.2; + }; + default // 6-8 players + { + _minEnemiesPerGroup = 2; + _maxEnemiesPerGroup = 12; + _groupsPerSqkm = 1.4; + }; +}; + +_radius = (_enemySpawnDistance + 500) / 1000; +_infantryGroupsCount = round (_groupsPerSqkm * _radius * _radius * 3.141592); + +[_playerGroup, A3E_VAR_Side_Opfor, a3e_arr_Escape_InfantryTypes, _infantryGroupsCount, _enemySpawnDistance + 200, _enemySpawnDistance + 500, _minEnemiesPerGroup, _maxEnemiesPerGroup, _enemyMinSkill, _enemyMaxSkill, 750, _fnc_OnSpawnAmbientInfantryUnit, _fnc_OnSpawnAmbientInfantryGroup, A3E_Debug] spawn drn_fnc_AmbientInfantry; diff --git a/Code/functions/Spawning/fn_initCivilianTraffic.sqf b/Code/functions/Spawning/fn_initCivilianTraffic.sqf new file mode 100644 index 00000000..4cff8176 --- /dev/null +++ b/Code/functions/Spawning/fn_initCivilianTraffic.sqf @@ -0,0 +1,81 @@ +diag_log "init Civilian traffic"; + +params ["_enemySpawnDistance", "_enemyFrequency"]; + +private ["_vehiclesPerSqkm", "_radius", "_vehiclesCount", "_fnc_onSpawnCivilian"]; + +switch (_enemyFrequency) do +{ + case 1: // 1-3 players + { + _vehiclesPerSqkm = 1.6; + }; + case 2: // 4-6 players + { + _vehiclesPerSqkm = 1.4; + }; + default // 7-8 players + { + _vehiclesPerSqkm = 1.2; + }; +}; + +_radius = _enemySpawnDistance + 500; +_vehiclesCount = round (_vehiclesPerSqkm * (_radius / 1000) * (_radius / 1000) * 3.141592); + +_fnc_onSpawnCivilian = { + private ["_vehicle", "_crew"]; + _vehicle = _this select 0; + _crew = _this select 1; + + { + _x removeWeapon "ItemMap"; + + _x addEventHandler ["killed",{ + if ( + (_this select 1) in (call A3E_fnc_GetPlayers) + || { + isClass(configFile >> "CfgPatches" >> "ACE_Medical") + && { + _killer = (_this select 0) getVariable ["ace_medical_lastDamageSource", objNull]; + _killer in (call A3E_fnc_GetPlayers) + } + } + ) then { + if(isNil("a3e_var_Escape_SearchLeader_civilianReporting") || {!a3e_var_Escape_SearchLeader_civilianReporting}) then { + a3e_var_Escape_SearchLeader_civilianReporting = true; + publicVariable "a3e_var_Escape_SearchLeader_civilianReporting"; + (_this select 1) addScore -5; + } else { + (_this select 1) addScore -1; + }; + (_this select 1) addRating 1000; //Even out the minus score by killing civilians + [name (_this select 1) + " has killed a civilian."] call drn_fnc_CL_ShowCommandTextAllClients; + }; + }]; + } foreach _crew; + + clearitemcargoglobal _vehicle; + clearWeaponCargoGlobal _vehicle; + clearMagazineCargoGlobal _vehicle; + + if (random 100 < 20) then { + private ["_weaponItem"]; + + _weaponItem = selectRandom a3e_arr_CivilianCarWeapons; + + _vehicle addWeaponCargoGlobal [_weaponItem select 0, 1]; + _vehicle addMagazineCargoGlobal [_weaponItem select 1, _weaponItem select 2]; + }; + if (random 100 < 80) then { + _vehicle addItemCargoglobal ["firstaidkit", 3]; + }; + if (random 100 < 80) then { + _vehicle addMagazineCargoglobal ["smokeshellRed", 2]; + }; + if (random 100 < 80) then { + _vehicle addMagazineCargoglobal ["Chemlight_green", 5]; + }; +}; + +[civilian, [], _vehiclesCount, _enemySpawnDistance, _radius, 0.5, 0.5, _fnc_onSpawnCivilian, A3E_Debug] spawn drn_fnc_MilitaryTraffic; diff --git a/Code/functions/Spawning/fn_initMilitaryTraffic.sqf b/Code/functions/Spawning/fn_initMilitaryTraffic.sqf new file mode 100644 index 00000000..70c339a6 --- /dev/null +++ b/Code/functions/Spawning/fn_initMilitaryTraffic.sqf @@ -0,0 +1,29 @@ +diag_log "init Enemy military traffic"; + +params ["_enemyMinSkill", "_enemyMaxSkill", "_enemySpawnDistance", "_enemyFrequency"]; + +private ["_vehiclesPerSqkm", "_radius", "_vehiclesCount"]; + +switch (_enemyFrequency) do +{ + case 1: // 1-3 players + { + _vehiclesPerSqkm = 0.6; + }; + case 2: // 4-6 players + { + _vehiclesPerSqkm = 0.8; + }; + default // 7-8 players + { + _vehiclesPerSqkm = 1; + }; +}; + +_radius = _enemySpawnDistance + 500; +_vehiclesCount = round (_vehiclesPerSqkm * (_radius / 1000) * (_radius / 1000) * 3.141592); + +sleep 60*15; //Wait 15 Minutes before heavy vehicles may arrive + +[A3E_VAR_Side_Opfor, [], _vehiclesCount/2, _enemySpawnDistance, _radius, _enemyMinSkill, _enemyMaxSkill, drn_fnc_Escape_TrafficSearch, A3E_Debug] spawn drn_fnc_MilitaryTraffic; +[A3E_VAR_Side_Ind, [], _vehiclesCount/2, _enemySpawnDistance, _radius, _enemyMinSkill, _enemyMaxSkill, drn_fnc_Escape_TrafficSearch, A3E_Debug] spawn drn_fnc_MilitaryTraffic; diff --git a/Code/functions/Spawning/fn_initRoadBlocks.sqf b/Code/functions/Spawning/fn_initRoadBlocks.sqf new file mode 100644 index 00000000..e32ebccc --- /dev/null +++ b/Code/functions/Spawning/fn_initRoadBlocks.sqf @@ -0,0 +1,30 @@ +diag_log "init RoadBlocks"; + +params ["_enemySpawnDistance", "_enemyFrequency"]; + +private ["_areaPerRoadBlock", "_maxEnemySpawnDistanceKm", "_roadBlockCount"]; +private ["_fnc_OnSpawnInfantryGroup", "_fnc_OnSpawnMannedVehicle"]; + +_fnc_OnSpawnInfantryGroup = {{_x call drn_fnc_Escape_OnSpawnGeneralSoldierUnit;} foreach units _this;}; +_fnc_OnSpawnMannedVehicle = {{_x call drn_fnc_Escape_OnSpawnGeneralSoldierUnit;} foreach (_this select 1);}; + +switch (_enemyFrequency) do { + case 1: { + _areaPerRoadBlock = 4.19; + }; + case 2: { + _areaPerRoadBlock = 3.14; + }; + default { + _areaPerRoadBlock = 2.5; + }; +}; + +_maxEnemySpawnDistanceKm = (_enemySpawnDistance + 500) / 1000; +_roadBlockCount = round ((_maxEnemySpawnDistanceKm * _maxEnemySpawnDistanceKm * 3.141592) / _areaPerRoadBlock); + +if (_roadBlockCount < 1) then { + _roadBlockCount = 1; +}; +//A3E_VAR_Side_Ind +[a3e_arr_Escape_InfantryTypes, a3e_arr_Escape_RoadBlock_MannedVehicleTypes, _fnc_OnSpawnInfantryGroup, _fnc_OnSpawnMannedVehicle, A3E_Debug] spawn A3E_fnc_RoadBlocks; diff --git a/Code/functions/Spawning/fn_initVillages.sqf b/Code/functions/Spawning/fn_initVillages.sqf index a777984d..1e4ff292 100644 --- a/Code/functions/Spawning/fn_initVillages.sqf +++ b/Code/functions/Spawning/fn_initVillages.sqf @@ -1,3 +1,7 @@ +diag_log "init Villages"; + +call drn_fnc_InitVillageMarkers; + { private _zone = _x; [_zone] call A3E_fnc_initPatrolZone; diff --git a/Code/functions/Spawning/fn_prepareAquaticPatrols.sqf b/Code/functions/Spawning/fn_prepareAquaticPatrols.sqf new file mode 100644 index 00000000..24ffd832 --- /dev/null +++ b/Code/functions/Spawning/fn_prepareAquaticPatrols.sqf @@ -0,0 +1,36 @@ +diag_log "prepare Aquatic Patrols"; + +params ["_enemyMinSkill", "_enemyMaxSkill", "_enemySpawnDistance", "_enemyFrequency"]; + +private ["_playerGroup", "_minEnemiesPerGroup", "_maxEnemiesPerGroup", "_fnc_OnSpawnGroup"]; + +call drn_fnc_InitAquaticPatrolMarkers; + +_playerGroup = [] call A3E_fnc_GetPlayerGroup; + +switch (_enemyFrequency) do +{ + case 1: // 1-2 players + { + _minEnemiesPerGroup = 2; + _maxEnemiesPerGroup = 4; + }; + case 2: // 3-5 players + { + _minEnemiesPerGroup = 3; + _maxEnemiesPerGroup = 6; + }; + default // 6-8 players + { + _minEnemiesPerGroup = 4; + _maxEnemiesPerGroup = 8; + }; +}; + +_fnc_OnSpawnGroup = { + { + _x call drn_fnc_Escape_OnSpawnGeneralSoldierUnit; + } foreach units _this; +}; + +[(units _playerGroup) select 0, A3E_VAR_Side_Opfor, a3e_arr_Escape_InfantryTypes, _minEnemiesPerGroup, _maxEnemiesPerGroup, 500000, _enemyMinSkill, _enemyMaxSkill, _enemySpawnDistance + 250, _fnc_OnSpawnGroup, A3E_Debug] call drn_fnc_InitAquaticPatrols; diff --git a/Code/functions/Templates/fn_AmmoDepot.sqf b/Code/functions/Templates/fn_AmmoDepot.sqf index 8b5959c7..7f6dc86f 100644 --- a/Code/functions/Templates/fn_AmmoDepot.sqf +++ b/Code/functions/Templates/fn_AmmoDepot.sqf @@ -1,5 +1,3 @@ - if(!isserver) exitwith {}; - private ["_middlePos", "_staticWeaponClasses", "_parkedVehicleClasses"]; private ["_object", "_pos", "_marker", "_instanceNo", "_randomNo", "_gun", "_angle", "_car"]; diff --git a/Code/functions/Templates/fn_AmmoDepot2.sqf b/Code/functions/Templates/fn_AmmoDepot2.sqf index d3b0150a..14f87647 100644 --- a/Code/functions/Templates/fn_AmmoDepot2.sqf +++ b/Code/functions/Templates/fn_AmmoDepot2.sqf @@ -3,8 +3,6 @@ // Call this script by [Position,Rotation] execVM "filename.sqf" params ["_center", "_staticWeaponClasses", "_parkedVehicleClasses"]; -if(!isserver) exitwith {}; - private ["_obj", "_pos", "_marker", "_instanceNo", "_gun", "_car"]; private _rotation = random 360; diff --git a/Code/functions/Templates/fn_AmmoDepot3.sqf b/Code/functions/Templates/fn_AmmoDepot3.sqf index 868a6d73..ec5740fe 100644 --- a/Code/functions/Templates/fn_AmmoDepot3.sqf +++ b/Code/functions/Templates/fn_AmmoDepot3.sqf @@ -3,7 +3,6 @@ // Thanks to Zec Building Compositions for helping make this :) // Relative positions exported thanks too Maca's M3Eden Editor Addon. // modified by aussie :) -if(!isserver) exitwith {}; private ["_center", "_staticWeaponClasses", "_parkedVehicleClasses"]; private ["_object", "_pos", "_marker", "_instanceNo", "_randomNo", "_gun", "_angle", "_car"]; diff --git a/Code/functions/Templates/fn_AmmoDepot4.sqf b/Code/functions/Templates/fn_AmmoDepot4.sqf index 8f821066..d0f69ebb 100644 --- a/Code/functions/Templates/fn_AmmoDepot4.sqf +++ b/Code/functions/Templates/fn_AmmoDepot4.sqf @@ -3,7 +3,6 @@ // Thanks to Zec Building Compositions for helping make this :) // Relative positions exported thanks too Maca's M3Eden Editor Addon. // modified by aussie :) -if(!isserver) exitwith {}; private ["_center", "_staticWeaponClasses", "_parkedVehicleClasses"]; private ["_obj", "_pos", "_marker", "_instanceNo", "_randomNo", "_gun", "_angle", "_car"]; diff --git a/Code/functions/Templates/fn_AmmoDepot5.sqf b/Code/functions/Templates/fn_AmmoDepot5.sqf index 77d32ec1..aafeb6b7 100644 --- a/Code/functions/Templates/fn_AmmoDepot5.sqf +++ b/Code/functions/Templates/fn_AmmoDepot5.sqf @@ -3,7 +3,6 @@ // Thanks to Zec Building Compositions for helping make this :) // Relative positions exported thanks too Maca's M3Eden Editor Addon. // modified by aussie :) -if(!isserver) exitwith {}; private ["_center", "_staticWeaponClasses", "_parkedVehicleClasses"]; private ["_obj", "_pos", "_marker", "_instanceNo", "_randomNo", "_gun", "_angle", "_car"]; diff --git a/Code/functions/Templates/fn_CrashSite.sqf b/Code/functions/Templates/fn_CrashSite.sqf index d76efd1a..7197e471 100644 --- a/Code/functions/Templates/fn_CrashSite.sqf +++ b/Code/functions/Templates/fn_CrashSite.sqf @@ -1,5 +1,3 @@ -if(!isserver) exitwith {}; - private ["_object", "_position", "_marker", "_instanceNo", "_randomNo", "_gun", "_angle", "_car","_dir","_boxpos","_boxType","_TypeOfWreck"]; _position = [_this,0] call bis_fnc_param; diff --git a/Code/include/functions.hpp b/Code/include/functions.hpp index 55d8bec8..47e96273 100644 --- a/Code/include/functions.hpp +++ b/Code/include/functions.hpp @@ -77,6 +77,7 @@ class CfgFunctions postInit = 0; // 1 to call the function upon mission start, after objects are initialized. Passed arguments are ["postInit"] recompile = 0; // 1 to recompile the function upon mission start }; + class initServerHC {}; class initPlayer {}; class watchKnownPosition {}; class parameterInit {}; @@ -105,6 +106,11 @@ class CfgFunctions class deactivatePatrolZone {}; class onEnemySoldierSpawn {}; class spawnPatrol {}; + class prepareAquaticPatrols {}; + class initAmbientInfantry {}; + class initCivilianTraffic {}; + class initMilitaryTraffic {}; + class initRoadBlocks {}; }; class Templates { diff --git a/Missions/Altis/mission.sqm b/Missions/Altis/mission.sqm index 60183bec..d716d227 100644 --- a/Missions/Altis/mission.sqm +++ b/Missions/Altis/mission.sqm @@ -42,7 +42,7 @@ class Mission }; class Groups { - items=5; + items=8; class Item0 { side="{* PLAYERSIDE *}"; @@ -263,6 +263,63 @@ class Mission }; }; }; + class Item5 + { + side="LOGIC"; + class Vehicles + { + items=1; + class Item0 + { + position[]={12941.107,27.394241,18897.008}; + id=14; + side="LOGIC"; + vehicle="HeadlessClient_F"; + player="PLAY CDG"; + leader=1; + skill=0.60000002; + text="hc1"; + }; + }; + }; + class Item6 + { + side="LOGIC"; + class Vehicles + { + items=1; + class Item0 + { + position[]={12944.58,27.228813,18896.732}; + id=15; + side="LOGIC"; + vehicle="HeadlessClient_F"; + player="PLAY CDG"; + leader=1; + skill=0.60000002; + text="hc2"; + }; + }; + }; + class Item7 + { + side="LOGIC"; + class Vehicles + { + items=1; + class Item0 + { + position[]={12948.328,27.196495,18896.598}; + id=16; + side="LOGIC"; + vehicle="HeadlessClient_F"; + player="PLAY CDG"; + leader=1; + skill=0.60000002; + text="hc3"; + }; + }; + }; }; class Markers { diff --git a/Missions/Chernarus/mission.sqm b/Missions/Chernarus/mission.sqm index 9ebbcf10..f9413033 100644 --- a/Missions/Chernarus/mission.sqm +++ b/Missions/Chernarus/mission.sqm @@ -114,7 +114,7 @@ class Mission }; class Entities { - items=140; + items=143; class Item0 { dataType="Marker"; @@ -1920,6 +1920,45 @@ class Mission type="C_Rubberboat"; atlOffset=1.7869999; }; + class Item140 + { + dataType="Logic"; + class PositionInfo + { + position[]={1745.5551,2.8046227,12217.551}; + }; + name="hc1"; + isPlayable=1; + id=416; + type="HeadlessClient_F"; + atlOffset=-4.7683716e-007; + }; + class Item141 + { + dataType="Logic"; + class PositionInfo + { + position[]={1745.54,2.570406,12219.064}; + }; + name="hc2"; + isPlayable=1; + id=417; + type="HeadlessClient_F"; + atlOffset=-4.7683716e-007; + }; + class Item142 + { + dataType="Logic"; + class PositionInfo + { + position[]={1743.7437,2.6221762,12220.216}; + angles[]={0.15475266,0,6.1550908}; + }; + name="hc3"; + isPlayable=1; + id=418; + type="HeadlessClient_F"; + }; }; }; class OutroLoose diff --git a/Missions/Chernarus_2020/mission.sqm b/Missions/Chernarus_2020/mission.sqm index f6744368..68821c3c 100644 --- a/Missions/Chernarus_2020/mission.sqm +++ b/Missions/Chernarus_2020/mission.sqm @@ -114,7 +114,7 @@ class Mission }; class Entities { - items=140; + items=143; class Item0 { dataType="Marker"; @@ -1920,6 +1920,45 @@ class Mission type="C_Rubberboat"; atlOffset=1.7869999; }; + class Item140 + { + dataType="Logic"; + class PositionInfo + { + position[]={1745.5551,2.8046227,12217.551}; + }; + name="hc1"; + isPlayable=1; + id=416; + type="HeadlessClient_F"; + atlOffset=-4.7683716e-007; + }; + class Item141 + { + dataType="Logic"; + class PositionInfo + { + position[]={1745.54,2.570406,12219.064}; + }; + name="hc2"; + isPlayable=1; + id=417; + type="HeadlessClient_F"; + atlOffset=-4.7683716e-007; + }; + class Item142 + { + dataType="Logic"; + class PositionInfo + { + position[]={1743.7437,2.6221762,12220.216}; + angles[]={0.15475266,0,6.1550908}; + }; + name="hc3"; + isPlayable=1; + id=418; + type="HeadlessClient_F"; + }; }; }; class OutroLoose diff --git a/Missions/Chernarus_Summer/mission.sqm b/Missions/Chernarus_Summer/mission.sqm index f6744368..68821c3c 100644 --- a/Missions/Chernarus_Summer/mission.sqm +++ b/Missions/Chernarus_Summer/mission.sqm @@ -114,7 +114,7 @@ class Mission }; class Entities { - items=140; + items=143; class Item0 { dataType="Marker"; @@ -1920,6 +1920,45 @@ class Mission type="C_Rubberboat"; atlOffset=1.7869999; }; + class Item140 + { + dataType="Logic"; + class PositionInfo + { + position[]={1745.5551,2.8046227,12217.551}; + }; + name="hc1"; + isPlayable=1; + id=416; + type="HeadlessClient_F"; + atlOffset=-4.7683716e-007; + }; + class Item141 + { + dataType="Logic"; + class PositionInfo + { + position[]={1745.54,2.570406,12219.064}; + }; + name="hc2"; + isPlayable=1; + id=417; + type="HeadlessClient_F"; + atlOffset=-4.7683716e-007; + }; + class Item142 + { + dataType="Logic"; + class PositionInfo + { + position[]={1743.7437,2.6221762,12220.216}; + angles[]={0.15475266,0,6.1550908}; + }; + name="hc3"; + isPlayable=1; + id=418; + type="HeadlessClient_F"; + }; }; }; class OutroLoose diff --git a/Missions/Chernarus_Winter/mission.sqm b/Missions/Chernarus_Winter/mission.sqm index c3ea17da..839e485e 100644 --- a/Missions/Chernarus_Winter/mission.sqm +++ b/Missions/Chernarus_Winter/mission.sqm @@ -114,7 +114,7 @@ class Mission }; class Entities { - items=140; + items=143; class Item0 { dataType="Marker"; @@ -1920,6 +1920,45 @@ class Mission type="C_Rubberboat"; atlOffset=1.7869999; }; + class Item140 + { + dataType="Logic"; + class PositionInfo + { + position[]={1745.5551,2.8046227,12217.551}; + }; + name="hc1"; + isPlayable=1; + id=416; + type="HeadlessClient_F"; + atlOffset=-4.7683716e-007; + }; + class Item141 + { + dataType="Logic"; + class PositionInfo + { + position[]={1745.54,2.570406,12219.064}; + }; + name="hc2"; + isPlayable=1; + id=417; + type="HeadlessClient_F"; + atlOffset=-4.7683716e-007; + }; + class Item142 + { + dataType="Logic"; + class PositionInfo + { + position[]={1743.7437,2.6221762,12220.216}; + angles[]={0.15475266,0,6.1550908}; + }; + name="hc3"; + isPlayable=1; + id=418; + type="HeadlessClient_F"; + }; }; }; class OutroLoose diff --git a/Missions/Malden/mission.sqm b/Missions/Malden/mission.sqm index f270d2c8..39bfc1c7 100644 --- a/Missions/Malden/mission.sqm +++ b/Missions/Malden/mission.sqm @@ -97,7 +97,7 @@ class Mission }; class Entities { - items=174; + items=177; class Item0 { dataType="Marker"; @@ -3147,5 +3147,44 @@ class Mission colorName="ColorPink"; id=462; }; + class Item174 + { + dataType="Logic"; + class PositionInfo + { + position[]={1745.5551,2.8046227,12217.551}; + }; + name="hc1"; + isPlayable=1; + id=416; + type="HeadlessClient_F"; + atlOffset=-4.7683716e-007; + }; + class Item175 + { + dataType="Logic"; + class PositionInfo + { + position[]={1745.54,2.570406,12219.064}; + }; + name="hc2"; + isPlayable=1; + id=417; + type="HeadlessClient_F"; + atlOffset=-4.7683716e-007; + }; + class Item176 + { + dataType="Logic"; + class PositionInfo + { + position[]={1743.7437,2.6221762,12220.216}; + angles[]={0.15475266,0,6.1550908}; + }; + name="hc3"; + isPlayable=1; + id=418; + type="HeadlessClient_F"; + }; }; }; diff --git a/Missions/Takistan/mission.sqm b/Missions/Takistan/mission.sqm index 32bf211d..18c21bbd 100644 --- a/Missions/Takistan/mission.sqm +++ b/Missions/Takistan/mission.sqm @@ -106,7 +106,7 @@ class Mission }; class Entities { - items=88; + items=91; class Item0 { dataType="Marker"; @@ -1179,6 +1179,45 @@ class Mission angle=215.87593; id=298; }; + class Item88 + { + dataType="Logic"; + class PositionInfo + { + position[]={1745.5551,2.8046227,12217.551}; + }; + name="hc1"; + isPlayable=1; + id=416; + type="HeadlessClient_F"; + atlOffset=-4.7683716e-007; + }; + class Item89 + { + dataType="Logic"; + class PositionInfo + { + position[]={1745.54,2.570406,12219.064}; + }; + name="hc2"; + isPlayable=1; + id=417; + type="HeadlessClient_F"; + atlOffset=-4.7683716e-007; + }; + class Item90 + { + dataType="Logic"; + class PositionInfo + { + position[]={1743.7437,2.6221762,12220.216}; + angles[]={0.15475266,0,6.1550908}; + }; + name="hc3"; + isPlayable=1; + id=418; + type="HeadlessClient_F"; + }; }; }; class OutroLoose diff --git a/Missions/Tanoa/mission.sqm b/Missions/Tanoa/mission.sqm index fd0ad805..5608bf8f 100644 --- a/Missions/Tanoa/mission.sqm +++ b/Missions/Tanoa/mission.sqm @@ -112,7 +112,7 @@ class Mission }; class Entities { - items=297; + items=300; class Item0 { dataType="Marker"; @@ -4771,5 +4771,44 @@ class Mission id=476; type="EmptyDetectorAreaR50"; }; + class Item297 + { + dataType="Logic"; + class PositionInfo + { + position[]={1745.5551,2.8046227,12217.551}; + }; + name="hc1"; + isPlayable=1; + id=416; + type="HeadlessClient_F"; + atlOffset=-4.7683716e-007; + }; + class Item298 + { + dataType="Logic"; + class PositionInfo + { + position[]={1745.54,2.570406,12219.064}; + }; + name="hc2"; + isPlayable=1; + id=417; + type="HeadlessClient_F"; + atlOffset=-4.7683716e-007; + }; + class Item299 + { + dataType="Logic"; + class PositionInfo + { + position[]={1743.7437,2.6221762,12220.216}; + angles[]={0.15475266,0,6.1550908}; + }; + name="hc3"; + isPlayable=1; + id=418; + type="HeadlessClient_F"; + }; }; }; diff --git a/Missions/pja310/mission.sqm b/Missions/pja310/mission.sqm index dabfeaa5..19310163 100644 --- a/Missions/pja310/mission.sqm +++ b/Missions/pja310/mission.sqm @@ -56,7 +56,7 @@ class Mission }; class Entities { - items=47; + items=50; class Item0 { dataType="Marker"; @@ -671,5 +671,44 @@ class Mission }; id=46; }; + class Item47 + { + dataType="Logic"; + class PositionInfo + { + position[]={1745.5551,2.8046227,12217.551}; + }; + name="hc1"; + isPlayable=1; + id=416; + type="HeadlessClient_F"; + atlOffset=-4.7683716e-007; + }; + class Item48 + { + dataType="Logic"; + class PositionInfo + { + position[]={1745.54,2.570406,12219.064}; + }; + name="hc2"; + isPlayable=1; + id=417; + type="HeadlessClient_F"; + atlOffset=-4.7683716e-007; + }; + class Item49 + { + dataType="Logic"; + class PositionInfo + { + position[]={1743.7437,2.6221762,12220.216}; + angles[]={0.15475266,0,6.1550908}; + }; + name="hc3"; + isPlayable=1; + id=418; + type="HeadlessClient_F"; + }; }; };