show_fps -> hud_fps, show_ping -> hud_ping, show_pl -> hud_pl,

show_time -> hud_time, show_scoresuid -> hud_scoreboard_uid
This commit is contained in:
Ragnvald Maartmann-Moe IV 2003-07-27 23:20:11 +00:00
parent 797dc5ccae
commit 0a7b56f003
10 changed files with 61 additions and 45 deletions

4
NEWS
View File

@ -4,7 +4,9 @@ NEWS for the QuakeForge project
Changes from 0.5.4
o more cvar renaming: scr_consize -> con_size, scr_conspeed -> con_speed,
gl_conalpha -> con_alpha, vid_conwidth -> con_width,
vid_conheight -> con_height
vid_conheight -> con_height, show_fps -> hud_fps, show_ping -> hud_ping,
show_pl -> hud_pl, show_time -> hud_time,
show_scoresuid -> hud_scoreboard_uid
o demo_speed no longer affects console scrolling or cursor blink rate
o save game loading fixed
o FPS display now updated every 0.2 seconds and displays to the tenth of

View File

@ -201,7 +201,7 @@ this document uptodate and to make it complete.
- Set vid_width and vid_height to the appropriate values.
o View Frames per second
- Set the cvar 'show_fps' to 1: /set show_fps 1
- Set the cvar 'hud_fps' to 1: /set hud_fps 1
4.2 Audio
---------

View File

@ -32,13 +32,13 @@
// r_dlight_lightmap 1 (on)
// r_shadows 1 (on)
// r_wateralpha 0.3 (translucent)
// show_fps 0 (off)
// hud_fps 0 (off)
domain sshot
global rcsid = "$Id$"
global cvars = crosshair r_dlight_lightmap r_shadows r_wateralpha show_fps
global cvars = crosshair r_dlight_lightmap r_shadows r_wateralpha hud_fps
function cvar::save {
for i in @args[1:] {
@ -58,7 +58,7 @@ function sshot {
set r_dlight_lightmap 1
set r_shadows 1
set r_wateralpha 0.3
set show_fps 0
set hud_fps 0
wait
if (#args == 2) { // named screenshot
// find next available name

View File

@ -33,7 +33,13 @@
#include <stdio.h>
#ifdef HAVE_SYSTEM_MSG_T
# define msg_t sys_msg_t
#endif
#include <sys/types.h>
#ifdef HAVE_SYSTEM_MSG_T
# undef msg_t
#endif
#define MAX_QPATH 64

View File

@ -75,8 +75,8 @@ cvar_t *m_yaw;
cvar_t *m_forward;
cvar_t *m_side;
cvar_t *show_fps;
cvar_t *show_time;
cvar_t *hud_fps;
cvar_t *hud_time;
int fps_count;
@ -135,9 +135,9 @@ CL_InitCvars (void)
"mouse forward/back speed");
m_side = Cvar_Get ("m_side", "0.8", CVAR_ARCHIVE, NULL,
"mouse strafe speed");
show_fps = Cvar_Get ("show_fps", "0", CVAR_ARCHIVE, NULL,
hud_fps = Cvar_Get ("hud_fps", "0", CVAR_ARCHIVE, NULL,
"display realtime frames per second");
show_time = Cvar_Get ("show_time", "0", CVAR_ARCHIVE, NULL,
hud_time = Cvar_Get ("hud_time", "0", CVAR_ARCHIVE, NULL,
"display the current time");
}

View File

@ -1102,9 +1102,9 @@ draw_time (view_t *view)
utc = time (NULL);
local = localtime (&utc);
if (show_time->int_val == 1) { // Use international format
if (hud_time->int_val == 1) { // Use international format
timefmt = "%k:%M";
} else if (show_time->int_val >= 2) { // US AM/PM display
} else if (hud_time->int_val >= 2) { // US AM/PM display
timefmt = "%l:%M %P";
}
@ -1133,9 +1133,9 @@ draw_fps (view_t *view)
static void
draw_stuff (view_t *view)
{
if (show_time->int_val > 0)
if (hud_time->int_val > 0)
draw_time (view);
if (show_fps->int_val > 0)
if (hud_fps->int_val > 0)
draw_fps (view);
}

View File

@ -328,8 +328,8 @@ extern struct cvar_s *cl_model_crcs;
extern struct cvar_s *rate;
extern struct cvar_s *show_ping;
extern struct cvar_s *show_pl;
extern struct cvar_s *hud_ping;
extern struct cvar_s *hud_pl;
extern struct cvar_s *skin;

View File

@ -212,10 +212,10 @@ byte *host_basepal;
byte *vid_colormap;
cvar_t *host_speeds;
cvar_t *show_fps;
cvar_t *show_ping;
cvar_t *show_pl;
cvar_t *show_time;
cvar_t *hud_fps;
cvar_t *hud_ping;
cvar_t *hud_pl;
cvar_t *hud_time;
int fps_count;
@ -229,7 +229,7 @@ char prespawn_name[] = "prespawn %i 0 %i";
char modellist_name[] = "modellist %i %i";
char soundlist_name[] = "soundlist %i %i";
extern cvar_t *cl_showscoresuid;
extern cvar_t *hud_scoreboard_uid;
static void
@ -621,7 +621,7 @@ CL_FullServerinfo_f (void)
}
if ((p = Info_ValueForKey (cl.serverinfo, "teamplay")) && *p) {
cl.teamplay = atoi (p);
Sbar_DMO_Init_f (cl_showscoresuid); // HUD setup, cl.teamplay changed
Sbar_DMO_Init_f (hud_scoreboard_uid); // HUD setup, cl.teamplay changed
}
if ((p = Info_ValueForKey (cl.serverinfo, "watervis")) && *p) {
cl.watervis = atoi (p);
@ -1289,13 +1289,13 @@ CL_Init_Cvars (void)
rcon_address = Cvar_Get ("rcon_address", "", CVAR_NONE, NULL, "server IP "
"address when client not connected - for "
"sending rcon commands");
show_fps = Cvar_Get ("show_fps", "0", CVAR_ARCHIVE, NULL,
hud_fps = Cvar_Get ("hud_fps", "0", CVAR_ARCHIVE, NULL,
"display realtime frames per second");
show_ping = Cvar_Get ("show_ping", "0", CVAR_ARCHIVE, NULL,
hud_ping = Cvar_Get ("hud_ping", "0", CVAR_ARCHIVE, NULL,
"display current ping to server");
show_pl = Cvar_Get ("show_pl", "0", CVAR_ARCHIVE, NULL,
hud_pl = Cvar_Get ("hud_pl", "0", CVAR_ARCHIVE, NULL,
"display current packet loss to server");
show_time = Cvar_Get ("show_time", "0", CVAR_ARCHIVE, NULL,
hud_time = Cvar_Get ("hud_time", "0", CVAR_ARCHIVE, NULL,
"Display the current time, 1 24hr, 2 AM/PM");
cl_predict_players = Cvar_Get ("cl_predict_players", "1", CVAR_NONE, NULL,
"If this is 0, no player prediction is "

View File

@ -167,8 +167,7 @@ int cl_h_playerindex, cl_gib1index, cl_gib2index, cl_gib3index;
int packet_latency[NET_TIMINGS];
extern cvar_t *cl_showscoresuid;
extern cvar_t *hud_scoreboard_uid;
int
@ -1102,9 +1101,18 @@ CL_ServerInfo (void)
cl.no_pogo_stick = no_pogo_stick->int_val;
} else if (strequal (key, "teamplay")) {
cl.teamplay = atoi (value);
Sbar_DMO_Init_f (cl_showscoresuid); // HUD setup, cl.teamplay changed
Sbar_DMO_Init_f (hud_scoreboard_uid); // HUD setup, cl.teamplay changed
} else if (strequal (key, "watervis")) {
cl.watervis = atoi (value);
// } else if (strequal (key, "*z_ext") {
// cl.z_ext = atoi (value);
// } else if (strequal (key, "pm_bunnyspeedcap") {
// cl.bunnyspeedcap = atof (value);
// } else if (strequal (key, "pm_slidefix") {
// movevars.slidefix = atoi (value);
// } else if (strequal (key, "pm_ktjump") {
// movevars.ktjump = atof (value);
// FIXME: need to set to 0.5 otherwise, outside of else structure
}
}

View File

@ -93,13 +93,13 @@ qboolean hudswap;
static qboolean largegame = false;
cvar_t *cl_showscoresuid;
cvar_t *fs_fraglog;
cvar_t *cl_fraglog;
cvar_t *hud_sbar;
cvar_t *hud_sbar_separator;
cvar_t *hud_swap;
cvar_t *hud_scoreboard_gravity;
cvar_t *hud_scoreboard_uid;
static view_t *sbar_view;
static view_t *sbar_inventory_view;
@ -1400,7 +1400,7 @@ Sbar_Draw_DMO_Ping_UID (view_t *view, int l, int y, int skip)
void
Sbar_DMO_Init_f (cvar_t *var)
{
// "var" is "cl_showscoresuid"
// "var" is "hud_scoreboard_uid"
if (!var) {
Sbar_Draw_DMO_func = Sbar_Draw_DMO_Ping;
return;
@ -1596,9 +1596,9 @@ draw_time (view_t *view)
utc = time (NULL);
local = localtime (&utc);
if (show_time->int_val == 1) { // Use international format
if (hud_time->int_val == 1) { // Use international format
timefmt = "%k:%M";
} else if (show_time->int_val >= 2) { // US AM/PM display
} else if (hud_time->int_val >= 2) { // US AM/PM display
timefmt = "%l:%M %P";
}
@ -1633,17 +1633,17 @@ draw_net (view_t *view)
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
SZ_Print (&cls.netchan.message, "pings");
}
if (show_ping->int_val) {
if (hud_ping->int_val) {
int ping = cl.players[cl.playernum].ping;
ping = bound (0, ping, 999);
draw_string (view, 0, 0, va ("%3d ms ", ping));
}
if (show_ping->int_val && show_pl->int_val)
if (hud_ping->int_val && hud_pl->int_val)
draw_character (view, 48, 0, '/');
if (show_pl->int_val) {
if (hud_pl->int_val) {
int lost = CL_CalcNet ();
lost = bound (0, lost, 999);
@ -1654,11 +1654,11 @@ draw_net (view_t *view)
static void
draw_stuff (view_t *view)
{
if (show_time->int_val > 0)
if (hud_time->int_val > 0)
draw_time (view);
if (show_fps->int_val > 0)
if (hud_fps->int_val > 0)
draw_fps (view);
if (cls.state == ca_active && (show_ping->int_val || show_pl->int_val))
if (cls.state == ca_active && (hud_ping->int_val || hud_pl->int_val))
draw_net (view);
}
@ -1966,7 +1966,7 @@ Sbar_Init (void)
r_viewsize_callback = viewsize_f;
cl_showscoresuid = Cvar_Get ("cl_showscoresuid", "0", CVAR_NONE,
hud_scoreboard_uid = Cvar_Get ("hud_scoreboard_uid", "0", CVAR_NONE,
Sbar_DMO_Init_f, "Set to 1 to show uid "
"instead of ping. Set to 2 to show both.");
fs_fraglog = Cvar_Get ("fs_fraglog", "qw-scores.log", CVAR_ARCHIVE, NULL,