From 7f1f56c121b569505accbb981a8410246e0b86df Mon Sep 17 00:00:00 2001 From: commy2 Date: Thu, 1 Oct 2015 21:28:00 +0200 Subject: [PATCH] fix broken time format for rallypoints, fix #2662 --- addons/respawn/functions/fnc_moveRallypoint.sqf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/addons/respawn/functions/fnc_moveRallypoint.sqf b/addons/respawn/functions/fnc_moveRallypoint.sqf index bf96905343..89e5815a69 100644 --- a/addons/respawn/functions/fnc_moveRallypoint.sqf +++ b/addons/respawn/functions/fnc_moveRallypoint.sqf @@ -41,12 +41,18 @@ _position set [2, 0]; [localize LSTRING(Deploy)] call EFUNC(common,displayTextStructured); [{ - params ["_rallypoint", "_unit", "_position"]; + params ["_rallypoint", "_unit", "_position", "_minutes"]; _rallypoint setPosATL _position; _unit reveal _rallypoint; - _rallypoint setVariable [QGVAR(markerDate), format ["%1:%2", date select 3, date select 4], true]; + // fix leading zero + _minutes = date select 4; + if (_minutes < 10) then { + _minutes = format ["0%1", _minutes]; + }; + + _rallypoint setVariable [QGVAR(markerDate), format ["%1:%2", date select 3, _minutes], true]; ["rallypointMoved", [_rallypoint, _side, _position]] call EFUNC(common,globalEvent);