mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-29 15:41:59 +00:00
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:
parent
797dc5ccae
commit
0a7b56f003
10 changed files with 61 additions and 45 deletions
4
NEWS
4
NEWS
|
@ -4,7 +4,9 @@ NEWS for the QuakeForge project
|
||||||
Changes from 0.5.4
|
Changes from 0.5.4
|
||||||
o more cvar renaming: scr_consize -> con_size, scr_conspeed -> con_speed,
|
o more cvar renaming: scr_consize -> con_size, scr_conspeed -> con_speed,
|
||||||
gl_conalpha -> con_alpha, vid_conwidth -> con_width,
|
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 demo_speed no longer affects console scrolling or cursor blink rate
|
||||||
o save game loading fixed
|
o save game loading fixed
|
||||||
o FPS display now updated every 0.2 seconds and displays to the tenth of
|
o FPS display now updated every 0.2 seconds and displays to the tenth of
|
||||||
|
|
|
@ -201,7 +201,7 @@ this document uptodate and to make it complete.
|
||||||
- Set vid_width and vid_height to the appropriate values.
|
- Set vid_width and vid_height to the appropriate values.
|
||||||
|
|
||||||
o View Frames per second
|
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
|
4.2 Audio
|
||||||
---------
|
---------
|
||||||
|
|
|
@ -32,13 +32,13 @@
|
||||||
// r_dlight_lightmap 1 (on)
|
// r_dlight_lightmap 1 (on)
|
||||||
// r_shadows 1 (on)
|
// r_shadows 1 (on)
|
||||||
// r_wateralpha 0.3 (translucent)
|
// r_wateralpha 0.3 (translucent)
|
||||||
// show_fps 0 (off)
|
// hud_fps 0 (off)
|
||||||
|
|
||||||
domain sshot
|
domain sshot
|
||||||
|
|
||||||
global rcsid = "$Id$"
|
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 {
|
function cvar::save {
|
||||||
for i in @args[1:] {
|
for i in @args[1:] {
|
||||||
|
@ -58,7 +58,7 @@ function sshot {
|
||||||
set r_dlight_lightmap 1
|
set r_dlight_lightmap 1
|
||||||
set r_shadows 1
|
set r_shadows 1
|
||||||
set r_wateralpha 0.3
|
set r_wateralpha 0.3
|
||||||
set show_fps 0
|
set hud_fps 0
|
||||||
wait
|
wait
|
||||||
if (#args == 2) { // named screenshot
|
if (#args == 2) { // named screenshot
|
||||||
// find next available name
|
// find next available name
|
||||||
|
|
|
@ -33,7 +33,13 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_SYSTEM_MSG_T
|
||||||
|
# define msg_t sys_msg_t
|
||||||
|
#endif
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#ifdef HAVE_SYSTEM_MSG_T
|
||||||
|
# undef msg_t
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MAX_QPATH 64
|
#define MAX_QPATH 64
|
||||||
|
|
||||||
|
|
|
@ -75,8 +75,8 @@ cvar_t *m_yaw;
|
||||||
cvar_t *m_forward;
|
cvar_t *m_forward;
|
||||||
cvar_t *m_side;
|
cvar_t *m_side;
|
||||||
|
|
||||||
cvar_t *show_fps;
|
cvar_t *hud_fps;
|
||||||
cvar_t *show_time;
|
cvar_t *hud_time;
|
||||||
|
|
||||||
int fps_count;
|
int fps_count;
|
||||||
|
|
||||||
|
@ -135,9 +135,9 @@ CL_InitCvars (void)
|
||||||
"mouse forward/back speed");
|
"mouse forward/back speed");
|
||||||
m_side = Cvar_Get ("m_side", "0.8", CVAR_ARCHIVE, NULL,
|
m_side = Cvar_Get ("m_side", "0.8", CVAR_ARCHIVE, NULL,
|
||||||
"mouse strafe speed");
|
"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");
|
"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");
|
"display the current time");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1102,9 +1102,9 @@ draw_time (view_t *view)
|
||||||
utc = time (NULL);
|
utc = time (NULL);
|
||||||
local = localtime (&utc);
|
local = localtime (&utc);
|
||||||
|
|
||||||
if (show_time->int_val == 1) { // Use international format
|
if (hud_time->int_val == 1) { // Use international format
|
||||||
timefmt = "%k:%M";
|
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";
|
timefmt = "%l:%M %P";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1133,9 +1133,9 @@ draw_fps (view_t *view)
|
||||||
static void
|
static void
|
||||||
draw_stuff (view_t *view)
|
draw_stuff (view_t *view)
|
||||||
{
|
{
|
||||||
if (show_time->int_val > 0)
|
if (hud_time->int_val > 0)
|
||||||
draw_time (view);
|
draw_time (view);
|
||||||
if (show_fps->int_val > 0)
|
if (hud_fps->int_val > 0)
|
||||||
draw_fps (view);
|
draw_fps (view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -328,8 +328,8 @@ extern struct cvar_s *cl_model_crcs;
|
||||||
|
|
||||||
extern struct cvar_s *rate;
|
extern struct cvar_s *rate;
|
||||||
|
|
||||||
extern struct cvar_s *show_ping;
|
extern struct cvar_s *hud_ping;
|
||||||
extern struct cvar_s *show_pl;
|
extern struct cvar_s *hud_pl;
|
||||||
|
|
||||||
extern struct cvar_s *skin;
|
extern struct cvar_s *skin;
|
||||||
|
|
||||||
|
|
|
@ -212,10 +212,10 @@ byte *host_basepal;
|
||||||
byte *vid_colormap;
|
byte *vid_colormap;
|
||||||
|
|
||||||
cvar_t *host_speeds;
|
cvar_t *host_speeds;
|
||||||
cvar_t *show_fps;
|
cvar_t *hud_fps;
|
||||||
cvar_t *show_ping;
|
cvar_t *hud_ping;
|
||||||
cvar_t *show_pl;
|
cvar_t *hud_pl;
|
||||||
cvar_t *show_time;
|
cvar_t *hud_time;
|
||||||
|
|
||||||
int fps_count;
|
int fps_count;
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ char prespawn_name[] = "prespawn %i 0 %i";
|
||||||
char modellist_name[] = "modellist %i %i";
|
char modellist_name[] = "modellist %i %i";
|
||||||
char soundlist_name[] = "soundlist %i %i";
|
char soundlist_name[] = "soundlist %i %i";
|
||||||
|
|
||||||
extern cvar_t *cl_showscoresuid;
|
extern cvar_t *hud_scoreboard_uid;
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -621,7 +621,7 @@ CL_FullServerinfo_f (void)
|
||||||
}
|
}
|
||||||
if ((p = Info_ValueForKey (cl.serverinfo, "teamplay")) && *p) {
|
if ((p = Info_ValueForKey (cl.serverinfo, "teamplay")) && *p) {
|
||||||
cl.teamplay = atoi (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) {
|
if ((p = Info_ValueForKey (cl.serverinfo, "watervis")) && *p) {
|
||||||
cl.watervis = atoi (p);
|
cl.watervis = atoi (p);
|
||||||
|
@ -1289,13 +1289,13 @@ CL_Init_Cvars (void)
|
||||||
rcon_address = Cvar_Get ("rcon_address", "", CVAR_NONE, NULL, "server IP "
|
rcon_address = Cvar_Get ("rcon_address", "", CVAR_NONE, NULL, "server IP "
|
||||||
"address when client not connected - for "
|
"address when client not connected - for "
|
||||||
"sending rcon commands");
|
"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");
|
"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");
|
"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");
|
"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");
|
"Display the current time, 1 24hr, 2 AM/PM");
|
||||||
cl_predict_players = Cvar_Get ("cl_predict_players", "1", CVAR_NONE, NULL,
|
cl_predict_players = Cvar_Get ("cl_predict_players", "1", CVAR_NONE, NULL,
|
||||||
"If this is 0, no player prediction is "
|
"If this is 0, no player prediction is "
|
||||||
|
|
|
@ -167,8 +167,7 @@ int cl_h_playerindex, cl_gib1index, cl_gib2index, cl_gib3index;
|
||||||
|
|
||||||
int packet_latency[NET_TIMINGS];
|
int packet_latency[NET_TIMINGS];
|
||||||
|
|
||||||
|
extern cvar_t *hud_scoreboard_uid;
|
||||||
extern cvar_t *cl_showscoresuid;
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -1102,9 +1101,18 @@ CL_ServerInfo (void)
|
||||||
cl.no_pogo_stick = no_pogo_stick->int_val;
|
cl.no_pogo_stick = no_pogo_stick->int_val;
|
||||||
} else if (strequal (key, "teamplay")) {
|
} else if (strequal (key, "teamplay")) {
|
||||||
cl.teamplay = atoi (value);
|
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")) {
|
} else if (strequal (key, "watervis")) {
|
||||||
cl.watervis = atoi (value);
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,13 +93,13 @@ qboolean hudswap;
|
||||||
|
|
||||||
static qboolean largegame = false;
|
static qboolean largegame = false;
|
||||||
|
|
||||||
cvar_t *cl_showscoresuid;
|
|
||||||
cvar_t *fs_fraglog;
|
cvar_t *fs_fraglog;
|
||||||
cvar_t *cl_fraglog;
|
cvar_t *cl_fraglog;
|
||||||
cvar_t *hud_sbar;
|
cvar_t *hud_sbar;
|
||||||
cvar_t *hud_sbar_separator;
|
cvar_t *hud_sbar_separator;
|
||||||
cvar_t *hud_swap;
|
cvar_t *hud_swap;
|
||||||
cvar_t *hud_scoreboard_gravity;
|
cvar_t *hud_scoreboard_gravity;
|
||||||
|
cvar_t *hud_scoreboard_uid;
|
||||||
|
|
||||||
static view_t *sbar_view;
|
static view_t *sbar_view;
|
||||||
static view_t *sbar_inventory_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
|
void
|
||||||
Sbar_DMO_Init_f (cvar_t *var)
|
Sbar_DMO_Init_f (cvar_t *var)
|
||||||
{
|
{
|
||||||
// "var" is "cl_showscoresuid"
|
// "var" is "hud_scoreboard_uid"
|
||||||
if (!var) {
|
if (!var) {
|
||||||
Sbar_Draw_DMO_func = Sbar_Draw_DMO_Ping;
|
Sbar_Draw_DMO_func = Sbar_Draw_DMO_Ping;
|
||||||
return;
|
return;
|
||||||
|
@ -1596,9 +1596,9 @@ draw_time (view_t *view)
|
||||||
utc = time (NULL);
|
utc = time (NULL);
|
||||||
local = localtime (&utc);
|
local = localtime (&utc);
|
||||||
|
|
||||||
if (show_time->int_val == 1) { // Use international format
|
if (hud_time->int_val == 1) { // Use international format
|
||||||
timefmt = "%k:%M";
|
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";
|
timefmt = "%l:%M %P";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1633,17 +1633,17 @@ draw_net (view_t *view)
|
||||||
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
|
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
|
||||||
SZ_Print (&cls.netchan.message, "pings");
|
SZ_Print (&cls.netchan.message, "pings");
|
||||||
}
|
}
|
||||||
if (show_ping->int_val) {
|
if (hud_ping->int_val) {
|
||||||
int ping = cl.players[cl.playernum].ping;
|
int ping = cl.players[cl.playernum].ping;
|
||||||
|
|
||||||
ping = bound (0, ping, 999);
|
ping = bound (0, ping, 999);
|
||||||
draw_string (view, 0, 0, va ("%3d ms ", ping));
|
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, '/');
|
draw_character (view, 48, 0, '/');
|
||||||
|
|
||||||
if (show_pl->int_val) {
|
if (hud_pl->int_val) {
|
||||||
int lost = CL_CalcNet ();
|
int lost = CL_CalcNet ();
|
||||||
|
|
||||||
lost = bound (0, lost, 999);
|
lost = bound (0, lost, 999);
|
||||||
|
@ -1654,11 +1654,11 @@ draw_net (view_t *view)
|
||||||
static void
|
static void
|
||||||
draw_stuff (view_t *view)
|
draw_stuff (view_t *view)
|
||||||
{
|
{
|
||||||
if (show_time->int_val > 0)
|
if (hud_time->int_val > 0)
|
||||||
draw_time (view);
|
draw_time (view);
|
||||||
if (show_fps->int_val > 0)
|
if (hud_fps->int_val > 0)
|
||||||
draw_fps (view);
|
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);
|
draw_net (view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1966,7 +1966,7 @@ Sbar_Init (void)
|
||||||
|
|
||||||
r_viewsize_callback = viewsize_f;
|
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 "
|
Sbar_DMO_Init_f, "Set to 1 to show uid "
|
||||||
"instead of ping. Set to 2 to show both.");
|
"instead of ping. Set to 2 to show both.");
|
||||||
fs_fraglog = Cvar_Get ("fs_fraglog", "qw-scores.log", CVAR_ARCHIVE, NULL,
|
fs_fraglog = Cvar_Get ("fs_fraglog", "qw-scores.log", CVAR_ARCHIVE, NULL,
|
||||||
|
|
Loading…
Reference in a new issue