]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_parse.c
got rid of Mod_CheckLoaded, changed how model system restart works to make this work...
[xonotic/darkplaces.git] / cl_parse.c
index 6cfe6acf3ad19b18a8ffda7df8f8a54c99e9b0da..5933c8639fb24803942c28792bdacfc3c5439bbb 100644 (file)
@@ -280,29 +280,29 @@ Con_DPrintf("CL_SignonReply: %i\n", cls.signon);
 
        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");
@@ -366,7 +366,7 @@ void CL_ParseServerInfo (void)
                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 ();
@@ -475,6 +475,7 @@ void CL_ParseServerInfo (void)
        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);
@@ -510,7 +511,6 @@ void CL_ValidateState(entity_state_t *s)
        }
 
        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);
@@ -1489,7 +1489,7 @@ void CL_ParseServerMessage(void)
                                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: