"svc_nop",
"svc_disconnect",
"svc_updatestat",
- "svc_version", // [long] server version
+ "svc_version", // [int] server version
"svc_setview", // [short] entity number
"svc_sound", // <see code>
"svc_time", // [float] server time
// the string should be \n terminated
"svc_setangle", // [vec3] set the view angle to this absolute value
- "svc_serverinfo", // [long] version
+ "svc_serverinfo", // [int] version
// [string] signon string
// [string]..[0]model cache [string]...[0]sounds cache
// [string]..[0]item cache
==================
*/
-static qbyte olddata[NET_MAXMESSAGE];
+static unsigned char olddata[NET_MAXMESSAGE];
void CL_KeepaliveMessage (void)
{
float time;
if (cls.netcon && NetConn_CanSendMessage(cls.netcon) && (time = Sys_DoubleTime()) - lastmsg >= 5)
{
sizebuf_t msg;
- qbyte buf[4];
+ unsigned char buf[4];
lastmsg = time;
// write out a nop
// LordHavoc: must use unreliable because reliable could kill the sigon message!
case 2:
MSG_WriteByte (&cls.message, clc_stringcmd);
- MSG_WriteString (&cls.message, va("name \"%s\"\n", cl_name.string));
+ MSG_WriteString (&cls.message, va("name \"%s\"", cl_name.string));
MSG_WriteByte (&cls.message, clc_stringcmd);
- MSG_WriteString (&cls.message, va("color %i %i\n", cl_color.integer >> 4, cl_color.integer & 15));
+ MSG_WriteString (&cls.message, va("color %i %i", cl_color.integer >> 4, cl_color.integer & 15));
if (cl_pmodel.integer)
{
MSG_WriteByte (&cls.message, clc_stringcmd);
- MSG_WriteString (&cls.message, va("pmodel %i\n", cl_pmodel.integer));
+ MSG_WriteString (&cls.message, va("pmodel %i", cl_pmodel.integer));
}
if (*cl_playermodel.string)
{
MSG_WriteByte (&cls.message, clc_stringcmd);
- MSG_WriteString (&cls.message, va("playermodel %s\n", cl_playermodel.string));
+ MSG_WriteString (&cls.message, va("playermodel %s", cl_playermodel.string));
}
if (*cl_playerskin.string)
{
MSG_WriteByte (&cls.message, clc_stringcmd);
- MSG_WriteString (&cls.message, va("playerskin %s\n", cl_playerskin.string));
+ MSG_WriteString (&cls.message, va("playerskin %s", cl_playerskin.string));
}
MSG_WriteByte (&cls.message, clc_stringcmd);
- MSG_WriteString (&cls.message, va("rate %i\n", cl_rate.integer));
+ MSG_WriteString (&cls.message, va("rate %i", cl_rate.integer));
MSG_WriteByte (&cls.message, clc_stringcmd);
MSG_WriteString (&cls.message, "spawn");
Host_Error("Bad maxclients (%u) from server\n", cl.maxclients);
return;
}
- cl.scores = Mem_Alloc(cl_mempool, cl.maxclients*sizeof(*cl.scores));
+ cl.scores = (scoreboard_t *)Mem_Alloc(cl_mempool, cl.maxclients*sizeof(*cl.scores));
// parse gametype
cl.gametype = MSG_ReadByte ();
// precache any models used by the client (this also marks them used)
cl.model_bolt = Mod_ForName("progs/bolt.mdl", false, false, false);
cl.model_bolt2 = Mod_ForName("progs/bolt2.mdl", false, false, false);
- cl.model_bolt3 = Mod_ForName("progs/bolt3.mdl", true, false, false);
- cl.model_beam = Mod_ForName("progs/beam.mdl", true, false, false);
+ cl.model_bolt3 = Mod_ForName("progs/bolt3.mdl", false, false, false);
+ cl.model_beam = Mod_ForName("progs/beam.mdl", false, false, false);
Mod_PurgeUnused();
// do the same for sounds
// world model
CL_KeepaliveMessage ();
cl.model_precache[1] = Mod_ForName(parse_model_precache[1], false, false, true);
- if (cl.model_precache[1] == NULL)
+ if (cl.model_precache[1]->Draw == NULL)
Con_Printf("Map %s not found\n", parse_model_precache[1]);
// normal models
for (i=2 ; i<nummodels ; i++)
{
CL_KeepaliveMessage();
- if ((cl.model_precache[i] = Mod_ForName(parse_model_precache[i], false, false, false)) == NULL)
+ if ((cl.model_precache[i] = Mod_ForName(parse_model_precache[i], false, false, false))->Draw == NULL)
Con_Printf("Model %s not found\n", parse_model_precache[i]);
}
ent->render.model = cl.worldmodel = cl.model_precache[1];
ent->render.scale = 1; // some of the renderer still relies on scale
ent->render.alpha = 1;
+ ent->render.colormap = -1; // no special coloring
ent->render.flags = RENDER_SHADOW | RENDER_LIGHT;
Matrix4x4_CreateFromQuakeEntity(&ent->render.matrix, 0, 0, 0, 0, 0, 0, 1);
Matrix4x4_Invert_Simple(&ent->render.inversematrix, &ent->render.matrix);
}
model = cl.model_precache[s->modelindex];
- Mod_CheckLoaded(model);
if (model && model->type && s->frame >= model->numframes)
{
Con_DPrintf("CL_ValidateState: no such frame %i in \"%s\" (which has %i frames)\n", s->frame, model->name, model->numframes);
// not a monster
ent->persistent.lerpstarttime = ent->state_previous.time;
// no lerp if it's singleplayer
- if (cl.islocalgame)
+ if (cl.islocalgame && !sv_fixedframeratesingleplayer.integer)
ent->persistent.lerpdeltatime = 0;
else
ent->persistent.lerpdeltatime = bound(0, ent->state_current.time - ent->state_previous.time, 0.1);
// override any beam with the same entity
for (i = 0, b = cl_beams;i < cl_max_beams;i++, b++)
{
- if (b->entity == ent)
+ if (b->entity == ent && ent)
{
//b->entity = ent;
b->lightning = lightning;
int rnd;
int colorStart, colorLength, count;
float velspeed, radius;
- qbyte *tempcolor;
+ unsigned char *tempcolor;
matrix4x4_t tempmatrix;
type = MSG_ReadByte();
colorStart = MSG_ReadByte();
colorLength = MSG_ReadByte();
CL_ParticleExplosion2(pos, colorStart, colorLength);
- tempcolor = (qbyte *)&palette_complete[(rand()%colorLength) + colorStart];
+ tempcolor = (unsigned char *)&palette_complete[(rand()%colorLength) + colorStart];
color[0] = tempcolor[0] * (2.0f / 255.0f);
color[1] = tempcolor[1] * (2.0f / 255.0f);
color[2] = tempcolor[2] * (2.0f / 255.0f);
#define SHOWNET(x) if(cl_shownet.integer==2)Con_Printf("%3i:%s\n", msg_readcount-1, x);
-static qbyte cgamenetbuffer[65536];
+static unsigned char cgamenetbuffer[65536];
/*
=====================
int cmd;
int i;
protocolversion_t protocol;
- qbyte cmdlog[32];
+ unsigned char cmdlog[32];
char *cmdlogname[32], *temp;
int cmdindex, cmdcount = 0;
qboolean sendmove = false;
Host_Error ("svc_lightstyle >= MAX_LIGHTSTYLES");
strlcpy (cl_lightstyle[i].map, MSG_ReadString(), sizeof (cl_lightstyle[i].map));
cl_lightstyle[i].map[MAX_STYLESTRING - 1] = 0;
- cl_lightstyle[i].length = strlen(cl_lightstyle[i].map);
+ cl_lightstyle[i].length = (int)strlen(cl_lightstyle[i].map);
break;
case svc_sound:
cl.cdtrack = MSG_ReadByte ();
cl.looptrack = MSG_ReadByte ();
if ( (cls.demoplayback || cls.demorecording) && (cls.forcetrack != -1) )
- CDAudio_Play ((qbyte)cls.forcetrack, true);
+ CDAudio_Play ((unsigned char)cls.forcetrack, true);
else
- CDAudio_Play ((qbyte)cl.cdtrack, true);
+ CDAudio_Play ((unsigned char)cl.cdtrack, true);
break;
case svc_intermission: