==================
*/
-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");
protocol = Protocol_EnumForNumber(i);
if (protocol == PROTOCOL_UNKNOWN)
{
- Host_Error("CL_ParseServerInfo: Server is unrecognized protocol number (%i)\n", i);
+ Host_Error("CL_ParseServerInfo: Server is unrecognized protocol number (%i)", i);
return;
}
// hack for unmarked Nehahra movie demos which had a custom protocol
cl.maxclients = MSG_ReadByte ();
if (cl.maxclients < 1 || cl.maxclients > MAX_SCOREBOARD)
{
- Host_Error("Bad maxclients (%u) from server\n", cl.maxclients);
+ Host_Error("Bad maxclients (%u) from server", 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 ();
if (!str[0])
break;
if (nummodels==MAX_MODELS)
- Host_Error ("Server sent too many model precaches\n");
+ Host_Error ("Server sent too many model precaches");
if (strlen(str) >= MAX_QPATH)
Host_Error ("Server sent a precache name of %i characters (max %i)", strlen(str), MAX_QPATH - 1);
strlcpy (parse_model_precache[nummodels], str, sizeof (parse_model_precache[nummodels]));
if (!str[0])
break;
if (numsounds==MAX_SOUNDS)
- Host_Error("Server sent too many sound precaches\n");
+ Host_Error("Server sent too many sound precaches");
if (strlen(str) >= MAX_QPATH)
Host_Error("Server sent a precache name of %i characters (max %i)", strlen(str), MAX_QPATH - 1);
strlcpy (parse_sound_precache[numsounds], str, sizeof (parse_sound_precache[numsounds]));
// 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);
return;
if (s->modelindex >= MAX_MODELS)
- Host_Error("CL_ValidateState: modelindex (%i) >= MAX_MODELS (%i)\n", s->modelindex, MAX_MODELS);
+ Host_Error("CL_ValidateState: modelindex (%i) >= MAX_MODELS (%i)", s->modelindex, MAX_MODELS);
// colormap is client index + 1
if ((!s->flags & RENDER_COLORMAPPED) && s->colormap > cl.maxclients)
}
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);
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;
}
description[strlen(description)-1] = '\n'; // replace the last space with a newline
Con_Print(description);
- Host_Error ("CL_ParseServerMessage: Illegible server message\n");
+ Host_Error ("CL_ParseServerMessage: Illegible server message");
}
break;
i = MSG_ReadLong ();
protocol = Protocol_EnumForNumber(i);
if (protocol == PROTOCOL_UNKNOWN)
- Host_Error("CL_ParseServerMessage: Server is unrecognized protocol number (%i)\n", i);
+ Host_Error("CL_ParseServerMessage: Server is unrecognized protocol number (%i)", i);
// hack for unmarked Nehahra movie demos which had a custom protocol
if (protocol == PROTOCOL_QUAKEDP && cls.demoplayback && demo_nehahra.integer)
protocol = PROTOCOL_NEHAHRAMOVIE;
case svc_setview:
cl.viewentity = (unsigned short)MSG_ReadShort ();
if (cl.viewentity >= MAX_EDICTS)
- Host_Error("svc_setview >= MAX_EDICTS\n");
+ Host_Error("svc_setview >= MAX_EDICTS");
if (cl.viewentity >= cl_max_entities)
CL_ExpandEntities(cl.viewentity);
// LordHavoc: assume first setview recieved is the real player entity
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: