2001-02-19 21:15:25 +00:00
|
|
|
/*
|
|
|
|
sv_ded.c
|
|
|
|
|
|
|
|
@description@
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2005-08-04 15:27:09 +00:00
|
|
|
static __attribute__ ((used)) const char rcsid[] =
|
2003-01-15 15:31:36 +00:00
|
|
|
"$Id$";
|
|
|
|
|
2001-02-19 21:15:25 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
2003-01-06 18:28:13 +00:00
|
|
|
#include "QF/cdaudio.h"
|
2004-03-22 04:22:33 +00:00
|
|
|
#include "QF/cmd.h"
|
|
|
|
#include "QF/console.h"
|
2003-01-06 18:28:13 +00:00
|
|
|
#include "QF/csqc.h"
|
2001-03-27 23:36:02 +00:00
|
|
|
#include "QF/cvar.h"
|
2003-01-06 18:28:13 +00:00
|
|
|
#include "QF/draw.h"
|
2001-03-27 23:36:02 +00:00
|
|
|
#include "QF/keys.h"
|
2004-03-22 04:22:33 +00:00
|
|
|
#include "QF/msg.h"
|
2002-01-16 21:53:42 +00:00
|
|
|
#include "QF/plugin.h"
|
2003-01-06 18:28:13 +00:00
|
|
|
#include "QF/screen.h"
|
2001-10-03 19:52:03 +00:00
|
|
|
#include "QF/sys.h"
|
2001-08-27 07:13:32 +00:00
|
|
|
|
2003-01-06 18:28:13 +00:00
|
|
|
#include "chase.h"
|
2001-02-19 21:15:25 +00:00
|
|
|
#include "client.h"
|
2004-03-22 04:22:33 +00:00
|
|
|
#include "compat.h"
|
2001-10-03 19:52:03 +00:00
|
|
|
#include "host.h"
|
2003-01-06 18:28:13 +00:00
|
|
|
#include "r_dynamic.h"
|
|
|
|
#include "sbar.h"
|
2004-03-22 04:22:33 +00:00
|
|
|
#include "server.h"
|
2003-01-06 18:28:13 +00:00
|
|
|
#include "view.h"
|
2001-02-19 21:15:25 +00:00
|
|
|
|
|
|
|
client_state_t cl;
|
2001-10-03 19:52:03 +00:00
|
|
|
client_static_t cls;
|
|
|
|
|
|
|
|
keydest_t key_dest = key_game;
|
|
|
|
|
|
|
|
cvar_t *cl_name;
|
|
|
|
cvar_t *cl_writecfg;
|
2002-06-08 23:22:26 +00:00
|
|
|
cvar_t *demo_speed;
|
2001-10-03 19:52:03 +00:00
|
|
|
cvar_t *chase_active;
|
|
|
|
|
|
|
|
int fps_count;
|
2001-10-28 04:23:37 +00:00
|
|
|
int viewentity;
|
2001-10-03 19:52:03 +00:00
|
|
|
|
|
|
|
byte *vid_colormap;
|
|
|
|
|
|
|
|
vec3_t vpn, vright, vup;
|
|
|
|
|
|
|
|
qboolean r_active;
|
|
|
|
qboolean r_force_fullscreen;
|
|
|
|
double r_frametime;
|
|
|
|
qboolean r_inhibit_viewmodel;
|
|
|
|
vec3_t r_origin;
|
|
|
|
qboolean r_paused;
|
|
|
|
entity_t *r_view_model;
|
|
|
|
|
2001-10-23 16:55:23 +00:00
|
|
|
cvar_t *cl_rollangle;
|
|
|
|
cvar_t *cl_rollspeed;
|
2001-10-05 16:08:07 +00:00
|
|
|
|
2001-10-03 19:52:03 +00:00
|
|
|
void
|
|
|
|
CL_UpdateScreen (double realtime)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2002-07-31 05:19:03 +00:00
|
|
|
CL_Cmd_ForwardToServer (void)
|
2001-10-03 19:52:03 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2003-01-06 18:28:13 +00:00
|
|
|
int
|
2001-10-03 19:52:03 +00:00
|
|
|
CDAudio_Init (void)
|
|
|
|
{
|
2003-01-06 18:28:13 +00:00
|
|
|
return 0;
|
2001-10-03 19:52:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
CDAudio_Shutdown (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
CDAudio_Update (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
CL_Disconnect (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
CL_Disconnect_f (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
CL_EstablishConnection (const char *host)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
CL_Init (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2002-06-14 07:55:19 +00:00
|
|
|
void
|
|
|
|
CL_Init_Entity (entity_t *ent)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2004-03-22 04:22:33 +00:00
|
|
|
static void
|
|
|
|
color_f (void)
|
|
|
|
{
|
|
|
|
int top, bottom;
|
|
|
|
char playercolor;
|
|
|
|
|
|
|
|
if (Cmd_Argc () <= 1) {
|
|
|
|
Con_Printf ("\"color\" is \"%d %d\"\n", (host_client->colors) >> 4,
|
|
|
|
(host_client->colors) & 0x0f);
|
|
|
|
Con_Printf ("color <0-13> [0-13]\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Cmd_Argc () == 2)
|
|
|
|
top = bottom = atoi (Cmd_Argv (1));
|
|
|
|
else {
|
|
|
|
top = atoi (Cmd_Argv (1));
|
|
|
|
bottom = atoi (Cmd_Argv (2));
|
|
|
|
}
|
|
|
|
|
|
|
|
top = min (top & 15, 13);
|
|
|
|
bottom = min (bottom & 15, 13);
|
|
|
|
|
|
|
|
playercolor = top * 16 + bottom;
|
|
|
|
|
|
|
|
host_client->colors = playercolor;
|
|
|
|
SVfloat (host_client->edict, team) = bottom + 1;
|
|
|
|
|
|
|
|
// send notification to all clients
|
|
|
|
MSG_WriteByte (&sv.reliable_datagram, svc_updatecolors);
|
|
|
|
MSG_WriteByte (&sv.reliable_datagram, host_client - svs.clients);
|
|
|
|
MSG_WriteByte (&sv.reliable_datagram, host_client->colors);
|
|
|
|
}
|
|
|
|
|
2001-10-03 19:52:03 +00:00
|
|
|
void
|
|
|
|
CL_InitCvars (void)
|
|
|
|
{
|
2001-10-03 21:25:43 +00:00
|
|
|
cl_name = Cvar_Get ("_cl_name", "player", CVAR_ARCHIVE, NULL, "");
|
|
|
|
cl_writecfg = Cvar_Get ("cl_writecfg", "1", CVAR_NONE, NULL, "");
|
2001-10-05 16:08:07 +00:00
|
|
|
cl_rollangle = Cvar_Get ("cl_rollangle", "2.0", CVAR_NONE, NULL,
|
|
|
|
"How much your screen tilts when strafing");
|
|
|
|
cl_rollspeed = Cvar_Get ("cl_rollspeed", "200", CVAR_NONE, NULL,
|
|
|
|
"How quickly you straighten out after strafing");
|
2004-03-22 04:22:33 +00:00
|
|
|
|
|
|
|
Cmd_AddCommand ("color", color_f, "The pant and shirt color (color shirt "
|
|
|
|
"pants) Note that if only shirt color is given, pants "
|
|
|
|
"will match");
|
|
|
|
|
2001-10-03 19:52:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
CL_NextDemo (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2002-06-08 23:22:26 +00:00
|
|
|
void
|
|
|
|
CL_Demo_Init (void)
|
|
|
|
{
|
|
|
|
demo_speed = Cvar_Get ("demo_speed", "1", CVAR_NONE, NULL, "");
|
|
|
|
}
|
|
|
|
|
2001-10-03 19:52:03 +00:00
|
|
|
int
|
|
|
|
CL_ReadFromServer (void)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
CL_SendCmd (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
CL_SetState (cactive_t state)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
CL_StopPlayback (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Chase_Init_Cvars (void)
|
|
|
|
{
|
2001-10-03 21:25:43 +00:00
|
|
|
chase_active = Cvar_Get ("chase_active", "0", CVAR_NONE, NULL, "None");
|
2001-10-03 19:52:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
D_FlushCaches (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Draw_Init (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Host_Skin_Init (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Host_Skin_Init_Cvars (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
IN_Init (void)
|
|
|
|
{
|
|
|
|
}
|
2001-08-27 07:13:32 +00:00
|
|
|
|
2001-02-19 21:15:25 +00:00
|
|
|
void
|
2001-10-03 19:52:03 +00:00
|
|
|
IN_Init_Cvars (void)
|
2001-02-19 21:15:25 +00:00
|
|
|
{
|
2001-10-03 19:52:03 +00:00
|
|
|
}
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2001-10-03 19:52:03 +00:00
|
|
|
void
|
2003-04-08 18:45:12 +00:00
|
|
|
IN_ProcessEvents (void)
|
2001-10-03 19:52:03 +00:00
|
|
|
{
|
2001-02-19 21:15:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2001-10-03 19:52:03 +00:00
|
|
|
IN_Shutdown (void)
|
2001-02-19 21:15:25 +00:00
|
|
|
{
|
2001-10-03 19:52:03 +00:00
|
|
|
}
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2001-10-03 19:52:03 +00:00
|
|
|
void
|
2002-08-19 02:48:38 +00:00
|
|
|
Key_Init (struct cbuf_s *cb)
|
2001-10-03 19:52:03 +00:00
|
|
|
{
|
|
|
|
}
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2001-10-03 19:52:03 +00:00
|
|
|
void
|
|
|
|
Key_Init_Cvars (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2002-08-27 07:16:28 +00:00
|
|
|
Key_WriteBindings (QFile *f)
|
2001-10-03 19:52:03 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
R_DecayLights (double frametime)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
R_Init (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
R_Init_Cvars (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
R_Particles_Init_Cvars (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SCR_Init (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2001-10-28 04:23:37 +00:00
|
|
|
S_Init (struct model_s **worldmodel, int *viewentity, double *host_frametime)
|
2001-10-03 19:52:03 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
S_Init_Cvars (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
S_Shutdown (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2002-01-03 05:29:38 +00:00
|
|
|
S_Update (const vec3_t origin, const vec3_t v_forward, const vec3_t v_right,
|
|
|
|
const vec3_t v_up)
|
2001-10-03 19:52:03 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Sbar_Init (void)
|
|
|
|
{
|
2001-02-19 21:15:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2001-10-03 19:52:03 +00:00
|
|
|
VID_Init (unsigned char *palette)
|
2001-02-19 21:15:25 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2001-10-03 19:52:03 +00:00
|
|
|
VID_Init_Cvars (void)
|
2001-02-19 21:15:25 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2001-10-03 19:52:03 +00:00
|
|
|
VID_Shutdown (void)
|
2001-02-19 21:15:25 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2001-10-03 19:52:03 +00:00
|
|
|
V_Init (void)
|
2001-02-19 21:15:25 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2001-10-03 19:52:03 +00:00
|
|
|
V_Init_Cvars (void)
|
2001-02-19 21:15:25 +00:00
|
|
|
{
|
|
|
|
}
|
2002-01-16 21:53:42 +00:00
|
|
|
|
2004-05-04 21:59:17 +00:00
|
|
|
void
|
|
|
|
S_BlockSound (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
S_UnblockSound (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2004-01-19 07:47:41 +00:00
|
|
|
plugin_t *console_client_PluginInfo (void);
|
|
|
|
plugin_t *
|
2002-01-16 21:53:42 +00:00
|
|
|
console_client_PluginInfo (void)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|