#include "quakedef.h" qboolean isDedicated; int noconinput = 0; int nostdout = 0; // Look for data on either the sdcard or the internal data store. // (We look at the sdcard first static const char *basedir1 = "/"; static const char *basedir2 = "/"; static const char *cachedir = "/tmp"; cvar_t sys_linerefresh = CVAR2("sys_linerefresh","0");// set for entity display // ======================================================================= // General routines // ======================================================================= void Sys_DebugNumber(int y, int val) { } /* void Sys_Printf (char *fmt, ...) { va_list argptr; char text[1024];
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 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // chase.c -- chase camera code #include "quakedef.h" cvar_t chase_back = CVAR2("chase_back", "100"); cvar_t chase_up = CVAR2("chase_up", "16"); cvar_t chase_right = CVAR2("chase_right", "0"); cvar_t chase_active = CVAR2("chase_active", "0"); vec3_t chase_pos; vec3_t chase_angles; vec3_t chase_dest; vec3_t chase_dest_angles; //not get it niuzbs void Chase_Init (void) { Cvar_RegisterVariable (&chase_back); Cvar_RegisterVariable (&chase_up);
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 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // sv_user.c -- server code for moving users #include "quakedef.h" edict_t *sv_player; extern cvar_t sv_friction; cvar_t sv_edgefriction = CVAR2("edgefriction", "2"); extern cvar_t sv_stopspeed; static vec3_t forward, right, up; vec3_t wishdir; float wishspeed; // world float *angles; float *origin; float *velocity; qboolean onground; usercmd_t cmd;
double oldrealtime; // last frame run int host_framecount; qboolean host_framethrottled; // Running too fast int host_hunklevel; int minimum_memory; client_t *host_client; // current client jmp_buf host_abortserver; byte *host_basepal; byte *host_colormap; cvar_t host_framerate = CVAR2("host_framerate","0"); // set for slow motion cvar_t host_speeds = CVAR2("host_speeds","0"); // set for running times cvar_t sys_ticrate = CVAR2("sys_ticrate","0.05"); cvar_t serverprofile = CVAR2("serverprofile","1"); cvar_t fraglimit = CVAR4("fraglimit","0",false,true); cvar_t timelimit = CVAR4("timelimit","0",false,true); cvar_t teamplay = CVAR4("teamplay","0",false,true); cvar_t samelevel = CVAR2("samelevel","0"); cvar_t noexit = CVAR4("noexit","0",false,true); #ifdef QUAKE2 cvar_t developer = CVAR2("developer","1"); // should be 0 for release! #else
#include "quakedef.h" #ifdef _WIN32 #include "winquake.h" #endif #define PACKET_HEADER 8 int net_drop; cvar_t showpackets = CVAR2("showpackets", "0"); cvar_t showdrop = CVAR2("showdrop", "0"); cvar_t qport = CVAR2("qport", "0"); void Netchan_Init (void) { int port; // pick a port value that should be nice and random #ifdef _WIN32 port = ((int)(timeGetTime()*1000) * time(NULL)) & 0xffff; #else port = ((int)(getpid()+getuid()*1000) * time(NULL)) & 0xffff; #endif Cvar_RegisterVariable (&showpackets); Cvar_RegisterVariable (&showdrop); Cvar_RegisterVariable (&qport); Cvar_SetValue("qport", port); }
#else #include "quakedef.h" #endif #define MAX_NUM_ARGVS 50 #define NUM_SAFE_ARGVS 6 usercmd_t nullcmd; // guarenteed to be zero static char *largv[MAX_NUM_ARGVS + NUM_SAFE_ARGVS + 1]; static char *argvdummy = " "; static char *safeargvs[NUM_SAFE_ARGVS] = {"-stdvid", "-nolan", "-nosound", "-nocdaudio", "-nojoy", "-nomouse"}; cvar_t registered = CVAR2("registered","0"); qboolean com_modified; // set true if using non-id files int static_registered = 1; // only for startup check, then set qboolean msg_suppress_1 = 0; void COM_InitFilesystem (void); void COM_Path_f (void); // if a packfile directory differs from this, it is assumed to be hacked #define PAK0_COUNT 339 #define PAK0_CRC 52883
#define MAX_SFX 512 sfx_t *known_sfx; // hunk allocated [MAX_SFX] int num_sfx; sfx_t *ambient_sfx[NUM_AMBIENTS]; int desired_speed = 11025; int desired_bits = 16; int sound_started=0; cvar_t bgmvolume = CVAR3("bgmvolume", "1", true); cvar_t volume = CVAR3("volume", "0.7", true); cvar_t nosound = CVAR2("nosound", "0"); cvar_t precache = CVAR2("precache", "1"); cvar_t loadas8bit = CVAR2("loadas8bit", "0"); cvar_t bgmbuffer = CVAR2("bgmbuffer", "4096"); cvar_t ambient_level = CVAR2("ambient_level", "0.3"); cvar_t ambient_fade = CVAR2("ambient_fade", "100"); cvar_t snd_noextraupdate = CVAR2("snd_noextraupdate", "0"); cvar_t snd_show = CVAR2("snd_show", "0"); cvar_t _snd_mixahead = CVAR3("_snd_mixahead", "0.1", true); // ==================================================================== // User-setable variables // ====================================================================
#include "quakedef.h" int glx, gly, glwidth, glheight; // only the refresh window will be updated unless these variables are flagged int scr_copytop; int scr_copyeverything; float scr_con_current; float scr_conlines; // lines of console to display float oldscreensize, oldfov; cvar_t scr_viewsize = CVAR3("viewsize","100", true); cvar_t scr_fov = CVAR2("fov","90"); // 10 - 170 cvar_t scr_conspeed = CVAR2("scr_conspeed","300"); cvar_t scr_centertime = CVAR2("scr_centertime","2"); cvar_t scr_showram = CVAR2("showram","1"); cvar_t scr_showturtle = CVAR2("showturtle","0"); cvar_t scr_showpause = CVAR2("showpause","1"); cvar_t scr_printspeed = CVAR2("scr_printspeed","8"); cvar_t scr_allowsnap = CVAR2("scr_allowsnap", "1"); cvar_t gl_triplebuffer = CVAR3("gl_triplebuffer", "1", true ); extern cvar_t crosshair; qboolean scr_initialized; // ready to draw qpic_t *scr_ram; qpic_t *scr_net; qpic_t *scr_turtle;
// // screen size info // refdef_t r_refdef; mleaf_t *r_viewleaf, *r_oldviewleaf; texture_t *r_notexture_mip; int d_lightstylevalue[256]; // 8.8 fraction of base light value void R_MarkLeaves (void); cvar_t r_norefresh = CVAR2("r_norefresh","0"); cvar_t r_drawentities = CVAR2("r_drawentities","1"); cvar_t r_drawviewmodel = CVAR2("r_drawviewmodel","1"); cvar_t r_speeds = CVAR2("r_speeds","0"); cvar_t r_fullbright = CVAR2("r_fullbright","0"); cvar_t r_lightmap = CVAR2("r_lightmap","0"); cvar_t r_shadows = CVAR2("r_shadows","0"); cvar_t r_mirroralpha = CVAR2("r_mirroralpha","1"); cvar_t r_wateralpha = CVAR2("r_wateralpha","1"); cvar_t r_dynamic = CVAR2("r_dynamic","1"); cvar_t r_novis = CVAR2("r_novis","0"); cvar_t gl_finish = CVAR2("gl_finish","0"); cvar_t gl_clear = CVAR2("gl_clear","0"); cvar_t gl_cull = CVAR2("gl_cull","1"); cvar_t gl_texsort = CVAR2("gl_texsort","1");
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 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "quakedef.h" #include "winquake.h" cvar_t cl_nopred = CVAR2("cl_nopred","0"); cvar_t cl_pushlatency = CVAR2("pushlatency","-999"); extern frame_t *view_frame; /* ================= CL_NudgePosition If pmove.origin is in a solid position, try nudging slightly on all axis to allow for the cut precision of the net coordinates ================= */ void CL_NudgePosition (void) {