set sv_foginterval 1 "force enable fog in regular intervals"
-set g_ode_weapons 1 "use ODE physics instead of simple physics for dropped weapons, requires physics_ode to be enabled"
-set g_ode_weapons_damageforcescale 3 "how affected physical weapons are by damage"
+set g_ode_items 2 "1 uses ODE physics for dropped weapons, 2 for all items, requires physics_ode to be enabled"
+set g_ode_items_damageforcescale 3 "how affected physical weapons are by damage"
// Audio track names (for old-style "cd loop NUMBER" usage)
set _cdtrack_first "1"
float autocvar_g_sandbox_object_material_velocity_factor;
float autocvar_g_max_info_autoscreenshot;
float autocvar_physics_ode;
-float autocvar_g_ode_weapons;
-float autocvar_g_ode_weapons_damageforcescale;
+float autocvar_g_ode_items;
+float autocvar_g_ode_items_damageforcescale;
MUTATOR_ADD(mutator_vampire);
if(cvar("g_spawn_near_teammate"))
MUTATOR_ADD(mutator_spawn_near_teammate);
- if(cvar("g_ode_weapons"))
+ if(cvar("g_ode_items"))
MUTATOR_ADD(mutator_physical_weapons);
// is this a mutator? is this a mode?
MUTATOR_HOOKFUNCTION(item_spawning)
{
- if(!autocvar_physics_ode)
- return FALSE;
- if(self.classname != "droppedweapon")
+ if(self.classname != "droppedweapon" && autocvar_g_ode_items <= 1)
return FALSE;
// make the dropped weapon physical
wep.solid = SOLID_CORPSE;
wep.movetype = MOVETYPE_PHYSICS;
wep.takedamage = DAMAGE_AIM;
- wep.damageforcescale = autocvar_g_ode_weapons_damageforcescale;
+ wep.damageforcescale = autocvar_g_ode_items_damageforcescale;
wep.think = thrown_wep_ode_think;
wep.nextthink = time;
MUTATOR_DEFINITION(mutator_physical_weapons)
{
+ if(!autocvar_physics_ode)
+ return FALSE;
+
MUTATOR_HOOK(Item_Spawn, item_spawning, CBC_ORDER_ANY);
return FALSE;