]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - pr_cmds.c
q3bsp is still not working yet, but getting closer
[xonotic/darkplaces.git] / pr_cmds.c
index 0f801f8a4e6f6afd8ea26343ed5b957408b9f160..faf7b1762fde70aed4bcd40ddfb6d1c00888d03b 100644 (file)
--- a/pr_cmds.c
+++ b/pr_cmds.c
@@ -2542,8 +2542,6 @@ static msurface_t *getsurface(edict_t *ed, int surfnum)
        if (modelindex < 1 || modelindex >= MAX_MODELS)
                return NULL;
        model = sv.models[modelindex];
-       if (model->type != mod_brush)
-               return NULL;
        if (surfnum < 0 || surfnum >= model->brushq1.nummodelsurfaces)
                return NULL;
        return model->brushq1.surfaces + surfnum + model->brushq1.firstmodelsurface;
@@ -2623,7 +2621,7 @@ void PF_getsurfacenearpoint(void)
        if (modelindex < 1 || modelindex >= MAX_MODELS)
                return;
        model = sv.models[modelindex];
-       if (model->type != mod_brush)
+       if (!model->brushq1.numsurfaces)
                return;
 
        // FIXME: implement rotation/scaling