net_message.cursize = LittleLong (net_message.cursize);
if (net_message.cursize > MAX_MSGLEN)
- Sys_Error ("Demo message > MAX_MSGLEN");
+ Host_Error ("Demo message > MAX_MSGLEN");
r = fread (net_message.data, net_message.cursize, 1, cls.demofile);
if (r != 1)
{
int bits;
sizebuf_t buf;
byte data[128];
-
+ static double lastmovetime;
+ static float forwardmove, sidemove, upmove, total; // accumulation
+
+ forwardmove += cmd->forwardmove;
+ sidemove += cmd->sidemove;
+ upmove += cmd->upmove;
+ total++;
+ // LordHavoc: cap outgoing movement messages to sys_ticrate
+ if (realtime - lastmovetime < sys_ticrate.value)
+ return;
+ lastmovetime = realtime;
+ // average what has happened during this time
+ total = 1.0f / total;
+ forwardmove *= total;
+ sidemove *= total;
+ upmove *= total;
+ total = 0;
+
buf.maxsize = 128;
buf.cursize = 0;
buf.data = data;
for (i=0 ; i<3 ; i++)
MSG_WriteAngle (&buf, cl.viewangles[i]);
- MSG_WriteShort (&buf, cmd->forwardmove);
- MSG_WriteShort (&buf, cmd->sidemove);
- MSG_WriteShort (&buf, cmd->upmove);
+ MSG_WriteShort (&buf, forwardmove);
+ MSG_WriteShort (&buf, sidemove);
+ MSG_WriteShort (&buf, upmove);
//
// send button bits
//
if (++cl.movemessages <= 2)
return;
-
+
if (NET_SendUnreliableMessage (cls.netcon, &buf) == -1)
{
Con_Printf ("CL_SendMove: lost server connection\n");
cvar_t cl_shownet = {"cl_shownet","0"}; // can be 0, 1, or 2
cvar_t cl_nolerp = {"cl_nolerp","0"};
-cvar_t maxfps = {"maxfps", "100"};
-
cvar_t lookspring = {"lookspring","0", true};
cvar_t lookstrafe = {"lookstrafe","0", true};
cvar_t sensitivity = {"sensitivity","3", true};
Cvar_RegisterVariable (&cl_anglespeedkey);
Cvar_RegisterVariable (&cl_shownet);
Cvar_RegisterVariable (&cl_nolerp);
- Cvar_RegisterVariable (&maxfps);
Cvar_RegisterVariable (&lookspring);
Cvar_RegisterVariable (&lookstrafe);
Cvar_RegisterVariable (&sensitivity);
else
{
if (i > cl.maxclients)
- Sys_Error ("i >= cl.maxclients");
+ Host_Error ("i >= cl.maxclients");
ent->colormap = cl.scores[i-1].translations;
}
byte *dest, *source;
if (slot > cl.maxclients)
- Sys_Error ("CL_NewTranslation: slot > cl.maxclients");
+ Host_Error ("CL_NewTranslation: slot > cl.maxclients");
dest = cl.scores[slot].translations;
source = vid.colormap;
memcpy (dest, vid.colormap, sizeof(cl.scores[slot].translations));
case svc_lightstyle:
i = MSG_ReadByte ();
if (i >= MAX_LIGHTSTYLES)
- Sys_Error ("svc_lightstyle > MAX_LIGHTSTYLES");
+ Host_Error ("svc_lightstyle > MAX_LIGHTSTYLES");
strcpy (cl_lightstyle[i].map, MSG_ReadString());
cl_lightstyle[i].length = strlen(cl_lightstyle[i].map);
break;
case svc_updatestat:
i = MSG_ReadByte ();
if (i < 0 || i >= MAX_CL_STATS)
- Sys_Error ("svc_updatestat: %i is invalid", i);
+ Host_Error ("svc_updatestat: %i is invalid", i);
cl.stats[i] = MSG_ReadLong ();;
break;
break;
default:
- Sys_Error ("CL_ParseTEnt: bad type");
+ Host_Error ("CL_ParseTEnt: bad type %d", type);
}
}
if (buf->cursize + length > buf->maxsize)
{
if (!buf->allowoverflow)
- Sys_Error ("SZ_GetSpace: overflow without allowoverflow set - use -zone on the commandline for more zone memory, default: 512k (quake original default was 48k)");
+ Host_Error ("SZ_GetSpace: overflow without allowoverflow set - use -zone on the commandline for more zone memory, default: 512k (quake original default was 48k)");
if (length > buf->maxsize)
- Sys_Error ("SZ_GetSpace: %i is > full buffer size", length);
+ Host_Error ("SZ_GetSpace: %i is > full buffer size", length);
buf->overflowed = true;
Con_Printf ("SZ_GetSpace: overflow");
if (scaled_height > gl_max_size.value)
scaled_height = gl_max_size.value;
+ if (alpha)
+ {
+ alpha = false;
+ in = data;
+ for (i = 3;i < width*height*4;i += 4)
+ if (in[i] != 255)
+ {
+ alpha = true;
+ break;
+ }
+ }
+
samples = alpha ? gl_alpha_format : gl_solid_format;
#if 0
//// offset by 16 depth units so decal sprites appear infront of walls
//glPolygonOffset(1, -16);
//glEnable(GL_POLYGON_OFFSET_FILL);
- tpolytype = -1;
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ tpolytype = TPOLYTYPE_ALPHA;
texnum = -1;
/*
if (gl_vertexarrays.value)
void GL_DrawSpriteImage (mspriteframe_t *frame, vec3_t origin, vec3_t up, vec3_t right, int red, int green, int blue, int alpha)
{
// LordHavoc: rewrote this to use the transparent poly system
- // FIXME: need to use uncolored fog sprite
transpolybegin(frame->gl_texturenum, 0, frame->gl_fogtexturenum, currententity->effects & EF_ADDITIVE ? TPOLYTYPE_ADD : TPOLYTYPE_ALPHA);
transpolyvert(origin[0] + frame->down * up[0] + frame->left * right[0], origin[1] + frame->down * up[1] + frame->left * right[1], origin[2] + frame->down * up[2] + frame->left * right[2], 0, 1, red, green, blue, alpha);
transpolyvert(origin[0] + frame->up * up[0] + frame->left * right[0], origin[1] + frame->up * up[1] + frame->left * right[1], origin[2] + frame->up * up[2] + frame->left * right[2], 0, 0, red, green, blue, alpha);
cvar_t scr_showpause = {"showpause","1"};
cvar_t scr_printspeed = {"scr_printspeed","8"};
cvar_t gl_triplebuffer = {"gl_triplebuffer", "1", true };
+cvar_t showfps = {"showfps", "0", true};
extern cvar_t crosshair;
Cvar_RegisterVariable (&scr_centertime);
Cvar_RegisterVariable (&scr_printspeed);
Cvar_RegisterVariable (&gl_triplebuffer);
+ Cvar_RegisterVariable (&showfps);
//
// register our commands
M_Draw ();
}
+ if (showfps.value)
+ {
+ static double currtime;
+ double newtime;
+ char temp[32];
+ int calc;
+ newtime = Sys_FloatTime();
+ calc = (int) (100.0 / (newtime - currtime));
+ sprintf(temp, "% 4i.%02i fps", calc / 100, calc % 100);
+ currtime = newtime;
+ Draw_String(vid.width - (12*8), 0, temp, 9999);
+ }
+
V_UpdatePalette ();
GL_BrightenScreen();
if (r_speeds.value)
{
time2 = Sys_FloatTime ();
- Con_Printf ("%3i ms %4i wpoly %4i epoly %4i BSPnodes\n", (int)((time2-time1)*1000), c_brush_polys, c_alias_polys, c_nodes);
+ Con_Printf ("%3i ms %4i wpoly %4i epoly %4i transpoly %4i BSPnodes\n", (int)((time2-time1)*1000), c_brush_polys, c_alias_polys, currenttranspoly, c_nodes);
}
GL_EndRendering ();
}
//============================================================================
-extern cvar_t maxfps;
-
/*
===================
Host_FilterTime
{
realtime += time;
- if (maxfps.value < 5) // LordHavoc: sanity checking
- maxfps.value = 5;
- if (maxfps.value > 1000) // LordHavoc: sanity checking
- maxfps.value = 1000;
- if (!cls.timedemo && realtime - oldrealtime < (1.0 / maxfps.value))
- return false; // framerate is too high
+// if (!cls.timedemo && realtime - oldrealtime < (1.0 / 72.0))
+// return false; // framerate is too high
host_frametime = (realtime - oldrealtime) * slowmo.value; // LordHavoc: slowmo cvar
oldrealtime = realtime;
#else
+double frametimetotal = 0, lastservertime = 0;
void Host_ServerFrame (void)
{
-// run the world state
- pr_global_struct->frametime = host_frametime;
+ frametimetotal += host_frametime;
+ // LordHavoc: cap server at sys_ticrate in listen games
+ if (!isDedicated && ((realtime - lastservertime) < sys_ticrate.value))
+ return;
+// run the world state
+ pr_global_struct->frametime = frametimetotal;
+ frametimetotal = 0;
+// pr_global_struct->frametime = host_frametime;
// set the time and clear the general datagram
SV_ClearDatagram ();
if (targa_header.image_type!=2
&& targa_header.image_type!=10)
- Sys_Error ("LoadTGA: Only type 2 and 10 targa RGB images supported\n");
+ Host_Error ("LoadTGA: Only type 2 and 10 targa RGB images supported\n");
if (targa_header.colormap_type !=0
|| (targa_header.pixel_size!=32 && targa_header.pixel_size!=24))
- Sys_Error ("Texture_LoadTGA: Only 32 or 24 bit images supported (no colormaps)\n");
+ Host_Error ("Texture_LoadTGA: Only 32 or 24 bit images supported (no colormaps)\n");
columns = targa_header.width;
rows = targa_header.height;
skin = (byte *)(pskintype + 1);
if (numskins < 1 || numskins > MAX_SKINS)
- Sys_Error ("Mod_LoadAliasModel: Invalid # of skins: %d\n", numskins);
+ Host_Error ("Mod_LoadAliasModel: Invalid # of skins: %d\n", numskins);
s = pheader->skinwidth * pheader->skinheight;
tris->v[j] = pouttriangles->index_xyz[j] = LittleShort (pintriangles->index_xyz[j]);
pouttriangles->index_st[j] = LittleShort (pintriangles->index_st[j]);
if (pouttriangles->index_xyz[j] >= pheader->num_xyz)
- Sys_Error ("%s has invalid vertex indices", mod->name);
+ Host_Error ("%s has invalid vertex indices", mod->name);
if (pouttriangles->index_st[j] >= pheader->num_st)
- Sys_Error ("%s has invalid vertex indices", mod->name);
+ Host_Error ("%s has invalid vertex indices", mod->name);
}
pintriangles++;
pouttriangles++;
mt->offsets[j] = LittleLong (mt->offsets[j]);
if ( (mt->width & 15) || (mt->height & 15) )
- Sys_Error ("Texture %s is not 16 aligned", mt->name);
+ Host_Error ("Texture %s is not 16 aligned", mt->name);
// LordHavoc: rewriting the map texture loader for GLQuake
tx = Hunk_AllocName (sizeof(texture_t), loadname );
loadmodel->textures[i] = tx;
freeimage = TRUE;
bytesperpixel = 4;
fullbrights = FALSE;
- transparent = FALSE;
- data = loadimagepixels(mt->name, FALSE, tx->width, tx->height);
+ transparent = TRUE;
+ data = loadimagepixels(mt->name, FALSE, 0, 0); //tx->width, tx->height);
if (!data) // no external texture found
{
freeimage = FALSE;
+ transparent = FALSE;
bytesperpixel = 1;
if (!hlbsp && mt->offsets[0]) // texture included
{
}
else
{
- for (j = 0;j < image_width*image_height;j++)
- if (data[j*4+3] < 255)
- {
- transparent = TRUE;
- break;
- }
+ tx->width = image_width;
+ tx->height = image_height;
}
- if (!hlbsp && !strncmp(mt->name,"sky",3)) // LordHavoc: HL sky textures are entirely unrelated
+ if (!hlbsp && !strncmp(mt->name,"sky",3) && tx->width == 256 && tx->height == 128) // LordHavoc: HL sky textures are entirely unrelated
{
tx->transparent = FALSE;
R_InitSky (data, bytesperpixel);
altmax = num+1;
}
else
- Sys_Error ("Bad animating texture %s", tx->name);
+ Host_Error ("Bad animating texture %s", tx->name);
}
#define ANIM_CYCLE 2
{
tx2 = anims[j];
if (!tx2)
- Sys_Error ("Missing frame %i of %s",j, tx->name);
+ Host_Error ("Missing frame %i of %s",j, tx->name);
tx2->anim_total = max * ANIM_CYCLE;
tx2->anim_min = j * ANIM_CYCLE;
tx2->anim_max = (j+1) * ANIM_CYCLE;
{
tx2 = altanims[j];
if (!tx2)
- Sys_Error ("Missing frame %i of %s",j, tx->name);
+ Host_Error ("Missing frame %i of %s",j, tx->name);
tx2->anim_total = altmax * ANIM_CYCLE;
tx2->anim_min = j * ANIM_CYCLE;
tx2->anim_max = (j+1) * ANIM_CYCLE;
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
- Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
+ Host_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
count = l->filelen / sizeof(*in);
out = Hunk_AllocName ( count*sizeof(*out), loadname);
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
- Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
+ Host_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
count = l->filelen / sizeof(*in);
out = Hunk_AllocName ( count*sizeof(*out), loadname);
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
- Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
+ Host_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
count = l->filelen / sizeof(*in);
out = Hunk_AllocName ( (count + 1) * sizeof(*out), loadname);
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
- Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
+ Host_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
count = l->filelen / sizeof(*in);
out = Hunk_AllocName ( count*sizeof(*out), loadname);
else
{
if (miptex >= loadmodel->numtextures)
- Sys_Error ("miptex >= loadmodel->numtextures");
+ Host_Error ("miptex >= loadmodel->numtextures");
out->texture = loadmodel->textures[miptex];
if (!out->texture)
{
s->texturemins[i] = bmins[i] * 16;
s->extents[i] = (bmaxs[i] - bmins[i]) * 16;
if ( !(tex->flags & TEX_SPECIAL) && s->extents[i] > 512 /* 256 */ )
- Sys_Error ("Bad surface extents");
+ Host_Error ("Bad surface extents");
}
}
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
- Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
+ Host_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
count = l->filelen / sizeof(*in);
out = Hunk_AllocName ( count*sizeof(*out), loadname);
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
- Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
+ Host_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
count = l->filelen / sizeof(*in);
out = Hunk_AllocName ( count*sizeof(*out), loadname);
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
- Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
+ Host_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
count = l->filelen / sizeof(*in);
out = Hunk_AllocName ( count*sizeof(*out), loadname);
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
- Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
+ Host_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
count = l->filelen / sizeof(*in);
out = Hunk_AllocName ( count*sizeof(*out), loadname);
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
- Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
+ Host_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
count = l->filelen / sizeof(*in);
out = Hunk_AllocName ( count*sizeof(*out), loadname);
{
j = LittleShort(in[i]);
if (j >= loadmodel->numsurfaces)
- Sys_Error ("Mod_ParseMarksurfaces: bad surface number");
+ Host_Error ("Mod_ParseMarksurfaces: bad surface number");
out[i] = loadmodel->surfaces + j;
}
}
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
- Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
+ Host_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
count = l->filelen / sizeof(*in);
out = Hunk_AllocName ( count*sizeof(*out), loadname);
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
- Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
+ Host_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
count = l->filelen / sizeof(*in);
out = Hunk_AllocName ( count*2*sizeof(*out), loadname);
i = LittleLong (header->version);
if (i != BSPVERSION & i != 30)
- Sys_Error ("Mod_LoadBrushModel: %s has wrong version number (%i should be %i or 30 (HalfLife))", mod->name, i, BSPVERSION);
+ Host_Error ("Mod_LoadBrushModel: %s has wrong version number (%i should be %i or 30 (HalfLife))", mod->name, i, BSPVERSION);
hlbsp = i == 30;
halflifebsp.value = hlbsp;
Mod_LoadModel (mod, true);
if (!mod->cache.data)
- Sys_Error ("Mod_Extradata: caching failed");
+ Host_Error ("Mod_Extradata: caching failed");
return mod->cache.data;
}
model_t *mod;
if (!name[0])
- Sys_Error ("Mod_ForName: NULL name");
+ Host_Error ("Mod_ForName: NULL name");
//
// search the currently loaded models
if (i == mod_numknown)
{
if (mod_numknown == MAX_MOD_KNOWN)
- Sys_Error ("mod_numknown == MAX_MOD_KNOWN");
+ Host_Error ("mod_numknown == MAX_MOD_KNOWN");
strcpy (mod->name, name);
mod->needload = true;
mod_numknown++;
// load the frames
//
if (numframes < 1)
- Sys_Error ("Mod_LoadSpriteModel: Invalid # of frames: %d\n", numframes);
+ Host_Error ("Mod_LoadSpriteModel: Invalid # of frames: %d\n", numframes);
mod->numframes = numframes;
attenuation = G_FLOAT(OFS_PARM4);
if (volume < 0 || volume > 255)
- Sys_Error ("SV_StartSound: volume = %i", volume);
+ Host_Error ("SV_StartSound: volume = %i", volume);
if (attenuation < 0 || attenuation > 4)
- Sys_Error ("SV_StartSound: attenuation = %f", attenuation);
+ Host_Error ("SV_StartSound: attenuation = %f", attenuation);
if (channel < 0 || channel > 7)
- Sys_Error ("SV_StartSound: channel = %i", channel);
+ Host_Error ("SV_StartSound: channel = %i", channel);
SV_StartSound (entity, channel, sample, volume, attenuation);
}
}
if (i == MAX_EDICTS)
- Sys_Error ("ED_Alloc: no free edicts");
+ Host_Error ("ED_Alloc: no free edicts");
sv.num_edicts++;
e = EDICT_NUM(i);
if (!data)
break;
if (com_token[0] != '{')
- Sys_Error ("ED_LoadFromFile: found %s when expecting {",com_token);
+ Host_Error ("ED_LoadFromFile: found %s when expecting {",com_token);
if (!ent)
ent = EDICT_NUM(0);
// LordHavoc: turned EDICT_NUM into a #define for speed reasons
edict_t *EDICT_NUM_ERROR(int n)
{
- Sys_Error ("EDICT_NUM: bad number %i", n);
+ Host_Error ("EDICT_NUM: bad number %i", n);
return NULL;
}
/*
b = b / pr_edict_size;
if (b < 0 || b >= sv.num_edicts)
- Sys_Error ("NUM_FOR_EDICT: bad pointer");
+ Host_Error ("NUM_FOR_EDICT: bad pointer");
return b;
}
int i, c;
if (pr_depth <= 0)
- Sys_Error ("prog stack underflow");
+ Host_Error ("prog stack underflow");
// restore locals from the stack
c = pr_xfunction->locals;
sfx_t *sfx;
if (!name)
- Sys_Error ("S_FindName: NULL\n");
+ Host_Error ("S_FindName: NULL\n");
if (strlen(name) >= MAX_QPATH)
- Sys_Error ("Sound name too long: %s", name);
+ Host_Error ("Sound name too long: %s", name);
// see if already loaded
for (i=0 ; i < num_sfx ; i++)
if (info.samples)
{
if (samples < info.samples)
- Sys_Error ("Sound %s has a bad loop length", name);
+ Host_Error ("Sound %s has a bad loop length", name);
}
else
info.samples = samples;
int ent;
if (volume < 0 || volume > 255)
- Sys_Error ("SV_StartSound: volume = %i", volume);
+ Host_Error ("SV_StartSound: volume = %i", volume);
if (attenuation < 0 || attenuation > 4)
- Sys_Error ("SV_StartSound: attenuation = %f", attenuation);
+ Host_Error ("SV_StartSound: attenuation = %f", attenuation);
if (channel < 0 || channel > 7)
- Sys_Error ("SV_StartSound: channel = %i", channel);
+ Host_Error ("SV_StartSound: channel = %i", channel);
if (sv.datagram.cursize > MAX_DATAGRAM-16)
return;
if (!strcmp(sv.model_precache[i], name))
return i;
if (i==MAX_MODELS || !sv.model_precache[i])
- Sys_Error ("SV_ModelIndex: model %s not precached", name);
+ Host_Error ("SV_ModelIndex: model %s not precached", name);
return i;
}
break; // moved the entire distance
if (!trace.ent)
- Sys_Error ("SV_FlyMove: !trace.ent");
+ Host_Error ("SV_FlyMove: !trace.ent");
if (trace.plane.normal[2] > 0.7)
{
break;
default:
- Sys_Error ("SV_Physics_client: bad movetype %i", (int)ent->v.movetype);
+ Host_Error ("SV_Physics_client: bad movetype %i", (int)ent->v.movetype);
}
//
|| ent->v.movetype == MOVETYPE_FLYMISSILE)
SV_Physics_Toss (ent);
else
- Sys_Error ("SV_Physics: bad movetype %i", (int)ent->v.movetype);
+ Host_Error ("SV_Physics: bad movetype %i", (int)ent->v.movetype);
}
if (pr_global_struct->force_retouch)
f = fopen(path, "wb");
if (!f)
- Sys_Error ("Error opening %s: %s", path,strerror(errno));
+ Host_Error ("Error opening %s: %s", path,strerror(errno));
sys_handles[i] = f;
VID_ForceLockState (t);
DWORD flOldProtect;
if (!VirtualProtect((LPVOID)startaddr, length, PAGE_READWRITE, &flOldProtect))
- Sys_Error("Protection change failed\n");
+ Sys_Error("Protection change failed\n");
}
}
-extern cvar_t maxfps;
-
/*
==================
WinMain
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
quakeparms_t parms;
- double time, oldtime, newtime, timediff;
+ double time, oldtime, newtime/*, timediff*/;
MEMORYSTATUS lpBuffer;
static char cwd[1024];
int t;
/* main window message loop */
while (1)
{
- if (maxfps.value < 5) // LordHavoc: sanity checking
- maxfps.value = 5;
- if (maxfps.value > 1000) // LordHavoc: sanity checking
- maxfps.value = 1000;
if (isDedicated)
{
newtime = Sys_FloatTime ();
{
SleepUntilInput (NOT_FOCUS_SLEEP);
}
+ /*
else if (!cls.timedemo && time < (timediff = 1.0 / maxfps.value))
{
newtime = Sys_FloatTime ();
time = newtime - oldtime;
}
}
+ */
newtime = Sys_FloatTime ();
time = newtime - oldtime;