Special Missions should actually work now!

https://github.com/Defent/DMS_Exile/wiki/Changelog#march-8-2017-545-pm-cst-america
This commit is contained in:
eraser1 2017-03-08 17:40:21 -06:00
parent 1ddfe06bd9
commit 0821fac8a1
2 changed files with 12 additions and 8 deletions

View File

@ -4,7 +4,7 @@ class CfgPatches
{
units[] = {};
weapons[] = {};
a3_DMS_version = "February 25, 2017";
a3_DMS_version = "March 8, 2017";
requiredVersion = 1.66;
requiredAddons[] = {"exile_client","exile_server_config"};
};

View File

@ -80,21 +80,25 @@ if (diag_fps >= DMS_MinServerFPS && {_playerCount >= DMS_MinPlayerCount}) then
"_timeBetween"
];
private _timesPerRestart = missionNamespace getVariable format["DMS_SpecialMissionSpawnCount_%1",_mission];
private _timesSpawned = missionNamespace getVariable format["DMS_SpecialMissionSpawnCount_%1",_mission];
if
(
(_playerCount > _minPlayers) &&
{_playerCount < _maxPlayers} &&
{_maxTimesPerRestart < _timesPerRestart} &&
{_maxTimesPerRestart > _timesSpawned} &&
{(_time - (missionNamespace getVariable format["DMS_SpecialMissionLastSpawn_%1",_mission])) > _timeBetween}
) then
{
private _missionCode = missionNamespace getVariable format
private _missionCode =
[
missionNamespace getVariable format
[
"DMS_SpecialMission_%1",
"no"
];
_mission
]
] param [0, "no",[{}]];
if (_missionCode isEqualTo "no") then
{
@ -102,7 +106,7 @@ if (diag_fps >= DMS_MinServerFPS && {_playerCount >= DMS_MinPlayerCount}) then
}
else
{
missionNamespace setVariable [format["DMS_SpecialMissionSpawnCount_%1",_mission], _timesPerRestart+1];
missionNamespace setVariable [format["DMS_SpecialMissionSpawnCount_%1",_mission], _timesSpawned+1];
call _missionCode;