]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_parse.c
removed \n from all Host_Error, Sys_Error, PRVM_ERROR, PF_ERROR calls, since Host_Err...
[xonotic/darkplaces.git] / cl_parse.c
index a5aea07234b8a6a70988df1dc2614dce7f5fec7a..f32d9b48d3c4b5f09527c6a2f9ff1250249a8a94 100644 (file)
@@ -168,7 +168,7 @@ so the server doesn't disconnect.
 ==================
 */
 
-static qbyte olddata[NET_MAXMESSAGE];
+static unsigned char olddata[NET_MAXMESSAGE];
 void CL_KeepaliveMessage (void)
 {
        float time;
@@ -197,7 +197,7 @@ void CL_KeepaliveMessage (void)
        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!
@@ -350,7 +350,7 @@ void CL_ParseServerInfo (void)
        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
@@ -363,7 +363,7 @@ void CL_ParseServerInfo (void)
        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 = (scoreboard_t *)Mem_Alloc(cl_mempool, cl.maxclients*sizeof(*cl.scores));
@@ -400,7 +400,7 @@ void CL_ParseServerInfo (void)
                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]));
@@ -412,7 +412,7 @@ void CL_ParseServerInfo (void)
                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]));
@@ -501,7 +501,7 @@ void CL_ValidateState(entity_state_t *s)
                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)
@@ -903,7 +903,7 @@ void CL_ParseTempEntity(void)
        int rnd;
        int colorStart, colorLength, count;
        float velspeed, radius;
-       qbyte *tempcolor;
+       unsigned char *tempcolor;
        matrix4x4_t tempmatrix;
 
        type = MSG_ReadByte();
@@ -1252,7 +1252,7 @@ void CL_ParseTempEntity(void)
                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);
@@ -1304,7 +1304,7 @@ void CL_ParseTempEntity(void)
 
 #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];
 
 /*
 =====================
@@ -1317,7 +1317,7 @@ void CL_ParseServerMessage(void)
        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;
@@ -1409,7 +1409,7 @@ void CL_ParseServerMessage(void)
                                }
                                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;
 
@@ -1432,7 +1432,7 @@ void CL_ParseServerMessage(void)
                        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;
@@ -1475,7 +1475,7 @@ void CL_ParseServerMessage(void)
                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
@@ -1651,9 +1651,9 @@ void CL_ParseServerMessage(void)
                        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: