]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_brush.c
changed most COM_ParseToken calls to COM_ParseTokenConsole, this fixed the kills...
[xonotic/darkplaces.git] / model_brush.c
index a6825e0d33c760674a75ad9851e1682d6fd712ea..32c49f6e2e63ef42b02cda23b00d9f0f10ed1f60 100644 (file)
@@ -1639,13 +1639,13 @@ static void Mod_Q1BSP_ParseWadsFromEntityLump(const char *data)
        int i, j, k;
        if (!data)
                return;
-       if (!COM_ParseToken(&data, false))
+       if (!COM_ParseTokenConsole(&data))
                return; // error
        if (com_token[0] != '{')
                return; // error
        while (1)
        {
-               if (!COM_ParseToken(&data, false))
+               if (!COM_ParseTokenConsole(&data))
                        return; // error
                if (com_token[0] == '}')
                        break; // end of worldspawn
@@ -1655,7 +1655,7 @@ static void Mod_Q1BSP_ParseWadsFromEntityLump(const char *data)
                        strcpy(key, com_token);
                while (key[strlen(key)-1] == ' ') // remove trailing spaces
                        key[strlen(key)-1] = 0;
-               if (!COM_ParseToken(&data, false))
+               if (!COM_ParseTokenConsole(&data))
                        return; // error
                dpsnprintf(value, sizeof(value), "%s", com_token);
                if (!strcmp("wad", key)) // for HalfLife maps
@@ -2503,12 +2503,12 @@ static void Mod_Q1BSP_LoadMapBrushes(void)
        if (!maptext)
                return;
        text = maptext;
-       if (!COM_ParseToken(&data, false))
+       if (!COM_ParseTokenConsole(&data))
                return; // error
        submodel = 0;
        for (;;)
        {
-               if (!COM_ParseToken(&data, false))
+               if (!COM_ParseTokenConsole(&data))
                        break;
                if (com_token[0] != '{')
                        return; // error
@@ -2519,7 +2519,7 @@ static void Mod_Q1BSP_LoadMapBrushes(void)
                brushes = Mem_Alloc(loadmodel->mempool, maxbrushes * sizeof(mbrush_t));
                for (;;)
                {
-                       if (!COM_ParseToken(&data, false))
+                       if (!COM_ParseTokenConsole(&data))
                                return; // error
                        if (com_token[0] == '}')
                                break; // end of entity
@@ -2543,7 +2543,7 @@ static void Mod_Q1BSP_LoadMapBrushes(void)
                                }
                                for (;;)
                                {
-                                       if (!COM_ParseToken(&data, false))
+                                       if (!COM_ParseTokenConsole(&data))
                                                return; // error
                                        if (com_token[0] == '}')
                                                break; // end of brush
@@ -2552,25 +2552,25 @@ static void Mod_Q1BSP_LoadMapBrushes(void)
                                        // FIXME: support hl .map format
                                        for (pointnum = 0;pointnum < 3;pointnum++)
                                        {
-                                               COM_ParseToken(&data, false);
+                                               COM_ParseTokenConsole(&data);
                                                for (componentnum = 0;componentnum < 3;componentnum++)
                                                {
-                                                       COM_ParseToken(&data, false);
+                                                       COM_ParseTokenConsole(&data);
                                                        point[pointnum][componentnum] = atof(com_token);
                                                }
-                                               COM_ParseToken(&data, false);
+                                               COM_ParseTokenConsole(&data);
                                        }
-                                       COM_ParseToken(&data, false);
+                                       COM_ParseTokenConsole(&data);
                                        strlcpy(facetexture, com_token, sizeof(facetexture));
-                                       COM_ParseToken(&data, false);
+                                       COM_ParseTokenConsole(&data);
                                        //scroll_s = atof(com_token);
-                                       COM_ParseToken(&data, false);
+                                       COM_ParseTokenConsole(&data);
                                        //scroll_t = atof(com_token);
-                                       COM_ParseToken(&data, false);
+                                       COM_ParseTokenConsole(&data);
                                        //rotate = atof(com_token);
-                                       COM_ParseToken(&data, false);
+                                       COM_ParseTokenConsole(&data);
                                        //scale_s = atof(com_token);
-                                       COM_ParseToken(&data, false);
+                                       COM_ParseTokenConsole(&data);
                                        //scale_t = atof(com_token);
                                        TriangleNormal(point[0], point[1], point[2], planenormal);
                                        VectorNormalizeDouble(planenormal);
@@ -3908,11 +3908,11 @@ static void Mod_Q3BSP_LoadEntities(lump_t *l)
        memcpy(loadmodel->brush.entities, mod_base + l->fileofs, l->filelen);
        data = loadmodel->brush.entities;
        // some Q3 maps override the lightgrid_cellsize with a worldspawn key
-       if (data && COM_ParseToken(&data, false) && com_token[0] == '{')
+       if (data && COM_ParseTokenConsole(&data) && com_token[0] == '{')
        {
                while (1)
                {
-                       if (!COM_ParseToken(&data, false))
+                       if (!COM_ParseTokenConsole(&data))
                                break; // error
                        if (com_token[0] == '}')
                                break; // end of worldspawn
@@ -3922,7 +3922,7 @@ static void Mod_Q3BSP_LoadEntities(lump_t *l)
                                strcpy(key, com_token);
                        while (key[strlen(key)-1] == ' ') // remove trailing spaces
                                key[strlen(key)-1] = 0;
-                       if (!COM_ParseToken(&data, false))
+                       if (!COM_ParseTokenConsole(&data))
                                break; // error
                        strcpy(value, com_token);
                        if (!strcmp("gridsize", key))
@@ -4309,7 +4309,7 @@ static void Mod_Q3BSP_LoadTextures(lump_t *l)
                                        dpsnprintf(loadmodel->brush.skybox, sizeof(loadmodel->brush.skybox), "%s_", shader->skyboxname);
                                }
                        }
-                       else if ((shader->surfaceparms & Q3SURFACEPARM_NODRAW) || shader->numlayers == 0)
+                       else if ((out->surfaceflags & Q3SURFACEFLAG_NODRAW) || shader->numlayers == 0)
                                out->basematerialflags |= MATERIALFLAG_NODRAW;
                        else if (shader->surfaceparms & Q3SURFACEPARM_LAVA)
                                out->basematerialflags |= MATERIALFLAG_WATER | MATERIALFLAG_FULLBRIGHT;