Preserve unit name in toolbar

This commit is contained in:
SilentSpike 2015-07-22 14:57:38 +01:00
parent 766b1e1dcd
commit 3d290977e5

View File

@ -35,15 +35,19 @@ _toolbar = _display displayCtrl IDC_TOOL;
if (GVAR(camMode) == 0) then { if (GVAR(camMode) == 0) then {
_vision = if (GVAR(camVision) >= 0) then {localize LSTRING(VisionThermal)} else { [localize LSTRING(VisionNight), localize LSTRING(VisionNormal)] select (GVAR(camVision) < -1) }; _vision = if (GVAR(camVision) >= 0) then {localize LSTRING(VisionThermal)} else { [localize LSTRING(VisionNight), localize LSTRING(VisionNormal)] select (GVAR(camVision) < -1) };
_fov = format ["%1x", floor(GVAR(camZoom) * 100) * 0.01]; _fov = format ["%1x", floor(GVAR(camZoom) * 100) * 0.01];
_name = localize "STR_VOICE_MASK_NONE";
_speed = format ["%1 m/s", floor(GVAR(camSpeed) * 100) * 0.01]; _speed = format ["%1 m/s", floor(GVAR(camSpeed) * 100) * 0.01];
} else { } else {
_vision = format ["%1 m", floor(getPosASL GVAR(camUnit) select 2)]; _vision = format ["%1 m", floor(getPosASL GVAR(camUnit) select 2)];
_fov = WFSideText (group GVAR(camUnit)); _fov = WFSideText (group GVAR(camUnit));
_name = name GVAR(camUnit);
_speed = format ["%1 km/h", floor(speed GVAR(camUnit)) max 0]; _speed = format ["%1 km/h", floor(speed GVAR(camUnit)) max 0];
}; };
if (isNull GVAR(camUnit)) then {
_name = localize "STR_VOICE_MASK_NONE";
} else {
_name = name GVAR(camUnit);
};
_mode = [localize LSTRING(ViewFree),localize LSTRING(ViewInternal),localize LSTRING(ViewExternal)] select GVAR(camMode); _mode = [localize LSTRING(ViewFree),localize LSTRING(ViewInternal),localize LSTRING(ViewExternal)] select GVAR(camMode);
_time = [daytime,"HH:MM"] call BIS_fnc_timeToString; _time = [daytime,"HH:MM"] call BIS_fnc_timeToString;