mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
e8eedfa538
* NEW CONFIG VALUES: ```DMS_MarkerPosRandomization```, ```DMS_MarkerPosRandomRadius```, and ```DMS_RandomMarkerBrush``` * With the above configs, you can randomize the marker positions in a random position around the actual mission center. * You can also "force" DMS_fnc_CreateMarker to randomize (or not randomize) the marker position with optional boolean parameter of index 3. * Changed the default (non-randomized) circle marker "brush". It should be a solid circle. * Created new functions ```DMS_fnc_SelectOffsetPos``` and ```DMS_fnc_SelectRandomVal``` * Adjusted a couple functions to use them. * Fixed ```DMS_fnc_IsNearWater```.
35 lines
982 B
Plaintext
35 lines
982 B
Plaintext
/*
|
|
DMS_fnc_selectMission
|
|
Influenced by WAI
|
|
Created by eraser1
|
|
|
|
Selects/Spawns missions. Takes no arguments, returns nothing.
|
|
*/
|
|
private "_time";
|
|
|
|
_time = diag_tickTime;
|
|
|
|
if (DMS_RunningBMissionCount isEqualTo DMS_MaxBanditMissions) then
|
|
{
|
|
DMS_BMissionLastStart = _time;
|
|
};
|
|
|
|
if ((_time - DMS_BMissionLastStart > DMS_BMissionDelay) && {diag_fps >= DMS_MinServerFPS && {(count allPlayers) >= DMS_MinPlayerCount}}) then
|
|
{
|
|
private "_mission";
|
|
|
|
DMS_MissionCount = DMS_MissionCount + 1;
|
|
DMS_RunningBMissionCount = DMS_RunningBMissionCount + 1;
|
|
|
|
DMS_BMissionLastStart = _time;
|
|
_mission = DMS_MissionTypesArray call BIS_fnc_selectRandom;
|
|
|
|
DMS_BMissionDelay = DMS_TimeBetweenMissions call DMS_fnc_SelectRandomVal;
|
|
|
|
if (DMS_DEBUG) then
|
|
{
|
|
diag_log format ["DMS_DEBUG SelectMission :: Spawning mission: %1 | DMS_BMissionDelay set to %2",_mission,DMS_BMissionDelay];
|
|
};
|
|
|
|
call compile preprocessFileLineNumbers (format ["\x\addons\DMS\missions\%1.sqf",_mission]);
|
|
}; |