From: Rudolf Polzer Date: Thu, 8 Mar 2012 12:54:43 +0000 (+0100) Subject: allow model entities to be ODE objects if ODE is active and geomtype is set; this... X-Git-Tag: xonotic-v0.6.0~1 X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=854cb134f90cd70f98b38bf04418074ce412895b 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. --- diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index aba9954872..a7959af467 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 befdb9bcc4..43dc25ff79 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; \