Merge pull request #68 from Ghostrider-DbD-/Version-6.74-Build-100
Attempt to fix an issues with vehicles not unlocking when all AI dead.
This commit is contained in:
commit
bae58e162d
@ -48,15 +48,24 @@ while {true} do
|
|||||||
[] call blck_fnc_cleanupObjects;
|
[] call blck_fnc_cleanupObjects;
|
||||||
[] call blck_fnc_cleanupDeadAI;
|
[] call blck_fnc_cleanupDeadAI;
|
||||||
_timer20sec = diag_tickTime;
|
_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
|
if ((diag_tickTime - _timer1min) > 60) then
|
||||||
{
|
{
|
||||||
|
//diag_log format["_fnc_mainThread: 60 second events run at %1",diag_tickTime];
|
||||||
_timer1min = diag_tickTime;
|
_timer1min = diag_tickTime;
|
||||||
[] call blck_fnc_timeAcceleration;
|
[] call blck_fnc_timeAcceleration;
|
||||||
//diag_log format["_fnc_mainThread: calling blck_fnc_spawnPendingMissions at %1",diag_tickTime];
|
|
||||||
[] call blck_fnc_spawnPendingMissions;
|
[] 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
|
if (blck_useHC) then
|
||||||
{
|
{
|
||||||
//diag_log format["_mainThread:: calling blck_fnc_passToHCs at diag_tickTime = %1",diag_tickTime];
|
//diag_log format["_mainThread:: calling blck_fnc_passToHCs at diag_tickTime = %1",diag_tickTime];
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
Updates the mission que.
|
Updates the mission que.
|
||||||
Updates mission markers.
|
Updates mission markers.
|
||||||
By Ghostrider GRG
|
By Ghostrider GRG
|
||||||
10/9/17
|
12/18/17
|
||||||
|
|
||||||
--------------------------
|
--------------------------
|
||||||
License
|
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)
|
_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
|
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];
|
(blck_monitoredVehicles select _posnVeh) setVariable ["missionCompleted", diag_tickTime];
|
||||||
} else {
|
} else {
|
||||||
_x setVariable ["missionCompleted", diag_tickTime];
|
_x setVariable ["missionCompleted", diag_tickTime];
|
||||||
|
@ -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];
|
[_coords,_missionToSpawn,_allowReinforcements] spawn compileFinal preprocessFileLineNumbers format["\q\addons\custom_server\Missions\%1\%2.sqf",_missionPath,_missionName];
|
||||||
blck_missionsRunning = blck_missionsRunning + 1;
|
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
|
true
|
||||||
|
@ -20,6 +20,8 @@ if (blck_debugLevel > 1) then {diag_log format["spawnVehicle.sqf: _vehType = %1
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
_veh = createVehicle[_vehType, _pos, [], 0, "NONE"];
|
_veh = createVehicle[_vehType, _pos, [], 0, "NONE"];
|
||||||
|
_veh allowDamage true;
|
||||||
|
_veh enableRopeAttach true;
|
||||||
_veh setVariable["blck_vehicle",true];
|
_veh setVariable["blck_vehicle",true];
|
||||||
[_veh] call blck_fnc_protectVehicle;
|
[_veh] call blck_fnc_protectVehicle;
|
||||||
|
|
||||||
|
@ -23,34 +23,34 @@
|
|||||||
*/
|
*/
|
||||||
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
#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
|
#ifdef blck_debugMode
|
||||||
//diag_log format["_fnc_vehicleMonitor:: blck_debugMode defined"];
|
//diag_log format["_fnc_vehicleMonitor:: blck_debugMode defined"];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_fn_releaseVehicle = {
|
_fn_releaseVehicle = {
|
||||||
params["_v"];
|
params["_veh"];
|
||||||
blck_monitoredVehicles = blck_monitoredVehicles - [_veh];
|
blck_monitoredVehicles = blck_monitoredVehicles - [_veh];
|
||||||
_v setVehicleLock "UNLOCKED" ;
|
_veh setVehicleLock "UNLOCKED" ;
|
||||||
//_v setVariable["releasedToPlayers",true];
|
//_v setVariable["releasedToPlayers",true];
|
||||||
//[_v] call blck_fnc_emptyObject;
|
//[_v] call blck_fnc_emptyObject;
|
||||||
{
|
{
|
||||||
_v removealleventhandlers _x;
|
_veh removealleventhandlers _x;
|
||||||
} forEach ["GetIn","GetOut","fired","hit","hitpart","reloaded","dammaged","HandleDamage"];
|
} 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
|
#ifdef blck_debugMode
|
||||||
if (blck_debugLevel > 3) then
|
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
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
_fn_destroyVehicleAndCrew = {
|
_fn_destroyVehicleAndCrew = {
|
||||||
params["_veh"];
|
params["_veh"];
|
||||||
private["_crew"];
|
//private["_crew"];
|
||||||
_crew = crew _veh;
|
//_crew = crew _veh;
|
||||||
{[_x] call blck_fnc_deleteAI;} forEach _crew;
|
{[_x] call blck_fnc_deleteAI;} forEach (crew _veh);
|
||||||
[_veh] call blck_fn_deleteAIvehicle;
|
[_veh] call blck_fn_deleteAIvehicle;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -81,23 +81,24 @@ _fn_reloadAmmo = {
|
|||||||
} forEach _crew;
|
} forEach _crew;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
blck_fn_deleteAIvehicle = {
|
blck_fn_deleteAIvehicle = {
|
||||||
params["_veh"];
|
params["_veh"];
|
||||||
{
|
{
|
||||||
_veh removeAllEventHandlers _x;
|
_veh removeAllEventHandlers _x;
|
||||||
}forEach ["Hit","HitPart","GetIn","GetOut","Fired","FiredNear"];
|
}forEach ["Hit","HitPart","GetIn","GetOut","Fired","FiredNear","HandleDamage","Reloaded"];
|
||||||
blck_monitoredVehicles = blck_monitoredVehicles - [_veh];
|
blck_monitoredVehicles = blck_monitoredVehicles - [_veh];
|
||||||
deleteVehicle _veh;
|
deleteVehicle _veh;
|
||||||
};
|
};
|
||||||
private ["_veh","_vehList"];
|
|
||||||
_vehList = +blck_monitoredVehicles;
|
private _vehList = +blck_monitoredVehicles;
|
||||||
|
|
||||||
#ifdef blck_debugMode
|
#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];};
|
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
|
#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
|
#ifdef blck_debugMode
|
||||||
if (blck_debugLevel > 3) then
|
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];
|
diag_log format["_fnc_vehicleMonitor: vehicle %1 with missionCompleted = %2 being evaluated",_x, _x getVariable"missionCompleted",0];
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
private["_evaluate"];
|
private _evaluate = true;
|
||||||
_evaluate = true;
|
|
||||||
// Case where vehicle has been marked for deletion after a certain time.
|
// 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;
|
[_veh] call _fn_destroyVehicleAndCrew;
|
||||||
_evaluate = false;
|
_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 (_evaluate) then
|
||||||
{
|
{
|
||||||
if ( (_veh getVariable["DBD_vehType","none"] isEqualTo "emplaced") && {alive _x} count crew _veh isEqualTo 0) then
|
if ( (_veh getVariable["DBD_vehType","none"] isEqualTo "emplaced") && {alive _x} count crew _veh isEqualTo 0) then
|
||||||
{
|
{
|
||||||
if (blck_killEmptyStaticWeapons) then
|
if (blck_killEmptyStaticWeapons) then
|
||||||
{
|
{
|
||||||
|
diag_log format["_fnc_vehicleMonitor:: case of destroyed where vehicle = %1",_veh];
|
||||||
|
|
||||||
#ifdef blck_debugMode
|
#ifdef blck_debugMode
|
||||||
if (blck_debugLevel > 3) then {diag_log format["_fnc_vehicleMonitor:: case of destroyed where vehicle = %1",_veh];};
|
if (blck_debugLevel > 3) then {diag_log format["_fnc_vehicleMonitor:: case of destroyed where vehicle = %1",_veh];};
|
||||||
#endif
|
#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 (_evaluate) then
|
||||||
{
|
{
|
||||||
if (_veh getVariable["DBD_vehType","none"] isEqualTo "none" && ({alive _x} count crew _veh isEqualTo 0) ) 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 setDamage 0.7;
|
||||||
_veh setVariable["blck_DeleteAt",diag_tickTime + 60];
|
_veh setVariable["blck_DeleteAt",diag_tickTime + 60];
|
||||||
} else {
|
} else {
|
||||||
|
diag_log format["_fnc_vehicleMonitor:: case of RELEASE where vehicle = %1 and Vehicle is typeOf %2",_veh, typeOf _veh];
|
||||||
[_veh] call _fn_releaseVehicle;
|
[_veh] call _fn_releaseVehicle;
|
||||||
};
|
};
|
||||||
_evaluate = false;
|
_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
|
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"];
|
private["_cleanupTimer"];
|
||||||
_cleanupTimer = _veh getVariable["cleanupTimer",0]; // The time delat to deleting any alive AI units
|
_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
|
// "missionCompleted" = the time at which the mission was completed or aborted
|
||||||
|
@ -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_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_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_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_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";
|
blck_fnc_HandleAIVehicleDamage = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_HandleAIVehicleDamage.sqf";
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
#include"\q\addons\custom_server\Configs\blck_defines.hpp";
|
#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_debugLevel = 0; // Sets level of detail for debugging info - WIP.
|
||||||
blck_minFPS = 8;
|
blck_minFPS = 8;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
private ["_version","_versionDate"];
|
private ["_version","_versionDate"];
|
||||||
blck_version = "6.74 Build 99";
|
blck_version = "6.74 Build 100";
|
||||||
_blck_version = blck_version;
|
_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;
|
blck_pvs_version = _blck_version;
|
||||||
publicVariable blck_pvs_version;
|
publicVariable blck_pvs_version;
|
||||||
|
Loading…
Reference in New Issue
Block a user