[nexuiz-commits] r8474 - trunk/data/qcsrc/client
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Jan 3 16:55:39 EST 2010
Author: fruitiex
Date: 2010-01-03 16:55:39 -0500 (Sun, 03 Jan 2010)
New Revision: 8474
Modified:
trunk/data/qcsrc/client/sbar.qc
Log:
cl_showspeed_z to show z-axis speed as a separate number instead
Modified: trunk/data/qcsrc/client/sbar.qc
===================================================================
--- trunk/data/qcsrc/client/sbar.qc 2010-01-03 19:54:57 UTC (rev 8473)
+++ trunk/data/qcsrc/client/sbar.qc 2010-01-03 21:55:39 UTC (rev 8474)
@@ -2116,7 +2116,7 @@
{
vector numsize;
float pos, conversion_factor;
- string speed, unit;
+ string speed, zspeed, unit;
switch(cvar("cl_showspeed_unit"))
{
@@ -2147,16 +2147,19 @@
break;
}
- if (cvar("cl_showspeed_z") == 1)
- speed = strcat(ftos(floor( vlen(pmove_vel) * conversion_factor + 0.5 )), unit);
- else
- speed = strcat(ftos(floor( vlen(pmove_vel - pmove_vel_z * '0 0 1') * conversion_factor + 0.5 )), unit);
+ speed = strcat(ftos(floor( vlen(pmove_vel - pmove_vel_z * '0 0 1') * conversion_factor + 0.5 )), unit);
numsize_x = numsize_y = cvar("cl_showspeed_size");
pos = (vid_conheight - numsize_y) * cvar("cl_showspeed_position");
drawfont = sbar_bigfont;
drawstringcenter('1 0 0' + pos * '0 1 0', speed, numsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);
+
+ if (cvar("cl_showspeed_z") == 1) {
+ zspeed = strcat(ftos(fabs(floor( pmove_vel_z * conversion_factor + 0.5 ))), unit);
+ drawstringcenter('1 0 0' + pos * '0 1 0' + numsize_y * '0 1 0', zspeed, numsize * 0.5, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);
+ }
+
drawfont = sbar_font;
}
More information about the nexuiz-commits
mailing list