mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 20:41:20 +00:00
[client] Merge cl_screen.c
The client state that was accessed by cl_screen is now put in viewstate and maintained by the client before calling CL_UpdateScreen.
This commit is contained in:
parent
9f01cb25fe
commit
4491ce213b
23 changed files with 92 additions and 346 deletions
10
include/client/screen.h
Normal file
10
include/client/screen.h
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#ifndef __client_screen_h
|
||||||
|
#define __client_screen_h
|
||||||
|
|
||||||
|
extern struct view_s cl_screen_view;
|
||||||
|
|
||||||
|
struct viewstate_s;
|
||||||
|
void CL_Init_Screen (void);
|
||||||
|
void CL_UpdateScreen (struct viewstate_s *vs);
|
||||||
|
|
||||||
|
#endif//__client_screen_h
|
|
@ -60,11 +60,15 @@ typedef struct viewstate_s {
|
||||||
vec4f_t punchangle;
|
vec4f_t punchangle;
|
||||||
transform_t camera_transform;
|
transform_t camera_transform;
|
||||||
double time;
|
double time;
|
||||||
|
double last_servermessage;
|
||||||
float frametime;
|
float frametime;
|
||||||
float height;
|
float height;
|
||||||
int weaponframe;
|
int weaponframe;
|
||||||
int onground; // -1 when in air
|
int onground; // -1 when in air
|
||||||
int active:1;
|
int active:1;
|
||||||
|
int loading:1;
|
||||||
|
int watervis:1;
|
||||||
|
int demoplayback:1;
|
||||||
int drift_enabled:1;
|
int drift_enabled:1;
|
||||||
int voffs_enabled:1;
|
int voffs_enabled:1;
|
||||||
int bob_enabled:1;
|
int bob_enabled:1;
|
||||||
|
|
|
@ -9,6 +9,7 @@ libs_client_libQFclient_la_SOURCES= \
|
||||||
libs/client/cl_input.c \
|
libs/client/cl_input.c \
|
||||||
libs/client/cl_light.c \
|
libs/client/cl_light.c \
|
||||||
libs/client/cl_particles.c \
|
libs/client/cl_particles.c \
|
||||||
|
libs/client/cl_screen.c \
|
||||||
libs/client/cl_temp_entities.c \
|
libs/client/cl_temp_entities.c \
|
||||||
libs/client/cl_view.c \
|
libs/client/cl_view.c \
|
||||||
libs/client/cl_world.c \
|
libs/client/cl_world.c \
|
||||||
|
|
|
@ -56,9 +56,11 @@
|
||||||
#include "r_local.h" //FIXME for r_cache_thrash
|
#include "r_local.h" //FIXME for r_cache_thrash
|
||||||
|
|
||||||
#include "client/hud.h"
|
#include "client/hud.h"
|
||||||
|
#include "client/screen.h"
|
||||||
|
#include "client/view.h"
|
||||||
#include "client/world.h"
|
#include "client/world.h"
|
||||||
|
|
||||||
#include "nq/include/client.h"
|
//#include "nq/include/client.h"
|
||||||
|
|
||||||
int scr_showpause;
|
int scr_showpause;
|
||||||
static cvar_t scr_showpause_cvar = {
|
static cvar_t scr_showpause_cvar = {
|
||||||
|
@ -97,20 +99,22 @@ static view_t ram_view;
|
||||||
static view_t turtle_view;
|
static view_t turtle_view;
|
||||||
static view_t pause_view;
|
static view_t pause_view;
|
||||||
|
|
||||||
|
static viewstate_t *_vs;//FIXME ick
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SCR_CShift (void)
|
SCR_CShift (void)
|
||||||
{
|
{
|
||||||
mleaf_t *leaf;
|
mleaf_t *leaf;
|
||||||
int contents = CONTENTS_EMPTY;
|
int contents = CONTENTS_EMPTY;
|
||||||
|
|
||||||
if (cls.state == ca_active && cl_world.scene->worldmodel) {
|
if (_vs->active && cl_world.scene->worldmodel) {
|
||||||
vec4f_t origin;
|
vec4f_t origin;
|
||||||
origin = Transform_GetWorldPosition (cl.viewstate.camera_transform);
|
origin = Transform_GetWorldPosition (_vs->camera_transform);
|
||||||
leaf = Mod_PointInLeaf (origin, cl_world.scene->worldmodel);
|
leaf = Mod_PointInLeaf (origin, cl_world.scene->worldmodel);
|
||||||
contents = leaf->contents;
|
contents = leaf->contents;
|
||||||
}
|
}
|
||||||
V_SetContentsColor (&cl.viewstate, contents);
|
V_SetContentsColor (_vs, contents);
|
||||||
r_funcs->Draw_BlendScreen (cl.viewstate.cshift_color);
|
r_funcs->Draw_BlendScreen (_vs->cshift_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -130,9 +134,9 @@ scr_draw_views (void)
|
||||||
View_SetVisible (pause_view, scr_showpause && r_data->paused);
|
View_SetVisible (pause_view, scr_showpause && r_data->paused);
|
||||||
|
|
||||||
View_SetVisible (ram_view, scr_showram && r_cache_thrash);
|
View_SetVisible (ram_view, scr_showram && r_cache_thrash);
|
||||||
View_SetVisible (net_view, (!cls.demoplayback
|
View_SetVisible (net_view, (!_vs->demoplayback
|
||||||
&& realtime - cl.last_servermessage >= 0.3));
|
&& _vs->time - _vs->last_servermessage >= 0.3));
|
||||||
View_SetVisible (loading_view, cl.loading);
|
View_SetVisible (loading_view, _vs->loading);
|
||||||
// FIXME cvar callbacks
|
// FIXME cvar callbacks
|
||||||
View_SetVisible (timegraph_view, r_timegraph);
|
View_SetVisible (timegraph_view, r_timegraph);
|
||||||
View_SetVisible (zgraph_view, r_zgraph);
|
View_SetVisible (zgraph_view, r_zgraph);
|
||||||
|
@ -256,25 +260,24 @@ CL_Init_Screen (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CL_UpdateScreen (double realtime)
|
CL_UpdateScreen (viewstate_t *vs)
|
||||||
{
|
{
|
||||||
unsigned index = cl.intermission;
|
unsigned index = vs->intermission;
|
||||||
|
_vs = vs;
|
||||||
|
|
||||||
if (index >= sizeof (scr_funcs) / sizeof (scr_funcs[0]))
|
if (index >= sizeof (scr_funcs) / sizeof (scr_funcs[0]))
|
||||||
index = 0;
|
index = 0;
|
||||||
|
|
||||||
//FIXME not every time
|
//FIXME not every time
|
||||||
if (cls.state == ca_active) {
|
if (vs->active) {
|
||||||
if (cl.watervis)
|
if (vs->watervis)
|
||||||
r_data->min_wateralpha = 0.0;
|
r_data->min_wateralpha = 0.0;
|
||||||
else
|
else
|
||||||
r_data->min_wateralpha = 1.0;
|
r_data->min_wateralpha = 1.0;
|
||||||
}
|
}
|
||||||
scr_funcs_normal[0] = r_funcs->Draw_Crosshair;
|
scr_funcs_normal[0] = r_funcs->Draw_Crosshair;
|
||||||
|
|
||||||
cl.viewstate.intermission = cl.intermission != 0;
|
V_PrepBlend (vs);
|
||||||
V_PrepBlend (&cl.viewstate);
|
V_RenderView (vs);
|
||||||
V_RenderView (&cl.viewstate);
|
SCR_UpdateScreen (vs->camera_transform, vs->time, scr_funcs[index]);
|
||||||
SCR_UpdateScreen (cl.viewstate.camera_transform,
|
|
||||||
realtime, scr_funcs[index]);
|
|
||||||
}
|
}
|
|
@ -48,6 +48,7 @@
|
||||||
#include "netmain.h"
|
#include "netmain.h"
|
||||||
|
|
||||||
//FIXME these should not be here!!!
|
//FIXME these should not be here!!!
|
||||||
|
#include "client/screen.h"
|
||||||
#include "../nq/include/client.h"
|
#include "../nq/include/client.h"
|
||||||
#include "../nq/include/server.h"
|
#include "../nq/include/server.h"
|
||||||
|
|
||||||
|
@ -1020,7 +1021,8 @@ _Datagram_Connect (const char *host)
|
||||||
|
|
||||||
// send the connection request
|
// send the connection request
|
||||||
Sys_Printf ("trying...\n");
|
Sys_Printf ("trying...\n");
|
||||||
CL_UpdateScreen (cl.time);
|
cl.viewstate.time = cl.time;
|
||||||
|
CL_UpdateScreen (&cl.viewstate);
|
||||||
start_time = net_time;
|
start_time = net_time;
|
||||||
|
|
||||||
for (reps = 0; reps < 3; reps++) {
|
for (reps = 0; reps < 3; reps++) {
|
||||||
|
@ -1081,7 +1083,8 @@ _Datagram_Connect (const char *host)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Sys_Printf ("still trying...\n");
|
Sys_Printf ("still trying...\n");
|
||||||
CL_UpdateScreen (cl.time);
|
cl.viewstate.time = cl.time;
|
||||||
|
CL_UpdateScreen (&cl.viewstate);
|
||||||
start_time = SetNetTime ();
|
start_time = SetNetTime ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,8 +127,6 @@ extern client_static_t cls;
|
||||||
the client_state_t structure is wiped completely at every server signon
|
the client_state_t structure is wiped completely at every server signon
|
||||||
*/
|
*/
|
||||||
typedef struct client_state_s {
|
typedef struct client_state_s {
|
||||||
qboolean loading;
|
|
||||||
|
|
||||||
int movemessages; // Since connecting to this server throw out
|
int movemessages; // Since connecting to this server throw out
|
||||||
// the first couple, so the player doesn't
|
// the first couple, so the player doesn't
|
||||||
// accidentally do something the first frame
|
// accidentally do something the first frame
|
||||||
|
@ -167,7 +165,6 @@ typedef struct client_state_s {
|
||||||
// to decay light values and smooth step ups
|
// to decay light values and smooth step ups
|
||||||
|
|
||||||
double last_ping_request; // while showing scoreboard
|
double last_ping_request; // while showing scoreboard
|
||||||
double last_servermessage; // (realtime) for net trouble icon
|
|
||||||
|
|
||||||
/* information that is static for the entire time connected to a server */
|
/* information that is static for the entire time connected to a server */
|
||||||
|
|
||||||
|
@ -186,7 +183,6 @@ typedef struct client_state_s {
|
||||||
int sv_cshifts;
|
int sv_cshifts;
|
||||||
int no_pogo_stick;
|
int no_pogo_stick;
|
||||||
int teamplay;
|
int teamplay;
|
||||||
int watervis;
|
|
||||||
int fpd;
|
int fpd;
|
||||||
int fbskins;
|
int fbskins;
|
||||||
|
|
||||||
|
@ -289,10 +285,6 @@ extern qboolean recording;
|
||||||
struct cvar_s;
|
struct cvar_s;
|
||||||
void Cvar_Info (void *data, const struct cvar_s *cvar);
|
void Cvar_Info (void *data, const struct cvar_s *cvar);
|
||||||
|
|
||||||
extern struct view_s cl_screen_view;
|
|
||||||
void CL_Init_Screen (void);
|
|
||||||
void CL_UpdateScreen (double realtime);
|
|
||||||
|
|
||||||
void CL_SetState (cactive_t state);
|
void CL_SetState (cactive_t state);
|
||||||
|
|
||||||
void CL_Cmd_ForwardToServer (void);
|
void CL_Cmd_ForwardToServer (void);
|
||||||
|
|
|
@ -73,7 +73,7 @@ nq_server_LIB_DEPS=$(nq_server_LIBFILES) $(nq_common_LIBFILES)
|
||||||
|
|
||||||
nq_source_libnq_client_a_SOURCES= \
|
nq_source_libnq_client_a_SOURCES= \
|
||||||
nq/source/cl_cmd.c nq/source/cl_demo.c nq/source/cl_ents.c nq/source/cl_input.c nq/source/cl_main.c \
|
nq/source/cl_cmd.c nq/source/cl_demo.c nq/source/cl_ents.c nq/source/cl_input.c nq/source/cl_main.c \
|
||||||
nq/source/cl_screen.c nq/source/cl_parse.c nq/source/sbar.c
|
nq/source/cl_parse.c nq/source/sbar.c
|
||||||
|
|
||||||
nq_source_libnq_server_a_SOURCES= \
|
nq_source_libnq_server_a_SOURCES= \
|
||||||
nq/source/host.c nq/source/host_cmd.c nq/source/sv_cl_phys.c nq/source/sv_cvar.c nq/source/sv_main.c \
|
nq/source/host.c nq/source/host_cmd.c nq/source/sv_cl_phys.c nq/source/sv_cvar.c nq/source/sv_main.c \
|
||||||
|
|
|
@ -167,6 +167,7 @@ CL_StopPlayback (void)
|
||||||
CL_SetState (ca_disconnected);
|
CL_SetState (ca_disconnected);
|
||||||
cls.demo_capture = 0;
|
cls.demo_capture = 0;
|
||||||
cls.demoplayback = 0;
|
cls.demoplayback = 0;
|
||||||
|
cl.viewstate.demoplayback = 0;
|
||||||
|
|
||||||
if (cls.timedemo)
|
if (cls.timedemo)
|
||||||
CL_FinishTimeDemo ();
|
CL_FinishTimeDemo ();
|
||||||
|
@ -515,6 +516,7 @@ CL_StartDemo (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
cls.demoplayback = true;
|
cls.demoplayback = true;
|
||||||
|
cl.viewstate.demoplayback = 1;
|
||||||
CL_SetState (ca_connected);
|
CL_SetState (ca_connected);
|
||||||
cls.forcetrack = 0;
|
cls.forcetrack = 0;
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,7 @@
|
||||||
|
|
||||||
#include "client/chase.h"
|
#include "client/chase.h"
|
||||||
#include "client/particles.h"
|
#include "client/particles.h"
|
||||||
|
#include "client/screen.h"
|
||||||
#include "client/temp_entities.h"
|
#include "client/temp_entities.h"
|
||||||
#include "client/world.h"
|
#include "client/world.h"
|
||||||
|
|
||||||
|
@ -297,7 +298,7 @@ CL_ClearState (void)
|
||||||
cl.viewstate.chase = 1;
|
cl.viewstate.chase = 1;
|
||||||
cl.viewstate.chasestate = &cl.chasestate;
|
cl.viewstate.chasestate = &cl.chasestate;
|
||||||
cl.chasestate.viewstate = &cl.viewstate;
|
cl.chasestate.viewstate = &cl.viewstate;
|
||||||
cl.watervis = 1;
|
cl.viewstate.watervis = 1;
|
||||||
SCR_SetFullscreen (0);
|
SCR_SetFullscreen (0);
|
||||||
r_data->lightstyle = cl.lightstyle;
|
r_data->lightstyle = cl.lightstyle;
|
||||||
|
|
||||||
|
@ -434,7 +435,7 @@ CL_SignonReply (void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case so_active:
|
case so_active:
|
||||||
cl.loading = false;
|
cl.viewstate.loading = false;
|
||||||
CL_SetState (ca_active);
|
CL_SetState (ca_active);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -451,8 +452,9 @@ CL_NextDemo (void)
|
||||||
if (cls.demonum == -1)
|
if (cls.demonum == -1)
|
||||||
return; // don't play demos
|
return; // don't play demos
|
||||||
|
|
||||||
cl.loading = true;
|
cl.viewstate.loading = true;
|
||||||
CL_UpdateScreen(cl.time);
|
cl.viewstate.time = cl.time;
|
||||||
|
CL_UpdateScreen(&cl.viewstate);
|
||||||
|
|
||||||
if (!cls.demos[cls.demonum][0] || cls.demonum == MAX_DEMOS) {
|
if (!cls.demos[cls.demonum][0] || cls.demonum == MAX_DEMOS) {
|
||||||
cls.demonum = 0;
|
cls.demonum = 0;
|
||||||
|
@ -589,25 +591,25 @@ CL_SetState (cactive_t state)
|
||||||
case ca_disconnected:
|
case ca_disconnected:
|
||||||
CL_ClearState ();
|
CL_ClearState ();
|
||||||
cls.signon = so_none;
|
cls.signon = so_none;
|
||||||
cl.loading = false;
|
cl.viewstate.loading = false;
|
||||||
VID_SetCaption ("Disconnected");
|
VID_SetCaption ("Disconnected");
|
||||||
break;
|
break;
|
||||||
case ca_connected:
|
case ca_connected:
|
||||||
cls.signon = so_none; // need all the signon messages
|
cls.signon = so_none; // need all the signon messages
|
||||||
// before playing
|
// before playing
|
||||||
cl.loading = true;
|
cl.viewstate.loading = true;
|
||||||
IN_ClearStates ();
|
IN_ClearStates ();
|
||||||
VID_SetCaption ("Connected");
|
VID_SetCaption ("Connected");
|
||||||
break;
|
break;
|
||||||
case ca_active:
|
case ca_active:
|
||||||
// entering active state
|
// entering active state
|
||||||
cl.loading = false;
|
cl.viewstate.loading = false;
|
||||||
IN_ClearStates ();
|
IN_ClearStates ();
|
||||||
VID_SetCaption ("");
|
VID_SetCaption ("");
|
||||||
S_AmbientOn ();
|
S_AmbientOn ();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
CL_UpdateScreen (cl.time);
|
CL_UpdateScreen (&cl.viewstate);
|
||||||
}
|
}
|
||||||
host_in_game = 0;
|
host_in_game = 0;
|
||||||
Con_SetState (state == ca_active ? con_inactive : con_fullscreen);
|
Con_SetState (state == ca_active ? con_inactive : con_fullscreen);
|
||||||
|
@ -660,7 +662,8 @@ CL_Frame (void)
|
||||||
|| cl.stats[STAT_HEALTH] <= 0);
|
|| cl.stats[STAT_HEALTH] <= 0);
|
||||||
r_data->frametime = host_frametime;
|
r_data->frametime = host_frametime;
|
||||||
|
|
||||||
CL_UpdateScreen (cl.time);
|
cl.viewstate.intermission = cl.intermission != 0;
|
||||||
|
CL_UpdateScreen (&cl.viewstate);
|
||||||
|
|
||||||
if (host_speeds)
|
if (host_speeds)
|
||||||
time2 = Sys_DoubleTime ();
|
time2 = Sys_DoubleTime ();
|
||||||
|
|
|
@ -722,7 +722,7 @@ CL_ParseServerMessage (void)
|
||||||
static dstring_t *stuffbuf;
|
static dstring_t *stuffbuf;
|
||||||
signon_t so;
|
signon_t so;
|
||||||
|
|
||||||
cl.last_servermessage = realtime;
|
cl.viewstate.last_servermessage = realtime;
|
||||||
TEntContext_t tentCtx = {
|
TEntContext_t tentCtx = {
|
||||||
cl.viewstate.player_origin,
|
cl.viewstate.player_origin,
|
||||||
cl.viewentity
|
cl.viewentity
|
||||||
|
|
|
@ -309,7 +309,7 @@ Host_Error (const char *error, ...)
|
||||||
|
|
||||||
inerror = true;
|
inerror = true;
|
||||||
|
|
||||||
cl.loading = false;
|
cl.viewstate.loading = false;
|
||||||
|
|
||||||
va_start (argptr, error);
|
va_start (argptr, error);
|
||||||
dvsprintf (str, error, argptr);
|
dvsprintf (str, error, argptr);
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
#include "QF/sys.h"
|
#include "QF/sys.h"
|
||||||
#include "QF/va.h"
|
#include "QF/va.h"
|
||||||
|
|
||||||
|
#include "client/screen.h"
|
||||||
#include "client/world.h"
|
#include "client/world.h"
|
||||||
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
|
@ -294,8 +295,9 @@ Host_Map_f (void)
|
||||||
CL_Disconnect ();
|
CL_Disconnect ();
|
||||||
Host_ShutdownServer (false);
|
Host_ShutdownServer (false);
|
||||||
|
|
||||||
cl.loading = true;
|
cl.viewstate.loading = true;
|
||||||
CL_UpdateScreen (cl.time);
|
cl.viewstate.time = cl.time;
|
||||||
|
CL_UpdateScreen (&cl.viewstate);
|
||||||
|
|
||||||
svs.serverflags = 0; // haven't completed an episode yet
|
svs.serverflags = 0; // haven't completed an episode yet
|
||||||
strcpy (name, Cmd_Argv (1));
|
strcpy (name, Cmd_Argv (1));
|
||||||
|
@ -624,8 +626,9 @@ Host_Loadgame_f (void)
|
||||||
dsprintf (name, "%s/%s", qfs_gamedir->dir.def, Cmd_Argv (1));
|
dsprintf (name, "%s/%s", qfs_gamedir->dir.def, Cmd_Argv (1));
|
||||||
QFS_DefaultExtension (name, ".sav");
|
QFS_DefaultExtension (name, ".sav");
|
||||||
|
|
||||||
cl.loading = true;
|
cl.viewstate.loading = true;
|
||||||
CL_UpdateScreen (cl.time);
|
cl.viewstate.time = cl.time;
|
||||||
|
CL_UpdateScreen (&cl.viewstate);
|
||||||
|
|
||||||
Sys_Printf ("Loading game from %s...\n", name->str);
|
Sys_Printf ("Loading game from %s...\n", name->str);
|
||||||
f = QFS_Open (name->str, "rz");
|
f = QFS_Open (name->str, "rz");
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
#include "sbar.h"
|
#include "sbar.h"
|
||||||
|
|
||||||
#include "client/hud.h"
|
#include "client/hud.h"
|
||||||
|
#include "client/screen.h"
|
||||||
|
|
||||||
#include "nq/include/client.h"
|
#include "nq/include/client.h"
|
||||||
#include "nq/include/game.h"
|
#include "nq/include/game.h"
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
|
|
||||||
#include "client/world.h"
|
#include "client/world.h"
|
||||||
|
|
||||||
|
#include "client/screen.h"
|
||||||
#include "nq/include/client.h"
|
#include "nq/include/client.h"
|
||||||
#include "nq/include/host.h"
|
#include "nq/include/host.h"
|
||||||
#include "nq/include/server.h"
|
#include "nq/include/server.h"
|
||||||
|
@ -78,7 +79,7 @@ CL_SetState (cactive_t state)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CL_UpdateScreen (double realtime)
|
CL_UpdateScreen (struct viewstate_s *)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -176,8 +176,6 @@ extern client_static_t cls;
|
||||||
the client_state_t structure is wiped completely at every server signon
|
the client_state_t structure is wiped completely at every server signon
|
||||||
*/
|
*/
|
||||||
typedef struct client_state_s {
|
typedef struct client_state_s {
|
||||||
qboolean loading;
|
|
||||||
|
|
||||||
int movemessages; // Since connecting to this server throw out
|
int movemessages; // Since connecting to this server throw out
|
||||||
// the first couple, so the player doesn't
|
// the first couple, so the player doesn't
|
||||||
// accidentally do something the first frame
|
// accidentally do something the first frame
|
||||||
|
@ -215,7 +213,6 @@ typedef struct client_state_s {
|
||||||
// can't render a frame yet
|
// can't render a frame yet
|
||||||
|
|
||||||
double last_ping_request; // while showing scoreboard
|
double last_ping_request; // while showing scoreboard
|
||||||
double last_servermessage; // (realtime) for net trouble icon
|
|
||||||
|
|
||||||
/* information that is static for the entire time connected to a server */
|
/* information that is static for the entire time connected to a server */
|
||||||
|
|
||||||
|
@ -238,7 +235,6 @@ typedef struct client_state_s {
|
||||||
int sv_cshifts;
|
int sv_cshifts;
|
||||||
int no_pogo_stick;
|
int no_pogo_stick;
|
||||||
int teamplay;
|
int teamplay;
|
||||||
int watervis;
|
|
||||||
int fpd;
|
int fpd;
|
||||||
int fbskins;
|
int fbskins;
|
||||||
|
|
||||||
|
@ -300,10 +296,6 @@ void Cvar_Info (void *data, const struct cvar_s *cvar);
|
||||||
void CL_NetGraph_Init (void);
|
void CL_NetGraph_Init (void);
|
||||||
void CL_NetGraph_Init_Cvars (void);
|
void CL_NetGraph_Init_Cvars (void);
|
||||||
|
|
||||||
extern struct view_s cl_screen_view;
|
|
||||||
void CL_Init_Screen (void);
|
|
||||||
void CL_UpdateScreen (double realtime);
|
|
||||||
|
|
||||||
void CL_SetState (cactive_t state);
|
void CL_SetState (cactive_t state);
|
||||||
|
|
||||||
void CL_Cmd_ForwardToServer (void);
|
void CL_Cmd_ForwardToServer (void);
|
||||||
|
|
|
@ -106,7 +106,7 @@ qw_client_libs= qw/source/libqw_client.a qw/source/libqw_common.a \
|
||||||
qw_source_libqw_client_a_SOURCES= \
|
qw_source_libqw_client_a_SOURCES= \
|
||||||
qw/source/cl_cam.c qw/source/cl_chat.c qw/source/cl_cmd.c qw/source/cl_cvar.c qw/source/cl_demo.c \
|
qw/source/cl_cam.c qw/source/cl_chat.c qw/source/cl_cmd.c qw/source/cl_cvar.c qw/source/cl_demo.c \
|
||||||
qw/source/cl_entparse.c qw/source/cl_ents.c qw/source/cl_http.c qw/source/cl_input.c qw/source/cl_main.c qw/source/cl_ngraph.c \
|
qw/source/cl_entparse.c qw/source/cl_ents.c qw/source/cl_http.c qw/source/cl_input.c qw/source/cl_main.c qw/source/cl_ngraph.c \
|
||||||
qw/source/cl_parse.c qw/source/cl_pred.c qw/source/cl_rss.c qw/source/cl_screen.c qw/source/cl_skin.c qw/source/cl_slist.c \
|
qw/source/cl_parse.c qw/source/cl_pred.c qw/source/cl_rss.c qw/source/cl_skin.c qw/source/cl_slist.c \
|
||||||
qw/source/sbar.c qw/source/teamplay.c
|
qw/source/sbar.c qw/source/teamplay.c
|
||||||
|
|
||||||
# Software-rendering clients
|
# Software-rendering clients
|
||||||
|
|
|
@ -187,6 +187,7 @@ CL_StopPlayback (void)
|
||||||
cls.demo_capture = 0;
|
cls.demo_capture = 0;
|
||||||
cls.demoplayback = 0;
|
cls.demoplayback = 0;
|
||||||
cls.demoplayback2 = 0;
|
cls.demoplayback2 = 0;
|
||||||
|
cl.viewstate.demoplayback = 0;
|
||||||
demotime_cached = 0;
|
demotime_cached = 0;
|
||||||
net_blocksend = 0;
|
net_blocksend = 0;
|
||||||
|
|
||||||
|
@ -1052,6 +1053,7 @@ CL_StartDemo (void)
|
||||||
Sys_Printf ("Playing demo from %s.\n", name->str);
|
Sys_Printf ("Playing demo from %s.\n", name->str);
|
||||||
|
|
||||||
cls.demoplayback = true;
|
cls.demoplayback = true;
|
||||||
|
cl.viewstate.demoplayback = 1;
|
||||||
net_blocksend = 1;
|
net_blocksend = 1;
|
||||||
if (type == 2) {
|
if (type == 2) {
|
||||||
cls.demoplayback2 = true;
|
cls.demoplayback2 = true;
|
||||||
|
|
|
@ -98,6 +98,7 @@
|
||||||
#include "sbar.h"
|
#include "sbar.h"
|
||||||
|
|
||||||
#include "client/particles.h"
|
#include "client/particles.h"
|
||||||
|
#include "client/screen.h"
|
||||||
#include "client/temp_entities.h"
|
#include "client/temp_entities.h"
|
||||||
#include "client/view.h"
|
#include "client/view.h"
|
||||||
#include "client/world.h"
|
#include "client/world.h"
|
||||||
|
@ -909,7 +910,7 @@ CL_FullServerinfo_f (void)
|
||||||
Sbar_DMO_Init_f (0, 0); // HUD setup, cl.teamplay changed
|
Sbar_DMO_Init_f (0, 0); // 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.viewstate.watervis = atoi (p);
|
||||||
}
|
}
|
||||||
if ((p = Info_ValueForKey (cl.serverinfo, "fpd")) && *p) {
|
if ((p = Info_ValueForKey (cl.serverinfo, "fpd")) && *p) {
|
||||||
cl.fpd = atoi (p);
|
cl.fpd = atoi (p);
|
||||||
|
@ -1985,7 +1986,8 @@ Host_Frame (float time)
|
||||||
|| cl.stats[STAT_HEALTH] <= 0);
|
|| cl.stats[STAT_HEALTH] <= 0);
|
||||||
r_data->frametime = host_frametime;
|
r_data->frametime = host_frametime;
|
||||||
|
|
||||||
CL_UpdateScreen (realtime);
|
cl.viewstate.time = realtime;
|
||||||
|
CL_UpdateScreen (&cl.viewstate);
|
||||||
|
|
||||||
if (host_speeds)
|
if (host_speeds)
|
||||||
time2 = Sys_DoubleTime ();
|
time2 = Sys_DoubleTime ();
|
||||||
|
@ -2126,8 +2128,9 @@ Host_Init (void)
|
||||||
|
|
||||||
CL_Init ();
|
CL_Init ();
|
||||||
|
|
||||||
CL_UpdateScreen (realtime);
|
cl.viewstate.time = realtime;
|
||||||
CL_UpdateScreen (realtime);
|
CL_UpdateScreen (&cl.viewstate);
|
||||||
|
CL_UpdateScreen (&cl.viewstate);
|
||||||
|
|
||||||
Host_ExecConfig (cl_cbuf, !cl_quakerc);
|
Host_ExecConfig (cl_cbuf, !cl_quakerc);
|
||||||
|
|
||||||
|
@ -2144,10 +2147,10 @@ Host_Init (void)
|
||||||
|
|
||||||
host_initialized = true;
|
host_initialized = true;
|
||||||
|
|
||||||
CL_UpdateScreen (realtime);
|
CL_UpdateScreen (&cl.viewstate);
|
||||||
Con_NewMap (); // force the menus to be loaded
|
Con_NewMap (); // force the menus to be loaded
|
||||||
CL_UpdateScreen (realtime);
|
CL_UpdateScreen (&cl.viewstate);
|
||||||
CL_UpdateScreen (realtime);
|
CL_UpdateScreen (&cl.viewstate);
|
||||||
|
|
||||||
if (connect_time == -1) {
|
if (connect_time == -1) {
|
||||||
Cbuf_AddText (cl_cbuf, "echo Type connect <internet address> or use a "
|
Cbuf_AddText (cl_cbuf, "echo Type connect <internet address> or use a "
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include "QF/ui/view.h"
|
#include "QF/ui/view.h"
|
||||||
|
|
||||||
#include "client/hud.h"
|
#include "client/hud.h"
|
||||||
|
#include "client/screen.h"
|
||||||
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,7 @@
|
||||||
|
|
||||||
#include "client/effects.h"
|
#include "client/effects.h"
|
||||||
#include "client/particles.h"
|
#include "client/particles.h"
|
||||||
|
#include "client/screen.h"
|
||||||
#include "client/temp_entities.h"
|
#include "client/temp_entities.h"
|
||||||
#include "client/view.h"
|
#include "client/view.h"
|
||||||
#include "client/world.h"
|
#include "client/world.h"
|
||||||
|
@ -284,7 +285,8 @@ Model_NextDownload (void)
|
||||||
|
|
||||||
if (cls.downloadnumber == 0) {
|
if (cls.downloadnumber == 0) {
|
||||||
Sys_Printf ("Checking models...\n");
|
Sys_Printf ("Checking models...\n");
|
||||||
CL_UpdateScreen (realtime);
|
cl.viewstate.time = realtime;
|
||||||
|
CL_UpdateScreen (&cl.viewstate);
|
||||||
cls.downloadnumber = 1;
|
cls.downloadnumber = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -373,7 +375,8 @@ Sound_NextDownload (void)
|
||||||
|
|
||||||
if (cls.downloadnumber == 0) {
|
if (cls.downloadnumber == 0) {
|
||||||
Sys_Printf ("Checking sounds...\n");
|
Sys_Printf ("Checking sounds...\n");
|
||||||
CL_UpdateScreen (realtime);
|
cl.viewstate.time = realtime;
|
||||||
|
CL_UpdateScreen (&cl.viewstate);
|
||||||
cls.downloadnumber = 1;
|
cls.downloadnumber = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1121,7 +1124,7 @@ CL_ServerInfo (void)
|
||||||
cl.teamplay = atoi (value);
|
cl.teamplay = atoi (value);
|
||||||
Sbar_DMO_Init_f (0, 0); // HUD setup, cl.teamplay changed
|
Sbar_DMO_Init_f (0, 0); // HUD setup, cl.teamplay changed
|
||||||
} else if (strequal (key, "watervis")) {
|
} else if (strequal (key, "watervis")) {
|
||||||
cl.watervis = atoi (value);
|
cl.viewstate.watervis = atoi (value);
|
||||||
} else if (strequal (key, "fpd")) {
|
} else if (strequal (key, "fpd")) {
|
||||||
cl.fpd = atoi (value);
|
cl.fpd = atoi (value);
|
||||||
} else if (strequal (key, "fbskins")) {
|
} else if (strequal (key, "fbskins")) {
|
||||||
|
@ -1219,7 +1222,7 @@ CL_ParseServerMessage (void)
|
||||||
};
|
};
|
||||||
|
|
||||||
received_framecount = host_framecount;
|
received_framecount = host_framecount;
|
||||||
cl.last_servermessage = realtime;
|
cl.viewstate.last_servermessage = realtime;
|
||||||
CL_ClearProjectiles ();
|
CL_ClearProjectiles ();
|
||||||
|
|
||||||
// if recording demos, copy the message out
|
// if recording demos, copy the message out
|
||||||
|
|
|
@ -1,281 +0,0 @@
|
||||||
/*
|
|
||||||
cl_screen.c
|
|
||||||
|
|
||||||
master for refresh, status bar, console, chat, notify, etc
|
|
||||||
|
|
||||||
Copyright (C) 1996-1997 Id Software, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License
|
|
||||||
as published by the Free Software Foundation; either version 2
|
|
||||||
of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
|
|
||||||
See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to:
|
|
||||||
|
|
||||||
Free Software Foundation, Inc.
|
|
||||||
59 Temple Place - Suite 330
|
|
||||||
Boston, MA 02111-1307, USA
|
|
||||||
|
|
||||||
*/
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_STRING_H
|
|
||||||
# include <string.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_STRINGS_H
|
|
||||||
# include <strings.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
#include "QF/console.h"
|
|
||||||
#include "QF/cvar.h"
|
|
||||||
#include "QF/draw.h"
|
|
||||||
#include "QF/image.h"
|
|
||||||
#include "QF/pcx.h"
|
|
||||||
#include "QF/screen.h"
|
|
||||||
|
|
||||||
#include "QF/plugin/console.h"
|
|
||||||
#include "QF/plugin/vid_render.h"
|
|
||||||
|
|
||||||
#include "QF/scene/scene.h"
|
|
||||||
#include "QF/scene/transform.h"
|
|
||||||
#include "QF/ui/view.h"
|
|
||||||
|
|
||||||
#include "sbar.h"
|
|
||||||
|
|
||||||
#include "r_local.h" //FIXME for r_cache_thrash
|
|
||||||
|
|
||||||
#include "client/hud.h"
|
|
||||||
#include "client/world.h"
|
|
||||||
|
|
||||||
#include "qw/include/client.h"
|
|
||||||
#include "qw/include/cl_parse.h"
|
|
||||||
|
|
||||||
int scr_showpause;
|
|
||||||
static cvar_t scr_showpause_cvar = {
|
|
||||||
.name = "showpause",
|
|
||||||
.description =
|
|
||||||
"Toggles display of pause graphic",
|
|
||||||
.default_value = "1",
|
|
||||||
.flags = CVAR_NONE,
|
|
||||||
.value = { .type = &cexpr_int, .value = &scr_showpause },
|
|
||||||
};
|
|
||||||
int scr_showram;
|
|
||||||
static cvar_t scr_showram_cvar = {
|
|
||||||
.name = "showram",
|
|
||||||
.description =
|
|
||||||
"Show RAM icon if game is running low on memory",
|
|
||||||
.default_value = "1",
|
|
||||||
.flags = CVAR_NONE,
|
|
||||||
.value = { .type = &cexpr_int, .value = &scr_showram },
|
|
||||||
};
|
|
||||||
int scr_showturtle;
|
|
||||||
static cvar_t scr_showturtle_cvar = {
|
|
||||||
.name = "showturtle",
|
|
||||||
.description =
|
|
||||||
"Show a turtle icon if your fps is below 10",
|
|
||||||
.default_value = "0",
|
|
||||||
.flags = CVAR_NONE,
|
|
||||||
.value = { .type = &cexpr_int, .value = &scr_showturtle },
|
|
||||||
};
|
|
||||||
|
|
||||||
view_t cl_screen_view;
|
|
||||||
static view_t net_view;
|
|
||||||
static view_t timegraph_view;
|
|
||||||
static view_t zgraph_view;
|
|
||||||
static view_t loading_view;
|
|
||||||
static view_t ram_view;
|
|
||||||
static view_t turtle_view;
|
|
||||||
static view_t pause_view;
|
|
||||||
|
|
||||||
static void
|
|
||||||
SCR_CShift (void)
|
|
||||||
{
|
|
||||||
mleaf_t *leaf;
|
|
||||||
int contents = CONTENTS_EMPTY;
|
|
||||||
|
|
||||||
if (cls.state == ca_active && cl_world.scene->worldmodel) {
|
|
||||||
vec4f_t origin;
|
|
||||||
origin = Transform_GetWorldPosition (cl.viewstate.camera_transform);
|
|
||||||
leaf = Mod_PointInLeaf (origin, cl_world.scene->worldmodel);
|
|
||||||
contents = leaf->contents;
|
|
||||||
}
|
|
||||||
V_SetContentsColor (&cl.viewstate, contents);
|
|
||||||
r_funcs->Draw_BlendScreen (cl.viewstate.cshift_color);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
scr_draw_views (void)
|
|
||||||
{
|
|
||||||
if (scr_showturtle) {
|
|
||||||
static int count;
|
|
||||||
if (r_data->frametime < 0.1) {
|
|
||||||
count = 0;
|
|
||||||
} else {
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
View_SetVisible (turtle_view, count > 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
// turn off for screenshots
|
|
||||||
View_SetVisible (pause_view, scr_showpause && r_data->paused);
|
|
||||||
|
|
||||||
View_SetVisible (ram_view, scr_showram && r_cache_thrash);
|
|
||||||
View_SetVisible (net_view, (!cls.demoplayback
|
|
||||||
&& realtime - cl.last_servermessage >= 0.3));
|
|
||||||
View_SetVisible (loading_view, cl.loading);
|
|
||||||
// FIXME cvar callbacks
|
|
||||||
View_SetVisible (timegraph_view, r_timegraph);
|
|
||||||
View_SetVisible (zgraph_view, r_zgraph);
|
|
||||||
}
|
|
||||||
|
|
||||||
static SCR_Func scr_funcs_normal[] = {
|
|
||||||
0, //Draw_Crosshair,
|
|
||||||
Sbar_Draw,
|
|
||||||
HUD_Draw_Views,
|
|
||||||
SCR_CShift,
|
|
||||||
Sbar_DrawCenterPrint,
|
|
||||||
scr_draw_views,
|
|
||||||
Con_DrawConsole,
|
|
||||||
0
|
|
||||||
};
|
|
||||||
|
|
||||||
static SCR_Func scr_funcs_intermission[] = {
|
|
||||||
Sbar_IntermissionOverlay,
|
|
||||||
Con_DrawConsole,
|
|
||||||
scr_draw_views,
|
|
||||||
0
|
|
||||||
};
|
|
||||||
|
|
||||||
static SCR_Func scr_funcs_finale[] = {
|
|
||||||
Sbar_FinaleOverlay,
|
|
||||||
Con_DrawConsole,
|
|
||||||
scr_draw_views,
|
|
||||||
0,
|
|
||||||
};
|
|
||||||
|
|
||||||
static SCR_Func *scr_funcs[] = {
|
|
||||||
scr_funcs_normal,
|
|
||||||
scr_funcs_intermission,
|
|
||||||
scr_funcs_finale,
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
|
||||||
cl_vidsize_listener (void *data, const viddef_t *vdef)
|
|
||||||
{
|
|
||||||
View_SetLen (cl_screen_view, vdef->width, vdef->height);
|
|
||||||
View_UpdateHierarchy (cl_screen_view);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CL_Init_Screen (void)
|
|
||||||
{
|
|
||||||
qpic_t *pic;
|
|
||||||
|
|
||||||
VID_OnVidResize_AddListener (cl_vidsize_listener, 0);
|
|
||||||
|
|
||||||
HUD_Init ();
|
|
||||||
|
|
||||||
cl_screen_view = View_New (hud_registry, nullview);
|
|
||||||
con_module->data->console->screen_view = &cl_screen_view;
|
|
||||||
|
|
||||||
View_SetPos (cl_screen_view, 0, 0);
|
|
||||||
View_SetLen (cl_screen_view, viddef.width, viddef.height);
|
|
||||||
View_SetGravity (cl_screen_view, grav_northwest);
|
|
||||||
View_SetVisible (cl_screen_view, 1);
|
|
||||||
|
|
||||||
pic = r_funcs->Draw_PicFromWad ("ram");
|
|
||||||
ram_view = View_New (hud_registry, cl_screen_view);
|
|
||||||
View_SetPos (ram_view, 32, 0);
|
|
||||||
View_SetLen (ram_view, pic->width, pic->height);
|
|
||||||
View_SetGravity (ram_view, grav_northwest);
|
|
||||||
Ent_SetComponent (ram_view.id, hud_pic, ram_view.reg, &pic);
|
|
||||||
View_SetVisible (ram_view, 0);
|
|
||||||
|
|
||||||
pic = r_funcs->Draw_PicFromWad ("turtle");
|
|
||||||
turtle_view = View_New (hud_registry, cl_screen_view);
|
|
||||||
View_SetPos (turtle_view, 32, 0);
|
|
||||||
View_SetLen (turtle_view, pic->width, pic->height);
|
|
||||||
View_SetGravity (turtle_view, grav_northwest);
|
|
||||||
Ent_SetComponent (turtle_view.id, hud_pic, turtle_view.reg, &pic);
|
|
||||||
View_SetVisible (turtle_view, 0);
|
|
||||||
|
|
||||||
Cvar_Register (&scr_showpause_cvar, 0, 0);
|
|
||||||
Cvar_Register (&scr_showram_cvar, 0, 0);
|
|
||||||
Cvar_Register (&scr_showturtle_cvar, 0, 0);
|
|
||||||
|
|
||||||
pic = r_funcs->Draw_PicFromWad ("net");
|
|
||||||
net_view = View_New (hud_registry, cl_screen_view);
|
|
||||||
View_SetPos (net_view, 64, 0);
|
|
||||||
View_SetLen (net_view, pic->width, pic->height);
|
|
||||||
View_SetGravity (net_view, grav_northwest);
|
|
||||||
Ent_SetComponent (net_view.id, hud_pic, net_view.reg, &pic);
|
|
||||||
View_SetVisible (net_view, 0);
|
|
||||||
|
|
||||||
timegraph_view = View_New (hud_registry, cl_screen_view);
|
|
||||||
View_SetPos (timegraph_view, 0, 0);
|
|
||||||
View_SetLen (timegraph_view, r_data->vid->width, 100);
|
|
||||||
View_SetGravity (timegraph_view, grav_southwest);
|
|
||||||
Ent_SetComponent (timegraph_view.id, hud_func, timegraph_view.reg,
|
|
||||||
R_TimeGraph);
|
|
||||||
View_SetVisible (timegraph_view, r_timegraph);
|
|
||||||
|
|
||||||
zgraph_view = View_New (hud_registry, cl_screen_view);
|
|
||||||
View_SetPos (zgraph_view, 0, 0);
|
|
||||||
View_SetLen (zgraph_view, r_data->vid->width, 100);
|
|
||||||
View_SetGravity (zgraph_view, grav_southwest);
|
|
||||||
Ent_SetComponent (zgraph_view.id, hud_func, zgraph_view.reg, R_ZGraph);
|
|
||||||
View_SetVisible (zgraph_view, r_zgraph);
|
|
||||||
|
|
||||||
const char *name = "gfx/loading.lmp";
|
|
||||||
pic = r_funcs->Draw_CachePic (name, 1);
|
|
||||||
loading_view = View_New (hud_registry, cl_screen_view);
|
|
||||||
View_SetPos (loading_view, 0, -24);
|
|
||||||
View_SetLen (loading_view, pic->width, pic->height);
|
|
||||||
View_SetGravity (loading_view, grav_center);
|
|
||||||
Ent_SetComponent (loading_view.id, hud_cachepic, loading_view.reg, &name);
|
|
||||||
View_SetVisible (loading_view, 0);
|
|
||||||
|
|
||||||
name = "gfx/pause.lmp";
|
|
||||||
pic = r_funcs->Draw_CachePic (name, 1);
|
|
||||||
pause_view = View_New (hud_registry, cl_screen_view);
|
|
||||||
View_SetPos (pause_view, 0, -24);
|
|
||||||
View_SetLen (pause_view, pic->width, pic->height);
|
|
||||||
View_SetGravity (pause_view, grav_center);
|
|
||||||
Ent_SetComponent (pause_view.id, hud_cachepic, pause_view.reg, &name);
|
|
||||||
View_SetVisible (pause_view, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CL_UpdateScreen (double realtime)
|
|
||||||
{
|
|
||||||
unsigned index = cl.intermission;
|
|
||||||
|
|
||||||
if (index >= sizeof (scr_funcs) / sizeof (scr_funcs[0]))
|
|
||||||
index = 0;
|
|
||||||
|
|
||||||
//FIXME not every time
|
|
||||||
if (cls.state == ca_active) {
|
|
||||||
if (cl.watervis)
|
|
||||||
r_data->min_wateralpha = 0.0;
|
|
||||||
else
|
|
||||||
r_data->min_wateralpha = 1.0;
|
|
||||||
}
|
|
||||||
scr_funcs_normal[0] = r_funcs->Draw_Crosshair;
|
|
||||||
|
|
||||||
cl.viewstate.intermission = cl.intermission != 0;
|
|
||||||
V_PrepBlend (&cl.viewstate);
|
|
||||||
V_RenderView (&cl.viewstate);
|
|
||||||
SCR_UpdateScreen (cl.viewstate.camera_transform,
|
|
||||||
realtime, scr_funcs[index]);
|
|
||||||
}
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include "QF/sys.h"
|
#include "QF/sys.h"
|
||||||
#include "QF/va.h"
|
#include "QF/va.h"
|
||||||
|
|
||||||
|
#include "client/screen.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
|
|
||||||
#include "qw/include/cl_parse.h"
|
#include "qw/include/cl_parse.h"
|
||||||
|
@ -99,7 +100,8 @@ Skin_NextDownload (void)
|
||||||
|
|
||||||
if (cls.downloadnumber == 0) {
|
if (cls.downloadnumber == 0) {
|
||||||
Sys_Printf ("Checking skins...\n");
|
Sys_Printf ("Checking skins...\n");
|
||||||
CL_UpdateScreen (realtime);
|
cl.viewstate.time = realtime;
|
||||||
|
CL_UpdateScreen (&cl.viewstate);
|
||||||
}
|
}
|
||||||
cls.downloadtype = dl_skin;
|
cls.downloadtype = dl_skin;
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,7 @@
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
|
|
||||||
#include "client/hud.h"
|
#include "client/hud.h"
|
||||||
|
#include "client/screen.h"
|
||||||
#include "client/world.h"
|
#include "client/world.h"
|
||||||
|
|
||||||
#include "qw/bothdefs.h"
|
#include "qw/bothdefs.h"
|
||||||
|
|
Loading…
Reference in a new issue