From 854cb134f90cd70f98b38bf04418074ce412895b Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 8 Mar 2012 13:54:43 +0100 Subject: [PATCH] allow model entities to be ODE objects if ODE is active and geomtype is set; this then overrides movetype. This allows fallback to regular movetypes if ODE is missing. --- qcsrc/server/autocvars.qh | 1 + qcsrc/server/g_models.qc | 2 ++ 2 files changed, 3 insertions(+) diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index aba995487..a7959af46 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -1214,3 +1214,4 @@ float autocvar_g_sandbox_object_scale_max; float autocvar_g_sandbox_object_material_velocity_min; float autocvar_g_sandbox_object_material_velocity_factor; float autocvar_g_max_info_autoscreenshot; +float autocvar_physics_ode; diff --git a/qcsrc/server/g_models.qc b/qcsrc/server/g_models.qc index befdb9bcc..43dc25ff7 100644 --- a/qcsrc/server/g_models.qc +++ b/qcsrc/server/g_models.qc @@ -128,6 +128,7 @@ float g_clientmodel_genericsendentity (entity to, float sf) #define G_MODEL_INIT(sol) \ + if(self.geomtype) if(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) self.movetype = MOVETYPE_PHYSICS; \ if(!self.scale) self.scale = self.modelscale; \ SetBrushEntityModel(); \ self.use = g_model_setcolormaptoactivator; \ @@ -135,6 +136,7 @@ float g_clientmodel_genericsendentity (entity to, float sf) if(!self.solid) self.solid = (sol); else if(self.solid < 0) self.solid = SOLID_NOT; #define G_CLIENTMODEL_INIT(sol) \ + if(self.geomtype) if(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) self.movetype = MOVETYPE_PHYSICS; \ if(!self.scale) self.scale = self.modelscale; \ SetBrushEntityModel(); \ self.use = g_clientmodel_setcolormaptoactivator; \ -- 2.39.2