From cfc22d416527e8d88ad1f42bdf0ca9c61efe5a23 Mon Sep 17 00:00:00 2001 From: Chris Cardozo Date: Mon, 17 Jun 2019 22:52:54 -0400 Subject: [PATCH] Build 177 Implemented fixes that check when a unit gets out of a vehicle so that empty tanks and such are detected and released to players. --- .../Compiles/Functions/GMS_fnc_AIM.sqf | 3 +- .../Functions/GMS_fnc_GroupsOnAISide.sqf | 5 +- .../Functions/GMS_fnc_addItemToCrate.sqf | 9 +-- .../Compiles/Functions/GMS_fnc_allPlayers.sqf | 2 +- .../Functions/GMS_fnc_cleanEmptyGroups.sqf | 5 +- .../GMS_fnc_cleanupTemporaryMarkers.sqf | 12 +++- .../Functions/GMS_fnc_deleteMarker.sqf | 5 +- .../Functions/GMS_fnc_emptyObject.sqf | 8 ++- .../GMS_fnc_findPositionsAlongARadius.sqf | 1 - .../Compiles/Functions/GMS_fnc_findWorld.sqf | 11 +++- .../Functions/GMS_fnc_getNumberFromRange.sqf | 4 +- .../Functions/GMS_fnc_getTraderCitesEpoch.sqf | 1 + .../Compiles/Functions/GMS_fnc_isClass.sqf | 12 +++- .../GMS_fnc_loadLootItemsFromArray.sqf | 9 +-- .../Compiles/Functions/GMS_fnc_mainThread.sqf | 4 +- .../GMS_fnc_markerSetAliveAICount.sqf | 7 +-- .../GMS_fnc_missionCompleteMarker.sqf | 4 +- .../Compiles/Functions/GMS_fnc_monitorHC.sqf | 5 +- .../Compiles/Functions/GMS_fnc_msgIED.sqf | 4 +- .../Functions/GMS_fnc_playerInRange.sqf | 6 +- .../Functions/GMS_fnc_playerInRangeArray.sqf | 6 +- .../Compiles/Functions/GMS_fnc_randomPosn.sqf | 6 +- .../Functions/GMS_fnc_spawnMarker.sqf | 5 +- .../Compiles/Functions/GMS_fnc_timedOut.sqf | 4 +- .../Functions/GMS_fnc_updateCrateSignals.sqf | 10 +++- .../GMS_fnc_updateMarkerAliveCount.sqf | 3 +- .../Compiles/Functions/GMS_fnc_waitTimer.sqf | 1 - .../Compiles/Functions/GMS_passToHCs.sqf | 10 ++++ .../Groups/GMS_fnc_changeToMoveWaypoint.sqf | 1 - .../Groups/GMS_fnc_changeToSADWaypoint.sqf | 1 - .../Groups/GMS_fnc_changeToSentryWaypoint.sqf | 2 +- .../GMS_fnc_checkGroupWaypointStatus.sqf | 4 +- .../Groups/GMS_fnc_groupWaypointMonitor.sqf | 2 + .../Groups/GMS_fnc_setNextWaypoint.sqf | 1 - .../Groups/GMS_fnc_setupWaypoints.sqf | 3 +- .../GMS_fnc__loadLootItemsFromArray.sqf | 6 +- .../Missions/GMS_fnc_addItemToCrate.sqf | 4 +- .../Missions/GMS_fnc_addLiveAItoQue.sqf | 4 +- .../Missions/GMS_fnc_addMIssionToQue.sqf | 6 +- .../Compiles/Missions/GMS_fnc_addObjToQue.sqf | 4 +- .../Missions/GMS_fnc_cleanUpObjects.sqf | 3 +- .../Compiles/Missions/GMS_fnc_clearMines.sqf | 1 - .../Compiles/Missions/GMS_fnc_crateMarker.sqf | 9 +-- .../Compiles/Missions/GMS_fnc_crateMoved.sqf | 3 +- .../Compiles/Missions/GMS_fnc_endMission.sqf | 5 +- .../Compiles/Missions/GMS_fnc_fillBoxes.sqf | 5 +- .../GMS_fnc_garrisonBuilding_ATLsystem.sqf | 2 + .../GMS_fnc_garrisonBuilding_relPosSystem.sqf | 2 + .../Missions/GMS_fnc_loadMissionCrate.sqf | 2 + .../Missions/GMS_fnc_missionSpawner.sqf | 1 + .../Missions/GMS_fnc_selectAILoadout.sqf | 1 - .../Compiles/Missions/GMS_fnc_signalEnd.sqf | 1 - .../Missions/GMS_fnc_smokeAtCrates.sqf | 1 - .../Missions/GMS_fnc_spawnBaseObjects.sqf | 1 - .../GMS_fnc_spawnEmplacedWeaponArray.sqf | 5 +- ...MS_fnc_spawnGarrisonInsideBuilding_ATL.sqf | 8 +-- ...fnc_spawnGarrisonInsideBuilding_relPos.sqf | 7 +-- .../Compiles/Missions/GMS_fnc_spawnMines.sqf | 1 - .../GMS_fnc_spawnMissionVehiclePatrols.sqf | 1 - .../Missions/GMS_fnc_spawnPendingMissions.sqf | 1 - .../Missions/GMS_fnc_updateMissionQue.sqf | 1 - .../Compiles/Units/GMS_EH_AIHandleDamage.sqf | 1 - .../Compiles/Units/GMS_EH_animDone.sqf | 1 + .../Units/GMS_EH_unitWeaponReloaded.sqf | 1 - .../Units/GMS_fnc_alertNearbyGroups.sqf | 1 - .../Units/GMS_fnc_alertNearbyUnits.sqf | 1 - .../Units/GMS_fnc_alertNearbyVehicles.sqf | 1 - .../Units/GMS_fnc_allertNearestGroup.sqf | 9 +++ .../Compiles/Units/GMS_fnc_cleanupAliveAI.sqf | 4 +- .../Compiles/Units/GMS_fnc_deleteAI.sqf | 2 +- .../Units/GMS_fnc_handlePlayerUpdates.sqf | 1 - .../Compiles/Units/GMS_fnc_nextAnim.sqf | 2 + .../Compiles/Units/GMS_fnc_processAIHit.sqf | 3 +- .../Compiles/Units/GMS_fnc_processAIKill.sqf | 55 ++++++------------- .../Units/GMS_fnc_processIlleagalAIKills.sqf | 2 +- .../Units/GMS_fnc_removeAllAIgear.sqf | 5 +- .../Units/GMS_fnc_removeLaunchers.sqf | 2 +- .../Compiles/Units/GMS_fnc_removeNVG.sqf | 2 +- .../Compiles/Units/GMS_fnc_setSkill.sqf | 2 +- .../Compiles/Units/GMS_fnc_spawnParaUnits.sqf | 7 +-- .../Vehicles/GMS_EH_AIVehicle_Hit.sqf | 2 +- .../Vehicles/GMS_EH_VehicleKilled.sqf | 2 +- .../Vehicles/GMS_fnc_HandleAIVehicleHit.sqf | 4 +- .../GMS_fnc_applyVehicleDamagePenalty.sqf | 6 +- .../GMS_fnc_configureMissionVehicle.sqf | 4 +- .../Vehicles/GMS_fnc_deleteAIVehicle.sqf | 1 - .../GMS_fnc_destroyVehicleAndCrew.sqf | 1 - .../GMS_fnc_handleEmptyStaticWeapon.sqf | 3 +- .../Vehicles/GMS_fnc_processAIVehicleKill.sqf | 4 +- .../Vehicles/GMS_fnc_protectVehicle.sqf | 2 +- .../GMS_fnc_releaseVehicleToPlayers.sqf | 19 ++++--- .../Vehicles/GMS_fnc_reloadVehicleAmmo.sqf | 2 +- .../Vehicles/GMS_fnc_revealNearbyPlayers.sqf | 11 +++- .../GMS_fnc_scanForPlayersNearVehicles.sqf | 12 +++- .../GMS_fnc_searchForNearbyPlayers.sqf | 11 +++- .../Vehicles/GMS_fnc_spawnBoatPatrol.sqf | 1 - .../Vehicles/GMS_fnc_spawnMissionHeli.sqf | 9 ++- .../GMS_fnc_spawnMissionParatroops.sqf | 1 - .../GMS_fnc_spawnMissionReinforcements.sqf | 3 +- .../Vehicles/GMS_fnc_spawnReinforcements.sqf | 3 +- .../Vehicles/GMS_fnc_spawnSubPatrol.sqf | 2 +- .../Vehicles/GMS_fnc_spawnVehicle.sqf | 2 +- .../Vehicles/GMS_fnc_spawnVehiclePatrol.sqf | 17 ++++-- .../Vehicles/GMS_fnc_unlockServerVehicle.sqf | 11 ++-- .../Vehicles/GMS_fnc_vehicleMonitor.sqf | 1 + .../GMS_fnc_vehiclePlayerSensingLogic.sqf | 13 ++++- .../custom_server/Compiles/blck_functions.sqf | 8 ++- @GMS/addons/custom_server/init/build.sqf | 4 +- 108 files changed, 288 insertions(+), 234 deletions(-) diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_AIM.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_AIM.sqf index 26822e2..48c13ac 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_AIM.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_AIM.sqf @@ -1,6 +1,7 @@ //This script sends Message Information to allplayers -// Last modified 1/4/17 by Ghostrider [GRG] /* + By Ghostrider [GRG] + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_GroupsOnAISide.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_GroupsOnAISide.sqf index df41844..e34a389 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_GroupsOnAISide.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_GroupsOnAISide.sqf @@ -1,9 +1,8 @@ /* Determines the total number of spawned groups on the side used by the mission system and returns this value. + By Ghostrider [GRG] - Last updated 12/21/16 -/* - By Ghostrider [GRG] + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_addItemToCrate.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_addItemToCrate.sqf index 2b996bd..2ed4f00 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_addItemToCrate.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_addItemToCrate.sqf @@ -6,15 +6,16 @@ If _item is a string then add 1 of that item to the container. If _item is an array with 2 elements ["itemName",3] then assume that the first element is a string and is the name of the item, and the second is the number to add. if _item is an array with 3 elements ["itemName",2,6] assume that the first element is the item name (string), the second the min # to add and the third the max # to add. - by Ghostrider [GRG] - 11/14/16 - + + + By Ghostrider [GRG] + Copyright 2016 -------------------------- License -------------------------- All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. - http://creativecommons.org/licenses/by-nc-sa/4.0/ + http://creativecommons.org/licenses/by-nc-sa/4.0/ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_allPlayers.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_allPlayers.sqf index ce915e6..cc8b1eb 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_allPlayers.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_allPlayers.sqf @@ -2,7 +2,7 @@ By Ghostrider [GRG] Copyright 2016 - Last Modified 8/16/17 + -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_cleanEmptyGroups.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_cleanEmptyGroups.sqf index 68d3536..2d1ac68 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_cleanEmptyGroups.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_cleanEmptyGroups.sqf @@ -1,8 +1,9 @@ /* call as [] call blck_fnc_cleanEmptyGroups; Deletes any empty groups and thereby prevents errors resulting from createGroup returning nullGroup. - By Ghostrider [GRG] - 11/16/16 + + By Ghostrider [GRG] + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_cleanupTemporaryMarkers.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_cleanupTemporaryMarkers.sqf index 0213642..e5e4a65 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_cleanupTemporaryMarkers.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_cleanupTemporaryMarkers.sqf @@ -1,3 +1,13 @@ +/* + By Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ for "_i" from 1 to (count blck_temporaryMarkers) do { if (_i > (count blck_temporaryMarkers)) exitWith {}; @@ -11,4 +21,4 @@ for "_i" from 1 to (count blck_temporaryMarkers) do blck_temporaryMarkers pushBack _m; //diag_log format["_cleanupTemporaryMarkers: wait longer before deleting _marker = %1 | _deleteAt = %2",_marker, _deleteAt]; }; -}; \ No newline at end of file +}; diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_deleteMarker.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_deleteMarker.sqf index 37ce8fc..6e31019 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_deleteMarker.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_deleteMarker.sqf @@ -1,7 +1,6 @@ /* - Killed handler for _units - By Ghostrider-GRG- - + By Ghostrider [GRG] + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_emptyObject.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_emptyObject.sqf index 0c29335..e62ea23 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_emptyObject.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_emptyObject.sqf @@ -1,8 +1,10 @@ - /* +/* Remove all inventory from an object. - By Ghostrider-GRG- - -------------------------- + + By Ghostrider [GRG] + Copyright 2016 + -------------------------- License -------------------------- All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findPositionsAlongARadius.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findPositionsAlongARadius.sqf index 8981a69..4b2b3b3 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findPositionsAlongARadius.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findPositionsAlongARadius.sqf @@ -3,7 +3,6 @@ for ghostridergaming By Ghostrider [GRG] Copyright 2016 - Last Modified 1-22-17 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findWorld.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findWorld.sqf index 19267f1..08369fe 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findWorld.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_findWorld.sqf @@ -2,7 +2,16 @@ Determine the map name, set the map center and size, and return the map name. Trader coordinates were pulled from the config.cfg Inspired by the Vampire and DZMS - Last Modified 9/3/16 + + By Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ + -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getNumberFromRange.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getNumberFromRange.sqf index c1d2eb3..57b3d01 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getNumberFromRange.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getNumberFromRange.sqf @@ -1,6 +1,8 @@ // Last modified 8/13/17 by Ghostrider [GRG] /* + By Ghostrider [GRG] + Copyright 2016 -------------------------- License -------------------------- @@ -27,4 +29,4 @@ if (typeName _data isEqualTo "ARRAY") then _value = _data; }; }; -_value \ No newline at end of file +_value diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getTraderCitesEpoch.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getTraderCitesEpoch.sqf index e292c75..f184f49 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getTraderCitesEpoch.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_getTraderCitesEpoch.sqf @@ -1,6 +1,7 @@ // pull trader cities from config /* By Ghostrider [GRG] + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_isClass.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_isClass.sqf index b48bae2..64af3bf 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_isClass.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_isClass.sqf @@ -5,7 +5,17 @@ Parameters: _item, a string to be interrogated. Returns: true if the string is a valid classname. */ +/* + By Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ //#include "GMSCore\init\GMS_defines.hpp" "\addons\GMSCore\init\GMS_defines.hpp" params["_item"]; private _result = if ([_item] call GMS_fnc_getCfgType isEqualTo "") then {false} else {true}; -_result \ No newline at end of file +_result diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_loadLootItemsFromArray.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_loadLootItemsFromArray.sqf index 49d444e..b03acb9 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_loadLootItemsFromArray.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_loadLootItemsFromArray.sqf @@ -15,16 +15,17 @@ case 1: [["item1",...,"itemN"],6]; The script will randomly select from the array of item names 6 times and call the loot loader each time. case 2: [["item1",...,"itemN"],6, 9]; As above except that an item will be selected a minimum of 6 and maximum of 9 times. - by Ghostrider [GRG] - 8/13/17 - + + By Ghostrider [GRG] + Copyright 2016 -------------------------- License -------------------------- All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. - http://creativecommons.org/licenses/by-nc-sa/4.0/ + http://creativecommons.org/licenses/by-nc-sa/4.0/ */ + #include "\q\addons\custom_server\Configs\blck_defines.hpp"; diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf index 8c7cf75..f7f5c4b 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf @@ -1,6 +1,6 @@ /* By Ghostrider [GRG] - + Copyright 2016 -------------------------- License -------------------------- @@ -45,7 +45,7 @@ while {true} do [] call blck_fnc_scanForPlayersNearVehicles; [] call GMS_fnc_cleanupTemporaryMarkers; [] call GMS_fnc_updateCrateSignals; - //[] call blck_fnc_cleanEmptyGroups; + [] call blck_fnc_cleanEmptyGroups; _timer20sec = diag_tickTime + 20; }; if ((diag_tickTime > _timer1min)) then diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_markerSetAliveAICount.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_markerSetAliveAICount.sqf index 394d1ad..038a7e6 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_markerSetAliveAICount.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_markerSetAliveAICount.sqf @@ -1,7 +1,6 @@ /* - Killed handler for _units - By Ghostrider-GRG- - + By Ghostrider [GRG] + Copyright 2016 -------------------------- License -------------------------- @@ -21,4 +20,4 @@ _MainMarker setMarkerType "HD_Arrow"; _MainMarker setMarkerColor "ColorBlack"; _MainMarker setMarkerText format["% Alive",_count]; -//_MainMarker setMarkerDir 37; \ No newline at end of file +//_MainMarker setMarkerDir 37; diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_missionCompleteMarker.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_missionCompleteMarker.sqf index 112bb7e..91077cb 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_missionCompleteMarker.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_missionCompleteMarker.sqf @@ -1,7 +1,7 @@ /* - Killed handler for _units - By Ghostrider-GRG- + By Ghostrider [GRG] + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_monitorHC.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_monitorHC.sqf index 06db8aa..819e26a 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_monitorHC.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_monitorHC.sqf @@ -1,9 +1,8 @@ /* Check if an HC is connected and if so transfer some AI to it. + By Ghostrider [GRG] - Last modified 11-8-16 -/* - By Ghostrider [GRG] + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_msgIED.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_msgIED.sqf index f76e4e8..843b730 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_msgIED.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_msgIED.sqf @@ -1,4 +1,6 @@ /* + By Ghostrider [GRG] + Copyright 2016 -------------------------- License -------------------------- @@ -8,4 +10,4 @@ */ params["_killer"]; - [["IED","",0,0],[_killer]] call blck_fnc_MessagePlayers; \ No newline at end of file + [["IED","",0,0],[_killer]] call blck_fnc_MessagePlayers; diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_playerInRange.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_playerInRange.sqf index 27c46b5..e47cc9f 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_playerInRange.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_playerInRange.sqf @@ -1,12 +1,8 @@ ////////////////////////////////////////////////////// // Test whether one object (e.g., a player) is within a certain range of any of an array of other objects -/* - for ghostridergaming - By Ghostrider [GRG] - Copyright 2016 - Last Modified 2/24/17 /* By Ghostrider [GRG] + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_playerInRangeArray.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_playerInRangeArray.sqf index 662caf6..8f8c171 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_playerInRangeArray.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_playerInRangeArray.sqf @@ -1,12 +1,8 @@ ////////////////////////////////////////////////////// // Test whether one object (e.g., a player) is within a certain range of any of an array of other objects -/* - for ghostridergaming - By Ghostrider [GRG] - Copyright 2016 - Last Modified 2/24/17 /* By Ghostrider [GRG] + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_randomPosn.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_randomPosn.sqf index 4bab831..fdd23f3 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_randomPosn.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_randomPosn.sqf @@ -1,12 +1,8 @@ ////////////////////////////////////////////// // returns a position array at random position within a radius of _range relative to _pos. -/* - for ghostridergaming - By Ghostrider [GRG] - Copyright 2016 - Last Modified 8-13-16 /* By Ghostrider [GRG] + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMarker.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMarker.sqf index dfb31aa..3286f3b 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMarker.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_spawnMarker.sqf @@ -1,7 +1,6 @@ /* - Killed handler for _units - By Ghostrider-GRG- - + By Ghostrider [GRG] + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_timedOut.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_timedOut.sqf index 885e02d..61bedf0 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_timedOut.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_timedOut.sqf @@ -1,10 +1,10 @@ ////////////////////////////////////////////////////// // test if a timeout condition exists. -// by Ghostrider [GRG] -// Last modified 1/22/17 // [_startTime] call blck_fnc_timedOut // Returns true (timed out) or false (not timed out) /* + By Ghostrider [GRG] + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_updateCrateSignals.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_updateCrateSignals.sqf index da6809a..eaa980c 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_updateCrateSignals.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_updateCrateSignals.sqf @@ -1,4 +1,12 @@ +/* + By Ghostrider [GRG] + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ for "_i" from 1 to (count blck_illuminatedCrates) do { if (_i > (count blck_illuminatedCrates)) exitWith {}; @@ -38,4 +46,4 @@ for "_i" from 1 to (count blck_illuminatedCrates) do } else { //diag_log format["_updateCrateSignals: crate has been illuminated for enough time, no need to continue"]; }; -}; \ No newline at end of file +}; diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_updateMarkerAliveCount.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_updateMarkerAliveCount.sqf index 90fec22..54d0c31 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_updateMarkerAliveCount.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_updateMarkerAliveCount.sqf @@ -1,5 +1,6 @@ /* by Ghostrider [GRG] + Copyright 2016 -------------------------- License -------------------------- @@ -9,4 +10,4 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; params["_marker","_rootText","_missionAI"]; -_marker setMarkerText format["%1 / %2 AI Alive",_rootText,{alive _x} count _missionAI]; \ No newline at end of file +_marker setMarkerText format["%1 / %2 AI Alive",_rootText,{alive _x} count _missionAI]; diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_waitTimer.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_waitTimer.sqf index 7777e44..f2ff754 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_waitTimer.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_waitTimer.sqf @@ -2,7 +2,6 @@ for ghostridergaming By Ghostrider [GRG] Copyright 2016 - Last Modified 8-13-16 Waits for a random period between _min and _max seconds Call as diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_passToHCs.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_passToHCs.sqf index ebe26ab..02d3882 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_passToHCs.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_passToHCs.sqf @@ -1,3 +1,13 @@ +/* + By Ghostrider [GRG] + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ +// TODO: Which of the to versions is active; delete the inactive one. if (!isServer) exitWith {}; blck_fnc_countGroupsAssigned = { params["_HC"]; diff --git a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToMoveWaypoint.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToMoveWaypoint.sqf index 0fa148a..25eb286 100644 --- a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToMoveWaypoint.sqf +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToMoveWaypoint.sqf @@ -3,7 +3,6 @@ for ghostridergaming By Ghostrider [GRG] Copyright 2016 - Last modified 4/23/17 -------------------------- License diff --git a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSADWaypoint.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSADWaypoint.sqf index be19d08..b681760 100644 --- a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSADWaypoint.sqf +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSADWaypoint.sqf @@ -3,7 +3,6 @@ for ghostridergaming By Ghostrider [GRG] Copyright 2016 - Last modified 4/29/17 -------------------------- License diff --git a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSentryWaypoint.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSentryWaypoint.sqf index f7192e2..a4be61d 100644 --- a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSentryWaypoint.sqf +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_changeToSentryWaypoint.sqf @@ -1,9 +1,9 @@ // Sets the WP type for WP for the specified group and updates other atributes accordingly. +// TODO: Not uses? how to handle /* for ghostridergaming By Ghostrider [GRG] Copyright 2016 - Last modified 4/29/17 -------------------------- License diff --git a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_checkGroupWaypointStatus.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_checkGroupWaypointStatus.sqf index 422d216..e12eded 100644 --- a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_checkGroupWaypointStatus.sqf +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_checkGroupWaypointStatus.sqf @@ -13,8 +13,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ -params["_group","_maxTime","radius"]; -if ((diag_tickTime > (_group getVariable "timeStamp") + _maxTime) || ( (getPos (leader)) distance2d (_group getVariable "patrolCenter") > 200)) then +params["_group","_maxTime","_radius"]; +if ((diag_tickTime > (_group getVariable "timeStamp") + _maxTime) || ( (getPos (leader)) distance2d (_group getVariable "patrolCenter") > _radius)) then { (leader _group) call blck_fnc_changeToMoveWaypoint; #ifdef blck_debugMode diff --git a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_groupWaypointMonitor.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_groupWaypointMonitor.sqf index 030c4aa..d266452 100644 --- a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_groupWaypointMonitor.sqf +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_groupWaypointMonitor.sqf @@ -13,6 +13,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ +// TODO: Add pushBack for groups spawned at static missions. + #include "\q\addons\custom_server\Configs\blck_defines.hpp"; _fn_waypointComplete = { diff --git a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_setNextWaypoint.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_setNextWaypoint.sqf index 0aab86e..f1d12e5 100644 --- a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_setNextWaypoint.sqf +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_setNextWaypoint.sqf @@ -3,7 +3,6 @@ for ghostridergaming By Ghostrider [GRG] Copyright 2016 - Last modified 3/14/17 -------------------------- License diff --git a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_setupWaypoints.sqf b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_setupWaypoints.sqf index 07f9713..70d751d 100644 --- a/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_setupWaypoints.sqf +++ b/@GMS/addons/custom_server/Compiles/Groups/GMS_fnc_setupWaypoints.sqf @@ -3,7 +3,6 @@ for ghostridergaming By Ghostrider [GRG] Copyright 2016 - Last modified 6/1/17 -------------------------- License @@ -82,4 +81,4 @@ if !(_soldierType isEqualTo "emplaced") then #else _wp setWaypointStatements ["true","this call blck_fnc_emplacedWeaponWaypoint;"]; #endif -}; \ No newline at end of file +}; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc__loadLootItemsFromArray.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc__loadLootItemsFromArray.sqf index 626bf1e..9bdf801 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc__loadLootItemsFromArray.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc__loadLootItemsFromArray.sqf @@ -15,8 +15,8 @@ case 1: [["item1",...,"itemN"],6]; The script will randomly select from the array of item names 6 times and call the loot loader each time. case 2: [["item1",...,"itemN"],6, 9]; As above except that an item will be selected a minimum of 6 and maximum of 9 times. - by Ghostrider [GRG] - 11/14/16 + By Ghostrider-GRG- + Copyright 2016 -------------------------- License @@ -25,6 +25,8 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ +// TODO: Check file name which seems to have an extra _ in it. + #include "\q\addons\custom_server\Configs\blck_defines.hpp"; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addItemToCrate.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addItemToCrate.sqf index 3d44d42..7824516 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addItemToCrate.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addItemToCrate.sqf @@ -6,8 +6,8 @@ If _item is a string then add 1 of that item to the container. If _item is an array with 2 elements ["itemName",3] then assume that the first element is a string and is the name of the item, and the second is the number to add. if _item is an array with 3 elements ["itemName",2,6] assume that the first element is the item name (string), the second the min # to add and the third the max # to add. - by Ghostrider [GRG] - 11/14/16 + By Ghostrider-GRG- + Copyright 2016 -------------------------- License diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addLiveAItoQue.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addLiveAItoQue.sqf index 0cba618..fb01566 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addLiveAItoQue.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addLiveAItoQue.sqf @@ -2,8 +2,8 @@ Adds a list of live AI associated with a mission to a que of live AI that will be deleted at a later time by the main thread call as [ [list of AI], time] call blck_fnc_addLiveAItoQue; where time is the time delay before deletion occurs - by Ghostrider [GRG] - Last modified 3-13-17 + By Ghostrider-GRG- + Copyright 2016 -------------------------- License diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addMIssionToQue.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addMIssionToQue.sqf index fa9eb2f..405907a 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addMIssionToQue.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addMIssionToQue.sqf @@ -1,8 +1,8 @@ /* Adds the basic list of parameters that define a mission such as the marker name, mission list, mission path, AI difficulty, and timer settings, to the arrays that the main thread inspects. - by Ghostrider [GRG] - Last modified 1-21-17 + By Ghostrider-GRG- + Copyright 2016 -------------------------- License @@ -38,4 +38,4 @@ for "_i" from 1 to _noMissions do #ifdef blck_debugMode if (blck_debugLevel >= 4) then {diag_log format["_fnc_addMissionToQue:: -- >> Result - blck_pendingMissions = %1",blck_pendingMissions];}; -#endif \ No newline at end of file +#endif diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addObjToQue.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addObjToQue.sqf index 788422e..389be0d 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addObjToQue.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_addObjToQue.sqf @@ -2,8 +2,8 @@ Adds a list of live AI associated with a mission to a que of live AI that will be deleted at a later time by the main thread call as [ [list of AI], time] call blck_fnc_addLiveAItoQue; where time is the time delay before deletion occurs - by Ghostrider [GRG] - Last modified 10-14-16 + By Ghostrider-GRG- + Copyright 2016 -------------------------- License diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_cleanUpObjects.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_cleanUpObjects.sqf index c27befa..83fc9c4 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_cleanUpObjects.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_cleanUpObjects.sqf @@ -6,7 +6,6 @@ for ghostridergaming By Ghostrider [GRG] Copyright 2016 - Last Modified 4-11-17 -------------------------- License @@ -32,4 +31,4 @@ for "_i" from 1 to (count blck_oldMissionObjects) do { blck_oldMissionObjects pushback _oldObjs; }; }; -}; \ No newline at end of file +}; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_clearMines.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_clearMines.sqf index 9cbaef4..4f4c72c 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_clearMines.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_clearMines.sqf @@ -3,7 +3,6 @@ for ghostridergaming By Ghostrider [GRG] Copyright 2016 - Last Modified 8-13-16 -------------------------- License diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMarker.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMarker.sqf index 114a963..093c9c9 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMarker.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMarker.sqf @@ -1,11 +1,6 @@ /* -Dynamic Loot Crate Spaw System for Exile Mod for Arma 3 -by -Ghostrider [GRG] -for ghostridergaming -4-6-16 - -Spawn a crate on land or in the air + By Ghostrider-GRG- + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMoved.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMoved.sqf index 90a145c..b0b0d0e 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMoved.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_crateMoved.sqf @@ -1,5 +1,6 @@ /* - by Ghostrider + By Ghostrider-GRG- + Copyright 2016 -------------------------- License diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf index f17d00b..d1b9cb0 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf @@ -2,7 +2,8 @@ schedules deletion of all remaining alive AI and mission objects. Updates the mission que. Updates mission markers. - By Ghostrider GRG + By Ghostrider-GRG- + Copyright 2016 -------------------------- License @@ -132,4 +133,4 @@ _fn_missionCleanup = { diag_log format["_fnc_endMission: after to running mission end functions -> blck_missionsRunning = %1 | blck_dynamicUMS_MissionsRuning = %2",blck_missionsRunning,blck_dynamicUMS_MissionsRuning]; #endif //diag_log format["_fnc_endMission (138): after to running mission end functions -> blck_missionsRunning = %1 | blck_dynamicUMS_MissionsRuning = %2",blck_missionsRunning,blck_dynamicUMS_MissionsRuning]; - _endCondition \ No newline at end of file + _endCondition diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf index 6b1cea3..6c22670 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_fillBoxes.sqf @@ -1,6 +1,7 @@ /* - By Ghostrider [GRG] + By Ghostrider-GRG- + Copyright 2016 -------------------------- License @@ -160,4 +161,4 @@ }; //diag_log "_fnc_fillBoxes "; //diag_log format["testCrateLoading: crate inventory = %1",getItemCargo _crate]; - //diag_log "_fnc_fillBoxes "; \ No newline at end of file + //diag_log "_fnc_fillBoxes "; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_ATLsystem.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_ATLsystem.sqf index 788c5fd..92e9915 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_ATLsystem.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_ATLsystem.sqf @@ -1,5 +1,7 @@ /* + By Ghostrider-GRG- + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_relPosSystem.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_relPosSystem.sqf index 363b0b0..584a6ef 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_relPosSystem.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_garrisonBuilding_relPosSystem.sqf @@ -1,5 +1,7 @@ /* + By Ghostrider-GRG- + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_loadMissionCrate.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_loadMissionCrate.sqf index e96b37e..103389d 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_loadMissionCrate.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_loadMissionCrate.sqf @@ -1,4 +1,6 @@ /* + By Ghostrider-GRG- + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf index ef0a54a..d09c724 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf @@ -10,6 +10,7 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ +// TODO: Make sure all groups are captured in the list o factive groups #include "\q\addons\custom_server\Configs\blck_defines.hpp"; #define delayTime 1 private ["_abort","_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_assetKilledMsg","_enemyLeaderConfig", diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAILoadout.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAILoadout.sqf index 0efe79c..db0f795 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAILoadout.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_selectAILoadout.sqf @@ -6,7 +6,6 @@ returns: _lootarray by Ghostrider [GRG] - 1/9-17 -------------------------- License diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_signalEnd.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_signalEnd.sqf index a1e5e42..99f19b9 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_signalEnd.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_signalEnd.sqf @@ -1,7 +1,6 @@ ////////////////////////////////////////////////////// // Attach a marker of type _marker to an object _crate // by Ghostrider [GRG] based on code from Wicked AI for Arma 2 Dayz Epoch -// Last modified 8/2/15 ///////////////////////////////////////////////////// /* -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_smokeAtCrates.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_smokeAtCrates.sqf index 96a7d50..568f11c 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_smokeAtCrates.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_smokeAtCrates.sqf @@ -3,7 +3,6 @@ for ghostridergaming By Ghostrider [GRG] Copyright 2016 - Last updated 8-14-16 -------------------------- License diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects.sqf index 3a022c4..7c03460 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnBaseObjects.sqf @@ -2,7 +2,6 @@ Spawn objects from an array using offsects from a central location. The code provided by M3Editor EDEN has been addapted to add checks for vehicles, should they be present. Returns an array of spawned objects. - version of 10/13/17 -------------------------- License diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf index c81845a..5ffd246 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf @@ -1,7 +1,6 @@ /* [_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray; - Last modified 4/27/17 By Ghostrider [GRG] -------------------------- @@ -99,7 +98,8 @@ if (blck_debugLevel > 1) then // params["_vehType","_pos",["_clearInventory",true]]; private _wep = [(_x select 0),[0,0,0],false,true] call blck_fnc_spawnVehicle; _wep addMPEventHandler ["MPHit",{[_this] call blck_EH_AIVehicle_HandleDamage}]; - _wep setVariable["vehicleGroup",_empGroup]; + _wep addEventHandler["GetOut",{_this remoteExec["blck_EH_vehicleGetOut",2]}]; + //_wep setVariable["vehicleGroup",_empGroup]; _wep setVariable["GRG_vehType","emplaced"]; _wep setPos _pos; _wep setdir (random 359); @@ -110,6 +110,7 @@ if (blck_debugLevel > 1) then _gunner moveingunner _wep; _gunner setVariable["GRG_vehType","emplaced"]; _gunner setVariable["GRG_vehicle",_wep]; + //_gunner addEventHandler["GetOutMan",{_this remoteExec["blck_EH_vehcleManGetOut",2]}]; _emplacedAI append _units; } forEach _missionEmplacedWeapons; blck_monitoredVehicles append _emplacedWeps; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_ATL.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_ATL.sqf index 8aaa89f..a18fd6b 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_ATL.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_ATL.sqf @@ -1,9 +1,7 @@ -////////////////////////////////////////////////////// -// Attach a marker of type _marker to an object _crate -// by Ghostrider [GRG] based on code from Wicked AI for Arma 2 Dayz Epoch -// Last modified 8/2/15 -///////////////////////////////////////////////////// + /* + By Ghostrider-GRG- + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_relPos.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_relPos.sqf index 1f80d2c..f96209d 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_relPos.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnGarrisonInsideBuilding_relPos.sqf @@ -1,9 +1,6 @@ -////////////////////////////////////////////////////// -// Attach a marker of type _marker to an object _crate -// by Ghostrider [GRG] based on code from Wicked AI for Arma 2 Dayz Epoch -// Last modified 8/2/15 -///////////////////////////////////////////////////// /* + By Ghostrider-GRG- + Copyright 2016 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMines.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMines.sqf index 766bd99..83932ac 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMines.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMines.sqf @@ -2,7 +2,6 @@ /* By Ghostrider [GRG] Copyright 2016 - Last updated 8-14-16 -------------------------- License diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf index 429cca8..046cceb 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf @@ -1,7 +1,6 @@ /* blck_fnc_spawnMissionVehiclePatrols by Ghostrider [GRG] - 3/17/17 returns [] if no groups could be created returns [_AI_Vehicles,_missionAI] otherwise; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf index 914adf7..1ce8a01 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf @@ -2,7 +2,6 @@ for ghostridergaming By Ghostrider [GRG] Copyright 2016 - Last modified 4/29/17 checks the status of each entry in /* By Ghostrider [GRG] diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_updateMissionQue.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_updateMissionQue.sqf index 792764f..ada9e9c 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_updateMissionQue.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_updateMissionQue.sqf @@ -2,7 +2,6 @@ Update the parameters for a mission in the list of missions running at that time. Call with the name of the marker associated with the mission and either "Active" or "Completed" by Ghostrider [GRG] - Last modified 1-22-17 -------------------------- License diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIHandleDamage.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIHandleDamage.sqf index 7aecc7b..daddfac 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIHandleDamage.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_EH_AIHandleDamage.sqf @@ -2,7 +2,6 @@ Deals with instances in which a unit is damaged (not in use). By Ghostrider [GRG] - Last modified 4-11-17 unit: Object - Object the event handler is assigned to. selectionName: String - Name of the selection where the unit was damaged. "" for over-all structural damage, "?" for unknown selections. diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_EH_animDone.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_EH_animDone.sqf index 82299bf..4c7104a 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_EH_animDone.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_EH_animDone.sqf @@ -1,3 +1,4 @@ +// TODO: Delete? /* by Ghostrider diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_EH_unitWeaponReloaded.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_EH_unitWeaponReloaded.sqf index 35e821d..962c113 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_EH_unitWeaponReloaded.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_EH_unitWeaponReloaded.sqf @@ -3,7 +3,6 @@ Handle case where a unit reloads weapon. This was used in place of fired event handlers to add realism and deal with issues with the arma engine post v1.64 By Ghostrider [GRG] - Last modified 4-11-17 https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/Reloaded diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyGroups.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyGroups.sqf index e4e198a..3490218 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyGroups.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyGroups.sqf @@ -1,7 +1,6 @@ /* _fnc_alertNearbyGroups by Ghostrider - 9-20-15 Allerts all units within the nearest group to the location of a killer. ** Not in use at this time; reserved for the future ** -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyUnits.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyUnits.sqf index 26ded18..1555b28 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyUnits.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyUnits.sqf @@ -1,7 +1,6 @@ /* _fnc_alertNearbyUnits by Ghostrider - 9-20-15 Allerts all units within a certain radius of the location of a killer. ** Not in use at this time; reserved for the future ** -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyVehicles.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyVehicles.sqf index 8be65c2..fa88d50 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyVehicles.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_alertNearbyVehicles.sqf @@ -23,4 +23,3 @@ private _nearestVehicle = _nearestVehicles select 0; - diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_allertNearestGroup.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_allertNearestGroup.sqf index 0dc6d3a..0cdd748 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_allertNearestGroup.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_allertNearestGroup.sqf @@ -2,7 +2,16 @@ /* _fnc_alertNearestGroup */ +/* + By Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ params["_group"]; private _nearbyGroup = [group _unit] call blck_fnc_findNearestGroup; { diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_cleanupAliveAI.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_cleanupAliveAI.sqf index be042cd..c4deb9f 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_cleanupAliveAI.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_cleanupAliveAI.sqf @@ -1,8 +1,6 @@ /* Delete alive AI. - Now called from the main thread which tracks the time elapsed so that we no longer spawn a wait timer for each completed mission. by Ghostrider - Last updated 4/11/17 -------------------------- License @@ -29,4 +27,4 @@ for "_i" from 1 to (count blck_liveMissionAI) do { blck_liveMissionAI pushback _units; }; }; -}; \ No newline at end of file +}; diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_deleteAI.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_deleteAI.sqf index 3d70ec4..9e03276 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_deleteAI.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_deleteAI.sqf @@ -1,7 +1,7 @@ /* Delete a unit. by Ghostrider - Last updated 1/22/17 + -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_handlePlayerUpdates.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_handlePlayerUpdates.sqf index 9920f3e..8d90378 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_handlePlayerUpdates.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_handlePlayerUpdates.sqf @@ -2,7 +2,6 @@ calculate a reward player for AI Kills in crypto. Code fragment adapted from VEMF call as [_unit,_killer] call blck_fnc_handlePlayerUpdates; - Last modified 6/3/17 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_nextAnim.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_nextAnim.sqf index 6b0d9e7..296107b 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_nextAnim.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_nextAnim.sqf @@ -1,3 +1,5 @@ +// Probably not used - +// TODO: delete ? /* by Ghostrider diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIHit.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIHit.sqf index 90a5811..40b7d85 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIHit.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIHit.sqf @@ -1,6 +1,5 @@ /* By Ghostrider [GRG] - Last Modified 7-27-17 Handles the case where a unit is hit. @@ -12,7 +11,7 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; - +if !(isServer) exitWith {}; private ["_unit","_instigator","_group","_wp"]; _unit = _this select 0 select 0; _instigator = _this select 0 select 3; diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf index a9f5bb4..fb583dc 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processAIKill.sqf @@ -1,7 +1,7 @@ /* Handle AI Deaths By Ghostrider [GRG] - Copyright 2016 + -------------------------- License -------------------------- @@ -12,50 +12,31 @@ // assumptions: this is always run on the server rgardless if th event is triggered on an HC or other client. #include "\q\addons\custom_server\Configs\blck_defines.hpp"; - +if !(isServer) exitWith {}; params["_unit","_killer","_instigator"]; //diag_log format["_fnc_processAIKill: _unit = %1 | _killer = %2",_unit,_killer]; if (_unit getVariable["blck_cleanupAt",-1] > 0) exitWith {}; // this is here so that the script is not accidently run more than once for each MPKilled occurrence. _unit setVariable ["blck_cleanupAt", (diag_tickTime) + blck_bodyCleanUpTimer]; blck_deadAI pushback _unit; -private _group = group _unit; -[_unit] joinSilent grpNull; -if (count(units _group) == 0) then +if (count(units (group _unit)) isEqualTo 0) then { deleteGroup _group; }; - -if !((vehicle _unit) isKindOf "Man") then +[_unit] joinSilent grpNull; +if !(_unit isKindOf "Man") then { - private _veh = vehicle _unit; - //diag_log format["_processAIKill: _unit %1 is in vehicle %2",_unit,_veh]; - if ({alive _x} count (crew _veh) == 0) then - { - //diag_log format["_processAIKill: no units alive in vehicle %1 of type %2",_veh, typeOf _veh]; - if (_veh getVariable["GRG_vehType","none"] isEqualTo "emplaced") then - { - //diag_log format["_fnc_processAIKill: emplaced weapon %1 being handled",_veh]; - [_veh] call GMS_fnc_handleEmptyStaticWeapon; - } else { - if (blck_killEmptyAIVehicles) then - { - //diag_log format["_processAIKill: disabling vehicle %1 and setting a delete time",_veh]; - _veh setDamage 0.7; - _veh setFuel 0; - _veh setVariable["blck_deleteAtTime",diag_tickTime + 60]; - } else { - //diag_log format["_processAIKill: releasing vehicle %1 to players and setting a default delete timer",_veh]; - _veh setVariable["blck_deleteAtTime",diag_tickTime + blck_vehicleDeleteTimer,true]; - [_veh] call blck_fnc_releaseVehicleToPlayers; - }; - }; - }; + //diag_log format["_fnc_processAIKill: unit linked to crew of vehicle %1 | typeOf (vehicle _unit = %2)",vehicle _unit,typeOf (vehicle _unit)]; [_unit, ["Eject", vehicle _unit]] remoteExec ["action",(owner _unit)]; + //[vehicle _unit,_unit] call blck_fnc_checkForEmptyVehicle; +/* } else { - if (_unit getVariable["GRG_vehType","none"] isEqualTo "emplaced") then + if !(_unit getVariable["GRG_vehicle","none"] isEqualTo "none") then { - [_unit getVariable "GRG_vehicle"] call GMS_fnc_handleEmptyStaticWeapon; + diag_log format["_fnc_processAIKill: unit linked to crew of vehicle %1",vehicle _unit]; + [_unit, ["Eject", vehicle _unit]] remoteExec ["action",(owner _unit)]; + [vehicle _unit,_unit] call blck_fnc_checkForEmptyVehicle; }; +*/ }; if (blck_launcherCleanup) then {[_unit] call blck_fnc_removeLaunchers}; @@ -63,9 +44,9 @@ if (blck_removeNVG) then {[_unit] call blck_fnc_removeNVG}; if !(isPlayer _killer) exitWith {}; [_unit,_killer,50] call GMS_fnc_alertNearbyGroups; [_killer] call blck_fnc_alertNearbyVehicles; -private _wp = [_group, currentWaypoint _group]; +private _wp = [group _unit, currentWaypoint (group _unit)]; _wp setWaypointBehaviour "COMBAT"; -_group setCombatMode "RED"; +(group _unit) setCombatMode "RED"; _wp setWaypointCombatMode "RED"; if (blck_showCountAliveAI) then @@ -74,7 +55,7 @@ if (blck_showCountAliveAI) then [_x select 0, _x select 1, _x select 2] call blck_fnc_updateMarkerAliveCount; } forEach blck_missionMarkers; }; -private _isLegal = [_unit,_killer] call blck_fnc_processIlleagalAIKills; -if (_isLegal) then { + +if ([_unit,_killer] call blck_fnc_processIlleagalAIKills) then { [_unit,_killer] call GMS_fnc_handlePlayerUpdates; -}; \ No newline at end of file +}; diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf index 691def4..f9b482c 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_processIlleagalAIKills.sqf @@ -51,5 +51,5 @@ if (_killer == (driver (vehicle _killer))) then // If the killer is also the dr }; }; }; -diag_log format["_fnc_testForIllegalKills: _legal = %1",_legal]; +//diag_log format["_fnc_testForIllegalKills: _legal = %1",_legal]; _legal diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeAllAIgear.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeAllAIgear.sqf index 79e3bc2..cbe7b63 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeAllAIgear.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeAllAIgear.sqf @@ -1,8 +1,5 @@ /* By Ghostrider [GRG] - Last Modified 7-27-17 - - Handles the case where a vehicle is hit. -------------------------- License @@ -13,4 +10,4 @@ */ params["_ai"]; {deleteVehicle _x}forEach nearestObjects [(getPosATL _ai), ['GroundWeaponHolder','WeaponHolderSimulated','WeaponHolder'], 3]; //Adapted from the AI cleanup logic by KiloSwiss - [_ai] call blck_fnc_removeGear; \ No newline at end of file + [_ai] call blck_fnc_removeGear; diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeLaunchers.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeLaunchers.sqf index a1159ad..a652cc1 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeLaunchers.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeLaunchers.sqf @@ -1,6 +1,6 @@ /* by Ghostrider - 1-22-17 + Removes an AI launcher and ammo -------------------------- License diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeNVG.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeNVG.sqf index a4bb7e3..8cbe50e 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeNVG.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_removeNVG.sqf @@ -1,6 +1,6 @@ /* by Ghostrider - 8-13-16 + Remove NVG from AI -------------------------- License diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_setSkill.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_setSkill.sqf index 2831502..08f19b3 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_setSkill.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_setSkill.sqf @@ -1,7 +1,7 @@ /* Set skills for an AI Unit by Ghostrider - Last updated 8/14/17 + -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnParaUnits.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnParaUnits.sqf index 1db1cb8..99d7c3b 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnParaUnits.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnParaUnits.sqf @@ -2,7 +2,7 @@ Author: Ghostrider [GRG] Inspiration: blckeagls / A3EAI / VEMF / IgiLoad / SDROP License: Attribution-NonCommercial-ShareAlike 4.0 International - 3/17/17 + -------------------------- License -------------------------- @@ -10,11 +10,6 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ -------------------------- - License - -------------------------- - All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. - - http://creativecommons.org/licenses/by-nc-sa/4.0/ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_EH_AIVehicle_Hit.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_EH_AIVehicle_Hit.sqf index 93632f2..3f65940 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_EH_AIVehicle_Hit.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_EH_AIVehicle_Hit.sqf @@ -11,7 +11,7 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ //#include "\q\addons\custom_server\Configs\blck_defines.hpp"; -if !(isDedicated) exitWith {}; +if !(isServer) exitWith {}; _this call blck_fnc_HandleAIVehicleHit; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_EH_VehicleKilled.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_EH_VehicleKilled.sqf index 91cd2cb..ecd0314 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_EH_VehicleKilled.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_EH_VehicleKilled.sqf @@ -12,5 +12,5 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/ */ //#include "\q\addons\custom_server\Configs\blck_defines.hpp"; -if !(isDedicated) exitWith {}; +if !(isServer) exitWith {}; _this call blck_fnc_processAIVehicleKill; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_HandleAIVehicleHit.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_HandleAIVehicleHit.sqf index 3ed7ed6..293f762 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_HandleAIVehicleHit.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_HandleAIVehicleHit.sqf @@ -13,8 +13,8 @@ private ["_veh","_instigator","_group","_wp"]; -_veh = _this select 0 select 0; -_instigator = _this select 0 select 3; +_veh = _this select 0; +_instigator = _this select 3; //diag_log format["_fnc_HandleAIVehicleHit: _veh = %1 | _instigator = %2",_veh,_instigator]; if (!(isPlayer _instigator)) exitWith {}; _crew = crew _veh; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_applyVehicleDamagePenalty.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_applyVehicleDamagePenalty.sqf index 1a80a01..0c63779 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_applyVehicleDamagePenalty.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_applyVehicleDamagePenalty.sqf @@ -1,5 +1,5 @@ /* - Killed handler for _units + By Ghostrider-GRG- -------------------------- @@ -12,5 +12,5 @@ private["_vd"]; params["_vk"]; - _vd = getDammage _vk; - _vk setDamage (_vd + blck_RunGearDamage); \ No newline at end of file + _vd = damage _vk; + _vk setDamage (_vd + blck_RunGearDamage); diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_configureMissionVehicle.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_configureMissionVehicle.sqf index b3e0b87..1d45a6a 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_configureMissionVehicle.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_configureMissionVehicle.sqf @@ -2,7 +2,6 @@ /* By Ghostrider [GRG] Copyright 2016 - Last updated 3-14-17 spawns a vehicle of _vehType and mans it with units in _group. returns _veh, the vehicle spawned. @@ -21,7 +20,8 @@ if (_clearInventory) then { [_veh] call blck_fnc_emptyObject; }; -_veh setVehicleLock "LOCKEDPLAYER"; +//_veh setVehicleLock "LOCKEDPLAYER"; +_veh lock 0; if (blck_modType isEqualTo "Epoch") then { if (blck_allowSalesAtBlackMktTraders) then {_veh setVariable["HSHALFPRICE",1,true]}; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_deleteAIVehicle.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_deleteAIVehicle.sqf index 36aef30..ab0a7b3 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_deleteAIVehicle.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_deleteAIVehicle.sqf @@ -1,7 +1,6 @@ /* Delete a unit. by Ghostrider - Last updated 1/22/17 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_destroyVehicleAndCrew.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_destroyVehicleAndCrew.sqf index c69d706..e6d0630 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_destroyVehicleAndCrew.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_destroyVehicleAndCrew.sqf @@ -1,6 +1,5 @@ /* - Killed handler for _units By Ghostrider-GRG- -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_handleEmptyStaticWeapon.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_handleEmptyStaticWeapon.sqf index f9d3894..36bb611 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_handleEmptyStaticWeapon.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_handleEmptyStaticWeapon.sqf @@ -1,4 +1,5 @@ // GMS_fnc_handleEmptyStaticWeapon.sqf +// NOT USED AT PRESENT /* By Ghostrider [GRG] @@ -19,4 +20,4 @@ diag_log format["_processAIKill: releasing static %1 to players and setting a default delete timer",_veh]; [_veh] call blck_fnc_releaseVehicleToPlayers; //Call this from _processAIKill _veh setVariable["blck_DeleteAt",diag_tickTime + blck_vehicleDeleteTimer,true]; - }; \ No newline at end of file + }; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_processAIVehicleKill.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_processAIVehicleKill.sqf index 99abb6a..f2f472c 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_processAIVehicleKill.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_processAIVehicleKill.sqf @@ -27,8 +27,8 @@ diag_log format["_fnc_processAIVehicleKill: _this = %1",_this]; diag_log format["_fnc_processAIVehicleKill:: _units = %1 and _instigator = %2 units damage is %3",_veh,_instigator, damage _veh]; if (!(isPlayer _instigator)) exitWith {}; -_crew = crew _veh; -if !(count _crew == 0) then + +if !(count(crew _veh) isEqualTo 0) then { [_crew select 0,_instigator] call blck_fnc_alertGroupUnits; _group setBehaviour "COMBAT"; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_protectVehicle.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_protectVehicle.sqf index c4c3198..83e746b 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_protectVehicle.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_protectVehicle.sqf @@ -1,5 +1,5 @@ // Protect Vehicles from being cleaned up by the server -// Last modified 2/26/16 by Ghostrider [GRG] + /* -------------------------- License diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_releaseVehicleToPlayers.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_releaseVehicleToPlayers.sqf index 56275c5..3d23b29 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_releaseVehicleToPlayers.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_releaseVehicleToPlayers.sqf @@ -12,12 +12,13 @@ // assummptions: since this is called after an AI Killed event that always runs on the server we can assume this code will too. #include "\q\addons\custom_server\Configs\blck_defines.hpp"; - params["_veh"]; - [_veh] call GMS_fnc_unlockServerVehicle; - { - _veh removealleventhandlers _x; - } forEach ["GetIn","GetOut","fired","hit","hitpart","reloaded","dammaged","HandleDamage"]; - { - _veh removeAllMPEventHandlers _x; - } forEach ["MPHit","MPKilled"]; - if ((damage _veh) > 0.6) then {_veh setDamage 0.6}; // So they don't blow up when a player tries to get in. +params["_veh"]; +diag_log format["_fnc_releaseVehicleToPlayers: _veh = %1",_veh]; +[_veh] call GMS_fnc_unlockServerVehicle; +{ + _veh removealleventhandlers _x; +} forEach ["GetIn","GetOut","fired","hit","hitpart","reloaded","dammaged","HandleDamage"]; +{ + _veh removeAllMPEventHandlers _x; +} forEach ["MPHit","MPKilled"]; +if ((damage _veh) > 0.6) then {_veh setDamage 0.6}; // So they don't blow up when a player tries to get in. diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_reloadVehicleAmmo.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_reloadVehicleAmmo.sqf index 515e3e6..b9fc2c9 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_reloadVehicleAmmo.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_reloadVehicleAmmo.sqf @@ -1,7 +1,7 @@ /* - Killed handler for _units + Reloaded eventhandler for _units By Ghostrider-GRG- -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_revealNearbyPlayers.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_revealNearbyPlayers.sqf index c34eedf..73b406e 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_revealNearbyPlayers.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_revealNearbyPlayers.sqf @@ -3,7 +3,16 @@ algorhytm one: pure chance base on inverse of distance. More efficient. algorhythm two: based on canSee. More detailed. */ +/* + By Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ params["_vehicle","_searchRadius","_detectionOdds"]; private["_player","_detectionOdds","_nearbyPlayers","_knowsAbout","_cansee","_knowledgeGained"]; _nearbyPlayers = [position _vehicle, _vehicle getVariable["blck_vehicleSearchRange",500]] call blck_fnc_nearestPlayers; @@ -46,4 +55,4 @@ switch blck_revealMode do { }; }forEach _nearbyPlayers; }; -}; \ No newline at end of file +}; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_scanForPlayersNearVehicles.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_scanForPlayersNearVehicles.sqf index c3a52bf..7033b7e 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_scanForPlayersNearVehicles.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_scanForPlayersNearVehicles.sqf @@ -1,3 +1,13 @@ +/* + By Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ // GMS_fnc_vehiclePlayerSensingLogic.sqf // No params @@ -6,4 +16,4 @@ private["_searchRadius","_detectionOdds"]; _searchRadius = _x getVariable["blck_vehicleSearchRadius",800]; _detectionOdds = _x getVariable["blck_vehiclePlayerDetectionOdds",0.5]; [_x,_searchRadius,_detectionOdds] call blck_fnc_revealNearbyPlayers; -}forEach blck_monitoredVehicles; \ No newline at end of file +}forEach blck_monitoredVehicles; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_searchForNearbyPlayers.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_searchForNearbyPlayers.sqf index 86823ae..e36bc59 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_searchForNearbyPlayers.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_searchForNearbyPlayers.sqf @@ -1,4 +1,13 @@ +/* + By Ghostrider [GRG] + Copyright 2016 + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ params["_vehicle","_group","searchRadius","_detectionOdds"]; private["_nearbyPlayers","_groupLeader","_knowsAbout","_cansee"]; _groupLeader = leader _group; @@ -16,4 +25,4 @@ _nearbyPlayers = [position _vehicle, _vehicle getVariable["blck_vehicleSearchRan }; }foreEach crew _vehicle; }; -}forEach _nearbyPlayers; \ No newline at end of file +}forEach _nearbyPlayers; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnBoatPatrol.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnBoatPatrol.sqf index 58b941e..5a59633 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnBoatPatrol.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnBoatPatrol.sqf @@ -2,7 +2,6 @@ Spawn a vehicle and protect it against cleanup by Epoch Returns the object (vehicle) created. By Ghostrider [GRG] - Last modified 1-27-17 -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf index 045f918..32da6f9 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionHeli.sqf @@ -83,13 +83,13 @@ if !(isNull _grpPilot) then _patrolHeli setVariable["blck_vehicle",true]; _patrolHeli setVariable["blck_vehicleSearchRadius",blck_playerDetectionRangeAir]; _patrolHeli setVariable["blck_vehiclePlayerDetectionOdds",blck_vehiclePlayerDetectionOdds]; + _patrolHeli addEventHandler["GetOut",{_this remoteExec["blck_EH_vehicleGetOut",2]}]; [_patrolHeli] call blck_fnc_protectVehicle; _patrolHeli setFuel 1; _patrolHeli engineOn true; _patrolHeli flyInHeight 100; _patrolHeli setVehicleLock "LOCKED"; - //_patrolHeli addEventHandler ["GetOut",{(_this select 0) setFuel 0;(_this select 0) setDamage 1;}]; - + #ifdef blck_debugMode if (blck_debugLevel > 1) then { @@ -103,6 +103,8 @@ if !(isNull _grpPilot) then //params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", []],["_headGear",[]],["_vests",[]],["_backpacks",[]],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false]]; _unitPilot = [[100,100,100],_grpPilot,_skillAI,_uniforms,_headGear,_vests,_backpacks,_Launcher,_weaponList,_sideArms] call blck_fnc_spawnUnit; _unitPilot setSkill 1; + _unitPilot setVariable["GRG_vehicle",_patrolHeli]; + //_unitPilot addEventHandler["GetOutman",{_this remoteExec["blck_EH_vehcleManGetOut",2]}]; _unitPilot assignAsDriver _patrolHeli; _unitPilot moveInDriver _patrolHeli; _grpPilot selectLeader _unitPilot; @@ -145,7 +147,8 @@ if !(isNull _grpPilot) then _unitCrew = [(getPosATL _patrolHeli),_grpPilot,_skillAI,_uniforms,_headGear,_vests,_backpacks,_Launcher,_weaponList,_sideArms] call blck_fnc_spawnUnit; _unitCrew assignAsTurret [_patrolHeli, _x]; _unitCrew moveInTurret [_patrolHeli, _x]; - + _unitCrew setVariable["GRG_vehicle",_patrolHeli]; + //_unitCrew addEventHandler["GetOutman",{_this remoteExec["blck_EH_vehcleManGetOut",2]}]; #ifdef blck_debugMode diag_log format["_fnc_spawnMissionHeli (12798)::-- >> unit %1 moved into turret %2 of vehicle %3",_unitCrew,_x,_patrolHeli]; #endif diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionParatroops.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionParatroops.sqf index 1056113..415de3b 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionParatroops.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionParatroops.sqf @@ -2,7 +2,6 @@ Author: Ghostrider [GRG] Inspiration: blckeagls / A3EAI / VEMF / IgiLoad / SDROP License: Attribution-NonCommercial-ShareAlike 4.0 International - 3/17/17 This is basically a container that determines whether a paragroop group should be created and if so creates a group and passes it off to the routine that spawns the paratroops. diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionReinforcements.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionReinforcements.sqf index 00d168e..685d0cb 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionReinforcements.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnMissionReinforcements.sqf @@ -2,7 +2,6 @@ By Ghostrider [GRG] Copyright 2016 - Last Modified 8-16-17 -------------------------- License @@ -93,4 +92,4 @@ if ( _spawnHeli ) then // if helipatrols are 'enabled' then paratroops will only if (blck_debugLevel > 1) then {diag_log format["_fnc_spawnMissionReinforcements (74):: _return = %1",_return];}; #endif -_return \ No newline at end of file +_return diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnReinforcements.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnReinforcements.sqf index 785e3e2..e639223 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnReinforcements.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnReinforcements.sqf @@ -2,7 +2,6 @@ By Ghostrider [GRG] Copyright 2016 - Last Modified 8-16-17 -------------------------- License @@ -112,4 +111,4 @@ if ( (_chanceHeliPatrol > 0) && (random (1) < _chanceHeliPatrol) ) then // if he if (blck_debugLevel > 1) then {diag_log format["_fnc_spawnMissionReinforcements (74):: _return = %1",_return];}; #endif -_return \ No newline at end of file +_return diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnSubPatrol.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnSubPatrol.sqf index cf2359b..54880a4 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnSubPatrol.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnSubPatrol.sqf @@ -2,7 +2,7 @@ Spawn a vehicle and protect it against cleanup by Epoch Returns the object (vehicle) created. By Ghostrider [GRG] - Last modified 1-27-17 + -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle.sqf index ac9caca..868d670 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle.sqf @@ -2,7 +2,7 @@ Spawn a vehicle and protect it against cleanup by Epoch Returns the object (vehicle) created. By Ghostrider [GRG] - Last modified 1-27-17 + -------------------------- License -------------------------- diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf index 78073c2..acf1e5e 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehiclePatrol.sqf @@ -26,30 +26,35 @@ params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",40],["_ private["_veh"]; if !(isNull _group) then { _veh = [_vehType,_pos] call blck_fnc_spawnVehicle; - _veh addMPEventHandler["MPHit",{ [_this] call blck_EH_AIVehicle_HandleHit}]; + diag_log format["_fnc_spawnVehiclePatrol: _veh = %1 | typeOf _ve = %2",_veh,typeOf _veh]; + _veh addMPEventHandler["MPHit",{ _this call blck_EH_AIVehicle_HandleHit}]; + _veh addMPEventHandler["MPKilled",{_this call blck_EH_vehicleKilled}]; + _veh addEventHandler["GetOut",{_this remoteExec["blck_EH_vehicleGetOut",2]}]; _veh setVariable["blck_vehicleSearchRadius",blck_playerDetectionRangeGroundVehicle]; _veh setVariable["blck_vehiclePlayerDetectionOdds",blck_vehiclePlayerDetectionOdds]; private _maxCrew = [_crewCount] call blck_fnc_getNumberFromRange; //_group setVariable["groupVehicle",_veh]; private _seats = [_vehType,true] call BIS_fnc_crewCount; - _unitNumber = 0; + //_unitNumber = 0; //diag_log format["_fnc_spawnVehiclePatrol: _veh = %1 | _maxCrew = %2 | _seats = %3",_veh,_maxCrew,_seats]; { + //_x addEventHandler["GetOutMan",{_this remoteExec["blck_EH_vehcleManGetOut",2]}]; + _x setVariable["GRG_vehicle",_veh]; + //diag_log format["_fnc_spawnVehiclePatrol: _x getVariable 'GRG_vehicle' = %1 | typeOf (_x getVariable 'GRG_vehicle' = %1) = %2",_x getVariable 'GRG_vehicle',typeOf (_x getVariable 'GRG_vehicle')]; switch (_forEachIndex) do { case 0: {_x moveingunner _veh;}; case 1: {_x moveindriver _veh;}; - case {_forEachIndex == _seats - 1}: { - diag_log format["_fnc_spawnVeiclePatrol: deleteing excess crew: _veh = %1 | _forEachIndex = %2 | _seats = %3",_veh,_forEachIndex,_seats]; + case {_forEachIndex >= _seats - 1}: { + //diag_log format["_fnc_spawnVeiclePatrol: deleteing excess crew: _veh = %1 | _forEachIndex = %2 | _seats = %3",_veh,_forEachIndex,_seats]; deleteVehicle _x; }; // delete any excess AI default {_x moveInCargo _veh;}; }; - + // _this remoteExec ["blck_fnc_processAIKill",2]; }forEach (units _group); // - _group setcombatmode "RED"; _group setBehaviour "COMBAT"; if (_setWaypoints) then diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_unlockServerVehicle.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_unlockServerVehicle.sqf index 87ed76e..d52f006 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_unlockServerVehicle.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_unlockServerVehicle.sqf @@ -12,10 +12,9 @@ // assumptions: there are no crew in vehicle. there are no players in vehicle. thus we can just be sure the owner is the server then set the lock locally #include "\q\addons\custom_server\Configs\blck_defines.hpp"; params["_vehicle"]; -if !(local _vehicle) then -{ - _vehicle setOwner 2; -}; -_vehicle setVehicleLock "UNLOCKED"; +//diag_log format["_fnc+unlockServerVehicle: _vehicle = %1 | typeOf _vehicle = %2 | crewCount _vehicle = %3",_vehicle,typeOf _vehicle,count(crew _vehicle)]; +//[_vehicle,"UNLOCKED"] remoteExec["setVehicleLock", owner _vehicle]; +if !((owner _vehicle) isEqualTo 2) then {_vehicle setOwner 2}; +_vehicle lock 0; //diag_log format["_fn_unlockServerVehicle: owner of vehicle %1 = %2",_vehicle, owner _vehicle]; -//diag_log format["_fn_unlockServerVehicle: vehicle %1 lock state set to %2",_vehicle,locked _vehicle]; \ No newline at end of file +//diag_log format["_fn_unlockServerVehicle: vehicle %1 lock state set to %2",_vehicle,locked _vehicle]; diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehicleMonitor.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehicleMonitor.sqf index c77a41b..eab744c 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehicleMonitor.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehicleMonitor.sqf @@ -23,6 +23,7 @@ for "_i" from 1 to (count blck_monitoredVehicles) do if ((owner _veh) in (_serverIDs)) then { //diag_log format["_fnc_vehicleMonitor: vehicle %1 to be deleted at %2",_veh,(_veh getVariable ["blck_deleteAtTime",0])]; + if ((_veh getVariable ["blck_deleteAtTime",0]) > 0) then { if (diag_tickTime > ( _veh getVariable ["blck_deleteAtTime",0])) then diff --git a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehiclePlayerSensingLogic.sqf b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehiclePlayerSensingLogic.sqf index 593c609..a2273d9 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehiclePlayerSensingLogic.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehiclePlayerSensingLogic.sqf @@ -1,3 +1,14 @@ +/* + By Ghostrider [GRG] + Copyright 2016 + + -------------------------- + License + -------------------------- + All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. + + http://creativecommons.org/licenses/by-nc-sa/4.0/ +*/ // GMS_fnc_vehiclePlayerSensingLogic.sqf // No params @@ -9,4 +20,4 @@ _searchRadius = _vehicle getVariable["blck_vehicleSearchRadius",800]; _detectionOdds = _vehicle getVariable["blck_vehiclePlayerDetectionOds",0.5]; [_vehicle,_group,_searchRadius,_detectionOdds] call blck_fnc_senseNearbyPlayers; -}forEach blck_monitoredVehicles; \ No newline at end of file +}forEach blck_monitoredVehicles; diff --git a/@GMS/addons/custom_server/Compiles/blck_functions.sqf b/@GMS/addons/custom_server/Compiles/blck_functions.sqf index 9fe44e3..803547d 100644 --- a/@GMS/addons/custom_server/Compiles/blck_functions.sqf +++ b/@GMS/addons/custom_server/Compiles/blck_functions.sqf @@ -123,8 +123,12 @@ private _functions = [ ["GMS_fnc_unlockServerVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_unlockServerVehicle.sqf"], ["GMS_fnc_applyVehicleDamagePenalty","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_applyVehicleDamagePenalty.sqf"], ["GMS_fnc_revealVehicleToUnits","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_revealVehicleToUnits.sqf"], - ["GMS_fnc_handleEmptyStaticWeapon","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_handleEmptyStaticWeapon.sqf"], - // GMS_fnc_handleEmptyStaticWeapon + //["GMS_fnc_handleEmptyStaticWeapon","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_handleEmptyStaticWeapon.sqf"], + ["blck_EH_vehicleGetOut","\q\addons\custom_server\Compiles\Vehicles\GMS_EH_vehicleGetOut.sqf"], + ["blck_fnc_handleVehicleGetOut","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_handleVehicleGetOut.sqf"], + ["blck_fnc_checkForEmptyVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_checkForEmptyVehicle.sqf"], + ["blck_fnc_handleEmptyVehicle","\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_handleEmptyVehicle.sqf"], + // functions to support Units ["blck_fnc_removeGear","\q\addons\custom_server\Compiles\Units\GMS_fnc_removeGear.sqf"], // Strip an AI unit of all gear. diff --git a/@GMS/addons/custom_server/init/build.sqf b/@GMS/addons/custom_server/init/build.sqf index 4bdc6e2..e151236 100644 --- a/@GMS/addons/custom_server/init/build.sqf +++ b/@GMS/addons/custom_server/init/build.sqf @@ -1,4 +1,4 @@ -#define blck_buildNumber 176 +#define blck_buildNumber 177 #define blck_versionNumber 6.90 -#define blck_buildDate "5-29-19" +#define blck_buildDate "6-14-19"