]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - world.c
Replaced some model fields and changed their purpose slightly to simplify a lot of...
[xonotic/darkplaces.git] / world.c
diff --git a/world.c b/world.c
index 9a20fd72817d18feb8e056eccdf98d312d385673..42ed670d05665b3c6d4ee13de09e192fbb2e34c4 100644 (file)
--- a/world.c
+++ b/world.c
@@ -2290,9 +2290,9 @@ static void World_Physics_Frame_BodyFromEntity(world_t *world, prvm_edict_t *ed)
 
                        // check if trimesh can be defined with convex
                        convex_compatible = false;
-                       for (i = 0;i < model->nummodelsurfaces;i++)
+                       for (i = model->submodelsurfaces_start;i < model->submodelsurfaces_end;i++)
                        {
-                               if (!strcmp(((msurface_t *)(model->data_surfaces + model->firstmodelsurface + i))->texture->name, "collisionconvex"))
+                               if (!strcmp(model->data_surfaces[i].texture->name, "collisionconvex"))
                                {
                                        convex_compatible = true;
                                        break;