]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - pr_cmds.c
the merging of alias and bsp model rendering begins... purely cosmetic changes in...
[xonotic/darkplaces.git] / pr_cmds.c
index b1be56e378c0be173ff324029b887a4f010fc61e..19643ea05b93c44ebca965fea2722ca7c241df59 100644 (file)
--- a/pr_cmds.c
+++ b/pr_cmds.c
@@ -2658,7 +2658,7 @@ static msurface_t *getsurface(edict_t *ed, int surfacenum)
        model = sv.models[modelindex];
        if (surfacenum < 0 || surfacenum >= model->nummodelsurfaces)
                return NULL;
-       return model->brush.data_surfaces + surfacenum + model->firstmodelsurface;
+       return model->data_surfaces + surfacenum + model->firstmodelsurface;
 }
 
 
@@ -2740,7 +2740,7 @@ void PF_getsurfacenearpoint(void)
        if (modelindex < 1 || modelindex >= MAX_MODELS)
                return;
        model = sv.models[modelindex];
-       if (!model->brush.num_surfaces)
+       if (!model->num_surfaces)
                return;
 
        // FIXME: implement rotation/scaling
@@ -2749,7 +2749,7 @@ void PF_getsurfacenearpoint(void)
        bestdist = 1000000000;
        for (surfacenum = 0;surfacenum < model->nummodelsurfaces;surfacenum++)
        {
-               surface = model->brush.data_surfaces + surfacenum + model->firstmodelsurface;
+               surface = model->data_surfaces + surfacenum + model->firstmodelsurface;
                // first see if the nearest point on the surface's box is closer than the previous match
                clipped[0] = bound(surface->mins[0], p[0], surface->maxs[0]) - p[0];
                clipped[1] = bound(surface->mins[1], p[1], surface->maxs[1]) - p[1];