Further Bug fixes and code improvements
This commit is contained in:
parent
e1cb05f87d
commit
8cb980c44b
@ -25,6 +25,9 @@ while {true} do
|
||||
if (diag_tickTime > _timer1sec) then
|
||||
{
|
||||
[] call blck_fnc_vehicleMonitor;
|
||||
#ifdef GRGserver
|
||||
[] call blck_fnc_broadcastServerFPS;
|
||||
#endif
|
||||
_timer1sec = diag_tickTime + 1;
|
||||
};
|
||||
if (diag_tickTime > _timer5sec) then
|
||||
|
@ -11,28 +11,31 @@
|
||||
*/
|
||||
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
||||
private["_playerType","_players"];
|
||||
|
||||
_playerType = ["LandVehicle","SHIP","AIR","TANK"];
|
||||
switch (toLower(blck_modType)) do
|
||||
{
|
||||
case "exile": {_playerType = ["Exile_Unit_Player"]};
|
||||
case "epoch": {_playerType = ["Epoch_Male_F","Epoch_Female_F"]};
|
||||
case "exile": {_playerType = _playerType + ["Exile_Unit_Player"]};
|
||||
case "epoch": {_playerType = _playerType + ["Epoch_Male_F","Epoch_Female_F"]};
|
||||
};
|
||||
{
|
||||
private _players = (leader _x) nearEntities [_playerType, blck_simulationEnabledDistance];
|
||||
if (count _players > 0) then
|
||||
private _group = _x;
|
||||
_players = ((leader _group) nearEntities [_playerType, blck_simulationEnabledDistance]) select {isplayer _x};
|
||||
|
||||
if !(_players isEqualTo []) then
|
||||
{
|
||||
private _group = _x;
|
||||
if (blck_revealMode isEqualTo "detailed") then
|
||||
{
|
||||
if !(simulationEnabled _x) then
|
||||
{
|
||||
_x enableSimulationGlobal true;
|
||||
(_players select 0) reveal _x; // Force simulation on
|
||||
}forEach (units _group);
|
||||
} else {
|
||||
_x enableSimulationGlobal true;
|
||||
(_players select 0) reveal _x; // Force simulation on
|
||||
};
|
||||
};
|
||||
}forEach (units _group);
|
||||
}else{
|
||||
{_x enableSimulationGlobal false}forEach (units _x);
|
||||
{
|
||||
if (simulationEnabled _x) then
|
||||
{
|
||||
_x enableSimulationGlobal false;
|
||||
};
|
||||
}forEach (units _x);
|
||||
};
|
||||
} forEach blck_monitoredMissionAIGroups;
|
||||
|
@ -23,9 +23,9 @@ diag_log format["_fnc_missionGroupMonitor (4/29:4:09 PM)::-->> running function
|
||||
#ifdef blck_debugMode
|
||||
if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: executing function at %1",diag_tickTime];};
|
||||
#endif
|
||||
[] call blck_fnc_cleanEmptyGroups;
|
||||
//[] call blck_fnc_cleanEmptyGroups;
|
||||
uiSleep 0.1;
|
||||
//[] call bck_fnc_groupWaypointMonitor;
|
||||
|
||||
if (blck_simulationManager == blck_useBlckeaglsSimulationManagement) then {call blck_fnc_blckSimulationManager};
|
||||
//if (blck_simulationManager == blck_useBlckeaglsSimulationManagement) then {call blck_fnc_blckSimulationManager};
|
||||
|
||||
|
@ -21,4 +21,5 @@ _chute setPos [getPos _chute select 0, getPos _chute select 1, _dropHeight];
|
||||
_crate setPos (getPos _chute);
|
||||
_crate attachTo [_chute, [0,0,0]];
|
||||
if (_crateVisualMarker) then {[_crate] spawn blck_fnc_crateMarker};
|
||||
_chute
|
||||
|
||||
|
@ -117,6 +117,7 @@ if (blck_debugLevel > 1) then
|
||||
|
||||
_wep setVariable["GRG_vehType","emplaced"];
|
||||
_wep setPos _pos;
|
||||
_wep setdir (random 359);
|
||||
[_wep,false] call blck_fnc_configureMissionVehicle;
|
||||
_emplacedWeps pushback _wep;
|
||||
_units = units _empGroup;
|
||||
|
@ -21,11 +21,14 @@ _aiList = +blck_deadAI;
|
||||
if (diag_tickTime > _x getVariable ["blck_cleanupAt",0]) then
|
||||
{
|
||||
_ai = _x;
|
||||
{
|
||||
deleteVehicle _x;
|
||||
}forEach nearestObjects [getPos _ai,["WeaponHolderSimulated","GroundWeapoonHolder"],3];
|
||||
blck_deadAI = blck_deadAI - [_ai];
|
||||
deleteVehicle _ai;
|
||||
_nearplayer = (_ai nearEntities 1500) select {isplayer _x};
|
||||
if (_nearplayer isequalto []) then {
|
||||
{
|
||||
deleteVehicle _x;
|
||||
}forEach nearestObjects [getPos _ai,["WeaponHolderSimulated","GroundWeapoonHolder"],3];
|
||||
blck_deadAI = blck_deadAI - [_ai];
|
||||
deleteVehicle _ai;
|
||||
};
|
||||
};
|
||||
} forEach _aiList;
|
||||
|
||||
|
@ -163,6 +163,11 @@ private _functions = [
|
||||
missionnamespace setvariable [_name,compileFinal preprocessFileLineNumbers _path];
|
||||
} foreach _functions;
|
||||
|
||||
#ifdef GRGserver
|
||||
blck_fnc_broadcastServerFPS = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_broadcastServerFPS.sqf";
|
||||
diag_log "blck_functions loaded using GRGserver settings ---- >>>> ";
|
||||
#endif
|
||||
|
||||
onPlayerDisconnected {[_name,_owner] call blck_fnc_onPlayerDisconnected;};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user