]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - world.c
Add/update license headers across various files
[xonotic/darkplaces.git] / world.c
diff --git a/world.c b/world.c
index 9a20fd72817d18feb8e056eccdf98d312d385673..26ffd9bbe57d4fd5365eb1b279364fc72b8a583f 100644 (file)
--- a/world.c
+++ b/world.c
@@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "quakedef.h"
 #include "clvm_cmds.h"
 #include "cl_collision.h"
+#include "com_list.h"
 
 /*
 
@@ -1522,7 +1523,7 @@ static void World_Physics_Init(void)
 
 #ifndef LINK_TO_LIBODE
        // Load the DLL
-       if (Sys_LoadLibrary (dllnames, &ode_dll, odefuncs))
+       if (Sys_LoadDependency (dllnames, &ode_dll, odefuncs))
 #endif
        {
                dInitODE();
@@ -1539,7 +1540,7 @@ static void World_Physics_Init(void)
 # else
                        Con_Printf("ODE library not compiled for double precision - incompatible!  Not using ODE physics.\n");
 # endif
-                       Sys_UnloadLibrary(&ode_dll);
+                       Sys_FreeLibrary(&ode_dll);
                        ode_dll = NULL;
                }
                else
@@ -1565,7 +1566,7 @@ static void World_Physics_Shutdown(void)
        {
                dCloseODE();
 #ifndef LINK_TO_LIBODE
-               Sys_UnloadLibrary(&ode_dll);
+               Sys_FreeLibrary(&ode_dll);
                ode_dll = NULL;
 #endif
        }
@@ -2290,9 +2291,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;