Skip to content

Commit

Permalink
Simplify and fix briefing stage
Browse files Browse the repository at this point in the history
  • Loading branch information
James Kingsley committed Aug 7, 2016
1 parent 937f809 commit f3d4361
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
6 changes: 1 addition & 5 deletions ARCMF.VR/f/arc/misc/fn_displayBriefingTime.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@
* Public: No
*/

if (isNil "ARC_briefingTimeStart") exitWith {};
params [["_type", 0, [0]], ["_minutes", 0, [0]]];

params [["_type", 0, [0]]];

private _timeDiff = time - ARC_briefingTimeStart;
private _minutes = floor (_timeDiff / 60);
private _text = switch (_type) do {
case 0: {
format [
Expand Down
12 changes: 6 additions & 6 deletions ARCMF.VR/f/safeStart/fn_safeStartLoop.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ if (!isNil "ARC_briefingEndIntervalPFH") then {
};

[true] remoteExec ["f_fnc_safety", (playableUnits + switchableUnits)];
["Weapons are cold, waiting for admin to trigger start.", 10] remoteExecCall ["ARC_fnc_hint", 0];

ARC_briefingTimeEnd = false;

[{
ARC_briefingTimeStart = time;
ARC_briefingTimeMinutes = 0;
ARC_briefingInterval = 0;

["Weapons are cold, waiting for admin to trigger start.", 10] remoteExecCall ["ARC_fnc_hint", 0];

ARC_briefingIntervalPFH = [{
params ["_args","_handlerID"];
Expand Down Expand Up @@ -45,11 +44,12 @@ ARC_briefingTimeEnd = false;
}, 1, []] call CBA_fnc_addPerFrameHandler;
};

if (ARC_briefingInterval == 60) then {
[0] call ARC_fnc_displayBriefingTime;
if (ARC_briefingInterval == 60) exitWith {
ARC_briefingTimeMinutes = ARC_briefingTimeMinutes + 1;
[0, ARC_briefingTimeMinutes] call ARC_fnc_displayBriefingTime;
ARC_briefingInterval = 0;
};

ARC_briefingInterval = ARC_briefingInterval + 1;
}, 1, []] call CBA_fnc_addPerFrameHandler;
}, [], 2] call CBA_fnc_waitAndExecute;
}, [], 5] call CBA_fnc_waitAndExecute;

0 comments on commit f3d4361

Please sign in to comment.