Skip to content

Commit

Permalink
fix #25 preparation time 0 breaks linearSD
Browse files Browse the repository at this point in the history
  • Loading branch information
McDiod committed Jan 27, 2019
1 parent 488857a commit 9d57d6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions functions/linearSD/fn_startNewRound.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ publicVariable QGVAR(roundNumber);
sleep 8;

// preparation time is handled by mission setup in first round
if (GVAR(roundNumber) > 1) then {
[["PREPARATION_TIME", 0] call BIS_fnc_getParamValue,{
if (GVAR(roundNumber) > 1 || (["PREPARATION_TIME", 0] call BIS_fnc_getParamValue) == 0) then {
[(["PREPARATION_TIME", 0] call BIS_fnc_getParamValue) max 10,{
missionNamespace setVariable [QGVAR(roundTimeLeft),GVAR(roundLength),true];
missionNamespace setVariable [QGVAR(roundInProgress),true,true];
}] call EFUNC(missionSetup,startPreparationTime);
Expand Down
2 changes: 1 addition & 1 deletion functions/missionSetup/fn_startPreparationTime.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

params [["_preparationTime",0],["_onComplete",{}]];

if (_preparationTime <= 0) exitWith {};
if (_preparationTime <= 0) exitWith _onComplete;
_preparationTime = _preparationTime max 5;

[{
Expand Down

0 comments on commit 9d57d6c

Please sign in to comment.