Further Bug fixes and code improvements

This commit is contained in:
Chris Cardozo 2018-11-27 22:01:34 -05:00
parent e1cb05f87d
commit 8cb980c44b
7 changed files with 37 additions and 21 deletions

View File

@ -25,6 +25,9 @@ while {true} do
if (diag_tickTime > _timer1sec) then if (diag_tickTime > _timer1sec) then
{ {
[] call blck_fnc_vehicleMonitor; [] call blck_fnc_vehicleMonitor;
#ifdef GRGserver
[] call blck_fnc_broadcastServerFPS;
#endif
_timer1sec = diag_tickTime + 1; _timer1sec = diag_tickTime + 1;
}; };
if (diag_tickTime > _timer5sec) then if (diag_tickTime > _timer5sec) then

View File

@ -11,28 +11,31 @@
*/ */
#include "\q\addons\custom_server\Configs\blck_defines.hpp"; #include "\q\addons\custom_server\Configs\blck_defines.hpp";
private["_playerType","_players"]; private["_playerType","_players"];
_playerType = ["LandVehicle","SHIP","AIR","TANK"];
switch (toLower(blck_modType)) do switch (toLower(blck_modType)) do
{ {
case "exile": {_playerType = ["Exile_Unit_Player"]}; case "exile": {_playerType = _playerType + ["Exile_Unit_Player"]};
case "epoch": {_playerType = ["Epoch_Male_F","Epoch_Female_F"]}; case "epoch": {_playerType = _playerType + ["Epoch_Male_F","Epoch_Female_F"]};
}; };
{ {
private _players = (leader _x) nearEntities [_playerType, blck_simulationEnabledDistance]; private _group = _x;
if (count _players > 0) then _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; _x enableSimulationGlobal true;
(_players select 0) reveal _x; // Force simulation on (_players select 0) reveal _x; // Force simulation on
}forEach (units _group); };
} else { }forEach (units _group);
_x enableSimulationGlobal true;
(_players select 0) reveal _x; // Force simulation on
};
}else{ }else{
{_x enableSimulationGlobal false}forEach (units _x); {
if (simulationEnabled _x) then
{
_x enableSimulationGlobal false;
};
}forEach (units _x);
}; };
} forEach blck_monitoredMissionAIGroups; } forEach blck_monitoredMissionAIGroups;

View File

@ -23,9 +23,9 @@ diag_log format["_fnc_missionGroupMonitor (4/29:4:09 PM)::-->> running function
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: executing function at %1",diag_tickTime];}; if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: executing function at %1",diag_tickTime];};
#endif #endif
[] call blck_fnc_cleanEmptyGroups; //[] call blck_fnc_cleanEmptyGroups;
uiSleep 0.1; uiSleep 0.1;
//[] call bck_fnc_groupWaypointMonitor; //[] call bck_fnc_groupWaypointMonitor;
if (blck_simulationManager == blck_useBlckeaglsSimulationManagement) then {call blck_fnc_blckSimulationManager}; //if (blck_simulationManager == blck_useBlckeaglsSimulationManagement) then {call blck_fnc_blckSimulationManager};

View File

@ -21,4 +21,5 @@ _chute setPos [getPos _chute select 0, getPos _chute select 1, _dropHeight];
_crate setPos (getPos _chute); _crate setPos (getPos _chute);
_crate attachTo [_chute, [0,0,0]]; _crate attachTo [_chute, [0,0,0]];
if (_crateVisualMarker) then {[_crate] spawn blck_fnc_crateMarker}; if (_crateVisualMarker) then {[_crate] spawn blck_fnc_crateMarker};
_chute

View File

@ -117,6 +117,7 @@ if (blck_debugLevel > 1) then
_wep setVariable["GRG_vehType","emplaced"]; _wep setVariable["GRG_vehType","emplaced"];
_wep setPos _pos; _wep setPos _pos;
_wep setdir (random 359);
[_wep,false] call blck_fnc_configureMissionVehicle; [_wep,false] call blck_fnc_configureMissionVehicle;
_emplacedWeps pushback _wep; _emplacedWeps pushback _wep;
_units = units _empGroup; _units = units _empGroup;

View File

@ -21,11 +21,14 @@ _aiList = +blck_deadAI;
if (diag_tickTime > _x getVariable ["blck_cleanupAt",0]) then if (diag_tickTime > _x getVariable ["blck_cleanupAt",0]) then
{ {
_ai = _x; _ai = _x;
{ _nearplayer = (_ai nearEntities 1500) select {isplayer _x};
deleteVehicle _x; if (_nearplayer isequalto []) then {
}forEach nearestObjects [getPos _ai,["WeaponHolderSimulated","GroundWeapoonHolder"],3]; {
blck_deadAI = blck_deadAI - [_ai]; deleteVehicle _x;
deleteVehicle _ai; }forEach nearestObjects [getPos _ai,["WeaponHolderSimulated","GroundWeapoonHolder"],3];
blck_deadAI = blck_deadAI - [_ai];
deleteVehicle _ai;
};
}; };
} forEach _aiList; } forEach _aiList;

View File

@ -163,6 +163,11 @@ private _functions = [
missionnamespace setvariable [_name,compileFinal preprocessFileLineNumbers _path]; missionnamespace setvariable [_name,compileFinal preprocessFileLineNumbers _path];
} foreach _functions; } 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;}; onPlayerDisconnected {[_name,_owner] call blck_fnc_onPlayerDisconnected;};