2015-08-29 01:48:18 +00:00
|
|
|
/*
|
2015-09-05 03:40:00 +00:00
|
|
|
DMS_fnc_selectMission
|
2015-08-29 01:48:18 +00:00
|
|
|
Influenced by WAI
|
|
|
|
Created by eraser1
|
|
|
|
|
|
|
|
Selects/Spawns missions. Takes no arguments, returns nothing.
|
|
|
|
*/
|
|
|
|
private "_time";
|
|
|
|
|
|
|
|
_time = diag_tickTime;
|
|
|
|
|
2015-09-21 04:42:33 +00:00
|
|
|
if (DMS_RunningBMissionCount >= DMS_MaxBanditMissions) then
|
2015-08-29 01:48:18 +00:00
|
|
|
{
|
|
|
|
DMS_BMissionLastStart = _time;
|
|
|
|
};
|
|
|
|
|
2015-09-21 04:42:33 +00:00
|
|
|
if (diag_fps >= DMS_MinServerFPS && {(count allPlayers) >= DMS_MinPlayerCount}) then
|
2015-08-29 01:48:18 +00:00
|
|
|
{
|
2015-09-21 04:42:33 +00:00
|
|
|
// More Mission types coming soon
|
|
|
|
if (_time - DMS_BMissionLastStart > DMS_BMissionDelay) then
|
2015-08-29 01:48:18 +00:00
|
|
|
{
|
2015-09-21 04:42:33 +00:00
|
|
|
private "_mission";
|
|
|
|
_mission = DMS_BanditMissionTypesArray call BIS_fnc_selectRandom;
|
2015-08-29 01:48:18 +00:00
|
|
|
|
2015-09-21 04:42:33 +00:00
|
|
|
[_mission] call DMS_fnc_SpawnBanditMission;
|
|
|
|
};
|
2015-08-29 01:48:18 +00:00
|
|
|
};
|