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 :)
|
// 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];
|
EAST setFriend[WEST,0];
|
||||||
WEST setFriend[EAST,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
|
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";
|
call compileFinal preprocessFileLineNumbers "\x\addons\dms\missions\mission_init.sqf";
|
||||||
execFSM "\x\addons\dms\FSM\missions.fsm";
|
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";
|
vehicle_monitor = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\vehicle_monitor.sqf";
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
DMS_HC_Object = objNull;
|
||||||
|
|
||||||
//Completed or WIP
|
//Completed or WIP
|
||||||
DMS_selectMission = compileFinal preprocessFileLineNumbers "\x\addons\dms\missions\SelectMission.sqf";
|
DMS_selectMission = compileFinal preprocessFileLineNumbers "\x\addons\dms\missions\SelectMission.sqf";
|
||||||
DMS_MissionsMonitor = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\MissionsMonitor.sqf";
|
DMS_MissionsMonitor = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\MissionsMonitor.sqf";
|
||||||
|
@ -17,20 +17,35 @@ if !(DMS_ai_offload_to_client) exitWith {};
|
|||||||
_group = _x;
|
_group = _x;
|
||||||
if ((!isNull _leader) && {(alive _leader) && {!isPlayer _leader}}) then
|
if ((!isNull _leader) && {(alive _leader) && {!isPlayer _leader}}) then
|
||||||
{
|
{
|
||||||
_owner = objNull;
|
if (isNull DMS_HC_Object) then
|
||||||
|
|
||||||
{
|
{
|
||||||
if ((groupOwner _group) isEqualTo (owner _x)) exitWith
|
if (DMS_DEBUG) then
|
||||||
{
|
{
|
||||||
_owner = _x;
|
diag_log format ["DMS_DEBUG AILocalityManager :: DMS_HC_Object is null! Finding owner for group: %1",_group];
|
||||||
};
|
};
|
||||||
|
_owner = objNull;
|
||||||
|
|
||||||
false;
|
{
|
||||||
} count allPlayers;
|
if ((groupOwner _group) isEqualTo (owner _x)) exitWith
|
||||||
|
{
|
||||||
|
_owner = _x;
|
||||||
|
};
|
||||||
|
|
||||||
if ((isNull _owner) || {(_owner distance2D _leader)>3500}) then
|
false;
|
||||||
|
} count allPlayers;
|
||||||
|
|
||||||
|
if ((isNull _owner) || {(_owner distance2D _leader)>3500}) then
|
||||||
|
{
|
||||||
|
[_group,_leader] call DMS_SetAILocality;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
[_group,_leader] call DMS_SetAILocality;
|
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);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Binary file not shown.
16
README.md
16
README.md
@ -11,4 +11,18 @@ _aLocalM = ["DMS_MissionMarkerCircle","DMS_MissionMarkerDot"];
|
|||||||
|
|
||||||
OPTIONAL:
|
OPTIONAL:
|
||||||
Download the a3_dms folder and edit the config.sqf to your preferences.
|
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
|
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