Compatibility for HC?

This commit is contained in:
eraser1 2015-09-02 12:16:22 -05:00
parent 4fef19a66c
commit 3934384ce9
3 changed files with 33 additions and 11 deletions

View File

@ -13,6 +13,7 @@ DMS_CleanUpList = [];
DMS_MissionCount = 0;
DMS_RunningBMissionCount = 0;
DMS_BMissionLastStart = diag_tickTime;
DMS_HC_Object = objNull;
DMS_BMissionDelay = (DMS_TimeBetweenMissions select 0) + random((DMS_TimeBetweenMissions select 1) - (DMS_TimeBetweenMissions select 0));

View File

@ -17,20 +17,31 @@ if !(DMS_ai_offload_to_client) exitWith {};
_group = _x;
if ((!isNull _leader) && {(alive _leader) && {!isPlayer _leader}}) then
{
_owner = objNull;
if (isNull DMS_HC_Object) then
{
if ((groupOwner _group) isEqualTo (owner _x)) exitWith
_owner = objNull;
{
_owner = _x;
if ((groupOwner _group) isEqualTo (owner _x)) exitWith
{
_owner = _x;
};
false;
} count allPlayers;
if ((isNull _owner) || {(_owner distance2D _leader)>3500}) then
{
[_group,_leader] call DMS_SetAILocality;
};
false;
} count allPlayers;
if ((isNull _owner) || {(_owner distance2D _leader)>3500}) then
}
else
{
[_group,_leader] call DMS_SetAILocality;
if (DMS_DEBUG) then
{
diag_log format ["Setting ownership of group %1 to HC (%2)",DMS_HC_Object];
};
_group setGroupOwner (owner DMS_HC_Object);
};
};
};

View File

@ -11,4 +11,14 @@ _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
Repack the a3_dms folder with a PBO tool and follow the "To install:" steps :D
HEADLESS CLIENT:
Add this code to the TOP if your initPlayerLocal.sqf
if (!hasInterface && !isServer) then
{
DMS_HC_Object = player;
publicVariableServer "DMS_HC_Object";
};