]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix checkextension based ODE detection for QC code
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 8 Mar 2012 14:01:06 +0000 (14:01 +0000)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 9 Mar 2012 19:00:33 +0000 (20:00 +0100)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11744 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=cac5110c0039ca108a000feeb32771979100a3e9

prvm_cmds.c
world.c
world.h

index 15a5e4c0fad03b63a0f2cd95a1a6438a7c52d090..1cb405874b2d7469a302b77e0de9ee72011e853b 100644 (file)
@@ -277,10 +277,14 @@ static qboolean checkextension(prvm_prog_t *prog, const char *name)
                        // special sheck for ODE
                        if (!strncasecmp("DP_PHYSICS_ODE", name, 14))
                        {
-#ifdef USEODE
+#ifdef ODE_DYNAMIC
                                return ode_dll ? true : false;
+#else
+#ifdef ODE_STATIC
+                               return true;
 #else
                                return false;
+#endif
 #endif
                        }
 
diff --git a/world.c b/world.c
index 29a11b4b780b434d4157ff4a3de24339d69e01a8..0becd8a8ddd59645fcda6ae944b38e33c934a235 100644 (file)
--- a/world.c
+++ b/world.c
@@ -327,14 +327,6 @@ void World_LinkEdict(world_t *world, prvm_edict_t *ent, const vec3_t mins, const
 // physics engine support
 //============================================================================
 
-#ifndef ODE_STATIC
-# define ODE_DYNAMIC 1
-#endif
-
-#if defined(ODE_STATIC) || defined(ODE_DYNAMIC)
-#define USEODE 1
-#endif
-
 #ifdef USEODE
 cvar_t physics_ode_quadtree_depth = {0, "physics_ode_quadtree_depth","5", "desired subdivision level of quadtree culling space"};
 cvar_t physics_ode_allowconvex = {0, "physics_ode_allowconvex", "0", "allow usage of Convex Hull primitive type on trimeshes that have custom 'collisionconvex' mesh. If disabled, trimesh primitive type are used."};
diff --git a/world.h b/world.h
index e43ebd142c6ffc99f7fcfa01a5badb0baa86966d..18e9b00155b1bac6dec53d99449c2de3974c4ae8 100644 (file)
--- a/world.h
+++ b/world.h
@@ -119,6 +119,15 @@ int World_EntitiesInBox(world_t *world, const vec3_t mins, const vec3_t maxs, in
 void World_Start(world_t *world);
 void World_End(world_t *world);
 
+// physics macros
+#ifndef ODE_STATIC
+# define ODE_DYNAMIC 1
+#endif
+
+#if defined(ODE_STATIC) || defined(ODE_DYNAMIC)
+# define USEODE 1
+#endif
+
 // update physics
 // this is called by SV_Physics
 void World_Physics_Frame(world_t *world, double frametime, double gravity);