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 e32d9cc..057ae78 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf @@ -48,15 +48,24 @@ while {true} do [] call blck_fnc_cleanupObjects; [] call blck_fnc_cleanupDeadAI; _timer20sec = diag_tickTime; - //diag_log format["_mainThread::-->> diag_tickTime = %1",diag_tickTime]; + //diag_log format["_mainThread::-->> 20 second events run: diag_tickTime = %1",diag_tickTime]; }; if ((diag_tickTime - _timer1min) > 60) then { + //diag_log format["_fnc_mainThread: 60 second events run at %1",diag_tickTime]; _timer1min = diag_tickTime; [] call blck_fnc_timeAcceleration; - //diag_log format["_fnc_mainThread: calling blck_fnc_spawnPendingMissions at %1",diag_tickTime]; [] call blck_fnc_spawnPendingMissions; - //diag_log format["_fnc_mainThread: control returned to _fnc_mainThread from _fnc_spawnPendingMissions at %1",diag_tickTime]; + //diag_log format["_fnc_spawnPendingMissions: blck_numberUnderwaterDynamicMissions = %1 | + if (blck_dynamicUMS_MissionsRuning < blck_numberUnderwaterDynamicMissions) then + { + //diag_log "Adding dyanamic UMS Mission"; + private ["_spawnPos"]; + _spawnPos = call blck_fnc_findShoreLocation; + [_spawnPos] spawn blck_fnc_addDyanamicUMS_Mission; + //_spawnPos call compileFinal preprocessFileLineNumbers format["q\addons\custom_server\Missions\UMS\dynamicMissiones\%1.sqf"; + }; + //diag_log format["_fnc_mainThread: control returned to _fnc_mainThread from _fnc_addDynamicUMS_Mission at %1",diag_tickTime]; if (blck_useHC) then { //diag_log format["_mainThread:: calling blck_fnc_passToHCs at diag_tickTime = %1",diag_tickTime]; 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 bf69431..daa02cd 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_endMission.sqf @@ -5,7 +5,7 @@ Updates the mission que. Updates mission markers. By Ghostrider GRG - 10/9/17 + 12/18/17 -------------------------- License @@ -121,7 +121,7 @@ _fn_missionCleanup = { _posnVeh = blck_monitoredVehicles find _x; // returns -1 if the vehicle is not in the array else returns 0-(count blck_monitoredVehicles -1) if (_posnVeh >= 0) then { - //diag_log format["_fnc_endMission: setting missionCompleted for vehicle %1 to %2",_x,diag_tickTime]; + diag_log format["_fnc_endMission: setting missionCompleted for vehicle %1 to %2",_x,diag_tickTime]; (blck_monitoredVehicles select _posnVeh) setVariable ["missionCompleted", diag_tickTime]; } else { _x setVariable ["missionCompleted", diag_tickTime]; 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 d4b31db..04b9a06 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf @@ -64,14 +64,5 @@ if (count _readyToSpawnQue > 0) then [_coords,_missionToSpawn,_allowReinforcements] spawn compileFinal preprocessFileLineNumbers format["\q\addons\custom_server\Missions\%1\%2.sqf",_missionPath,_missionName]; blck_missionsRunning = blck_missionsRunning + 1; }; -//diag_log format["_fnc_spawnPendingMissions: blck_numberUnderwaterDynamicMissions = %1 | -if (blck_dynamicUMS_MissionsRuning < blck_numberUnderwaterDynamicMissions) then -{ - diag_log "Adding dyanamic UMS Mission"; - private ["_spawnPos"]; - _spawnPos = call blck_fnc_findShoreLocation; - [_spawnPos] spawn blck_fnc_addDyanamicUMS_Mission; - //_spawnPos call compileFinal preprocessFileLineNumbers format["q\addons\custom_server\Missions\UMS\dynamicMissiones\%1.sqf"; - -}; + true 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 3a7bcc3..4b192ef 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_spawnVehicle.sqf @@ -20,6 +20,8 @@ if (blck_debugLevel > 1) then {diag_log format["spawnVehicle.sqf: _vehType = %1 #endif _veh = createVehicle[_vehType, _pos, [], 0, "NONE"]; +_veh allowDamage true; +_veh enableRopeAttach true; _veh setVariable["blck_vehicle",true]; [_veh] call blck_fnc_protectVehicle; 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 7e0c288..197de7d 100644 --- a/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehicleMonitor.sqf +++ b/@GMS/addons/custom_server/Compiles/Vehicles/GMS_fnc_vehicleMonitor.sqf @@ -23,34 +23,34 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; -//diag_log "_fnc_vehicleMonitor: starting function"; +diag_log format["_fnc_vehicleMonitor: starting function at diag_tickTime = %1",diag_tickTime]; #ifdef blck_debugMode //diag_log format["_fnc_vehicleMonitor:: blck_debugMode defined"]; #endif _fn_releaseVehicle = { - params["_v"]; + params["_veh"]; blck_monitoredVehicles = blck_monitoredVehicles - [_veh]; - _v setVehicleLock "UNLOCKED" ; + _veh setVehicleLock "UNLOCKED" ; //_v setVariable["releasedToPlayers",true]; //[_v] call blck_fnc_emptyObject; { - _v removealleventhandlers _x; + _veh removealleventhandlers _x; } forEach ["GetIn","GetOut","fired","hit","hitpart","reloaded","dammaged","HandleDamage"]; - + diag_log format["_fnc_vehicleMonitor:: case of patrol vehicle released to players where vehicle = %1",_veh]; #ifdef blck_debugMode if (blck_debugLevel > 3) then { - diag_log format["_fnc_vehicleMonitor:: case of patrol vehicle released to players where vehicle = %1",_v]; + diag_log format["_fnc_vehicleMonitor:: case of patrol vehicle released to players where vehicle = %1",_veh]; }; #endif }; _fn_destroyVehicleAndCrew = { params["_veh"]; - private["_crew"]; - _crew = crew _veh; - {[_x] call blck_fnc_deleteAI;} forEach _crew; + //private["_crew"]; + //_crew = crew _veh; + {[_x] call blck_fnc_deleteAI;} forEach (crew _veh); [_veh] call blck_fn_deleteAIvehicle; }; @@ -81,23 +81,24 @@ _fn_reloadAmmo = { } forEach _crew; }; }; + blck_fn_deleteAIvehicle = { params["_veh"]; { _veh removeAllEventHandlers _x; - }forEach ["Hit","HitPart","GetIn","GetOut","Fired","FiredNear"]; + }forEach ["Hit","HitPart","GetIn","GetOut","Fired","FiredNear","HandleDamage","Reloaded"]; blck_monitoredVehicles = blck_monitoredVehicles - [_veh]; deleteVehicle _veh; }; -private ["_veh","_vehList"]; -_vehList = +blck_monitoredVehicles; + +private _vehList = +blck_monitoredVehicles; #ifdef blck_debugMode if (blck_debugLevel > 3) then {diag_log format["_fnc_vehicleMonitor:: function called at %1 with _vehList %2 and blck_monitoredVehicles %3",diag_tickTime,_vehList,blck_monitoredVehicles];}; #endif - + //blck_fnc_releaseVehicleToPlayers { - _veh = _x; // (purely for clarity at this point, _x could be used just as well) + private _veh = _x; // (purely for clarity at this point, _x could be used just as well) #ifdef blck_debugMode if (blck_debugLevel > 3) then @@ -105,22 +106,23 @@ if (blck_debugLevel > 3) then {diag_log format["_fnc_vehicleMonitor:: function c diag_log format["_fnc_vehicleMonitor: vehicle %1 with missionCompleted = %2 being evaluated",_x, _x getVariable"missionCompleted",0]; }; #endif - private["_evaluate"]; - _evaluate = true; + private _evaluate = true; // Case where vehicle has been marked for deletion after a certain time. - if ( (_veh getVariable["blck_DeleteAt",0] > 0) && (diag_tickTime > _veh getVariable "blck_DeleteAt")) then + if ( (_veh getVariable["blck_DeleteAt",0] > 0) && (diag_tickTime > (_veh getVariable "blck_DeleteAt"))) then { [_veh] call _fn_destroyVehicleAndCrew; _evaluate = false; }; - // Case where is an emplaced / static wweapon and has no alive crew and such vehicles should be 'killed' or release to players + // Case where is an emplaced / static wweapon and has no alive crew and such vehicles should be 'killed' or released to players if (_evaluate) then { if ( (_veh getVariable["DBD_vehType","none"] isEqualTo "emplaced") && {alive _x} count crew _veh isEqualTo 0) then { if (blck_killEmptyStaticWeapons) then { + diag_log format["_fnc_vehicleMonitor:: case of destroyed where vehicle = %1",_veh]; + #ifdef blck_debugMode if (blck_debugLevel > 3) then {diag_log format["_fnc_vehicleMonitor:: case of destroyed where vehicle = %1",_veh];}; #endif @@ -134,7 +136,7 @@ if (blck_debugLevel > 3) then {diag_log format["_fnc_vehicleMonitor:: function c }; }; - // Case where a vehicle is NOT an emplaced / static weapon and has no alive crew and such vehicles should be 'killed' or release to players + // Case where a vehicle is NOT an emplaced / static weapon and has no alive crew and such vehicles should be 'killed' or released to players if (_evaluate) then { if (_veh getVariable["DBD_vehType","none"] isEqualTo "none" && ({alive _x} count crew _veh isEqualTo 0) ) then @@ -144,6 +146,7 @@ if (blck_debugLevel > 3) then {diag_log format["_fnc_vehicleMonitor:: function c _veh setDamage 0.7; _veh setVariable["blck_DeleteAt",diag_tickTime + 60]; } else { + diag_log format["_fnc_vehicleMonitor:: case of RELEASE where vehicle = %1 and Vehicle is typeOf %2",_veh, typeOf _veh]; [_veh] call _fn_releaseVehicle; }; _evaluate = false; @@ -155,6 +158,7 @@ if (blck_debugLevel > 3) then {diag_log format["_fnc_vehicleMonitor:: function c { if ( _veh getVariable["missionCompleted",0] > 0 && ({alive _x} count crew _veh > 0)) then { + diag_log format["_fnc_vehicleMonitor:: case of mission vehicle with AI alive at mission end: schedule destruction with _veh = %1 and typeOf _veh = %2",_veh, typeOf _veh]; private["_cleanupTimer"]; _cleanupTimer = _veh getVariable["cleanupTimer",0]; // The time delat to deleting any alive AI units // "missionCompleted" = the time at which the mission was completed or aborted diff --git a/@GMS/addons/custom_server/Compiles/blck_functions.sqf b/@GMS/addons/custom_server/Compiles/blck_functions.sqf index 7290452..a2d5d91 100644 --- a/@GMS/addons/custom_server/Compiles/blck_functions.sqf +++ b/@GMS/addons/custom_server/Compiles/blck_functions.sqf @@ -89,7 +89,7 @@ blck_fnc_spawnMissionReinforcements = compileFinal preprocessFileLineNumbers "\ blck_fnc_spawnMissionHeli = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionHeli.sqf"; blck_fnc_spawnMissionParatroops = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionParatroops.sqf"; // Lumped here because these 'jump' from aircraft blck_fnc_spawnParaUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnParaUnits.sqf"; // Lumped here because these 'jump' from aircraft -blck_fnc_releaseVehicleToPlayers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_releaseVehicleToPlayers.sqf"; // GMS_fnc_releaseVehicleToPlayers +//blck_fnc_releaseVehicleToPlayers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_releaseVehicleToPlayers.sqf"; // GMS_fnc_releaseVehicleToPlayers blck_EH_AIVehicle_HandleDamage = "\q\addons\custom_server\Compiles\Vehicles\GMS_EH_AIVehicle_HandleDamage.sqf"; blck_fnc_HandleAIVehicleDamage = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_HandleAIVehicleDamage.sqf"; diff --git a/@GMS/addons/custom_server/Compiles/blck_variables.sqf b/@GMS/addons/custom_server/Compiles/blck_variables.sqf index cee4d5e..0cf1dad 100644 --- a/@GMS/addons/custom_server/Compiles/blck_variables.sqf +++ b/@GMS/addons/custom_server/Compiles/blck_variables.sqf @@ -12,7 +12,7 @@ */ #include"\q\addons\custom_server\Configs\blck_defines.hpp"; -blck_debugON = false; +blck_debugON = true; blck_debugLevel = 0; // Sets level of detail for debugging info - WIP. blck_minFPS = 8; diff --git a/@GMS/addons/custom_server/init/build.sqf b/@GMS/addons/custom_server/init/build.sqf index f99254b..39e5c7e 100644 --- a/@GMS/addons/custom_server/init/build.sqf +++ b/@GMS/addons/custom_server/init/build.sqf @@ -1,6 +1,6 @@ private ["_version","_versionDate"]; -blck_version = "6.74 Build 99"; +blck_version = "6.74 Build 100"; _blck_version = blck_version; -_blck_versionDate = "12-14-17 4:00 PM"; +_blck_versionDate = "12-18-17 7:00 PM"; blck_pvs_version = _blck_version; publicVariable blck_pvs_version;