mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
commit
f0d25fb718
@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
// If you're gonna make any changes to DMS functions and/or create any new missions, it's a good idea to enable this :)
|
||||
DMS_DEBUG = false;
|
||||
DMS_DEBUG = true;
|
||||
|
||||
|
||||
|
||||
|
@ -15,11 +15,24 @@ EAST setFriend[RESISTANCE,0];
|
||||
EAST setFriend[WEST,0];
|
||||
WEST setFriend[EAST,0];
|
||||
|
||||
if(DMS_StaticMission) then {
|
||||
_code =
|
||||
{
|
||||
"DMS_HC_INIT" addPublicVariableEventHandler
|
||||
{
|
||||
DMS_HC_Object = _this select 1 select 0;
|
||||
diag_log format ["DMS Headless Client :: DMS_HC_Object = %1 | serverTime: %2",DMS_HC_Object,(_this select 1 select 1)];
|
||||
};
|
||||
};
|
||||
[0, _code, [], false] call ExileServer_system_thread_addTask;
|
||||
|
||||
|
||||
if(DMS_StaticMission) then
|
||||
{
|
||||
call compileFinal preprocessFileLineNumbers "\x\addons\dms\static\static_init.sqf";//<---- TODO
|
||||
};
|
||||
|
||||
if (DMS_DynamicMission) then {
|
||||
if (DMS_DynamicMission) then
|
||||
{
|
||||
call compileFinal preprocessFileLineNumbers "\x\addons\dms\missions\mission_init.sqf";
|
||||
execFSM "\x\addons\dms\FSM\missions.fsm";
|
||||
};
|
||||
|
@ -11,6 +11,8 @@ vehicle_patrol = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts
|
||||
vehicle_monitor = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\vehicle_monitor.sqf";
|
||||
*/
|
||||
|
||||
DMS_HC_Object = objNull;
|
||||
|
||||
//Completed or WIP
|
||||
DMS_selectMission = compileFinal preprocessFileLineNumbers "\x\addons\dms\missions\SelectMission.sqf";
|
||||
DMS_MissionsMonitor = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\MissionsMonitor.sqf";
|
||||
|
@ -17,6 +17,12 @@ if !(DMS_ai_offload_to_client) exitWith {};
|
||||
_group = _x;
|
||||
if ((!isNull _leader) && {(alive _leader) && {!isPlayer _leader}}) then
|
||||
{
|
||||
if (isNull DMS_HC_Object) then
|
||||
{
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG AILocalityManager :: DMS_HC_Object is null! Finding owner for group: %1",_group];
|
||||
};
|
||||
_owner = objNull;
|
||||
|
||||
{
|
||||
@ -32,6 +38,15 @@ if !(DMS_ai_offload_to_client) exitWith {};
|
||||
{
|
||||
[_group,_leader] call DMS_SetAILocality;
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG AILocalityManager :: Setting ownership of group %1 to HC (%2)",_group,DMS_HC_Object];
|
||||
};
|
||||
_group setGroupOwner (owner DMS_HC_Object);
|
||||
};
|
||||
};
|
||||
};
|
||||
false;
|
||||
|
Binary file not shown.
14
README.md
14
README.md
@ -12,3 +12,17 @@ _aLocalM = ["DMS_MissionMarkerCircle","DMS_MissionMarkerDot"];
|
||||
OPTIONAL:
|
||||
Download the a3_dms folder and edit the config.sqf to your preferences.
|
||||
Repack the a3_dms folder with a PBO tool and follow the "To install:" steps :D
|
||||
|
||||
|
||||
HEADLESS CLIENT:
|
||||
Add this code to the TOP of your initPlayerLocal.sqf
|
||||
|
||||
if (!hasInterface && !isServer) then
|
||||
{
|
||||
1 spawn
|
||||
{
|
||||
waitUntil {player==player};
|
||||
DMS_HC_Object = player;
|
||||
publicVariableServer "DMS_HC_Object";
|
||||
};
|
||||
};
|
Loading…
Reference in New Issue
Block a user