set sv_foginterval 1 "force enable fog in regular intervals"
-set physics_ode_droppedweapon 1 "use ODE physics instead of simple physics for dropped weapons, requires physics_ode to be enabled"
-set physics_ode_droppedweapon_damageforcescale 3 "how affected physical weapons are by damage"
+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"
// 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_physics_ode_droppedweapon;
-float autocvar_physics_ode_droppedweapon_damageforcescale;
+float autocvar_g_ode_weapons;
+float autocvar_g_ode_weapons_damageforcescale;
wep.pickup_anyway = TRUE; // these are ALWAYS pickable
// make the dropped weapon physical
- if(autocvar_physics_ode && autocvar_physics_ode_droppedweapon)
+ /*if(autocvar_physics_ode && autocvar_physics_ode_droppedweapon)
{
entity wep2;
wep2 = spawn();
wep.effects |= EF_NOMODELFLAGS; // disable the spinning
wep.movetype = MOVETYPE_FOLLOW;
wep.aiment = wep2;
- }
+ }*/
return s;
}
MUTATOR_ADD(mutator_vampire);
if(cvar("g_spawn_near_teammate"))
MUTATOR_ADD(mutator_spawn_near_teammate);
+ if(cvar("g_ode_weapons"))
+ MUTATOR_ADD(mutator_physical_weapons);
// is this a mutator? is this a mode?
if(cvar("g_sandbox"))
MUTATOR_HOOKABLE(SetModname);
// OUT
string modname; // name of the mutator/mod if it warrants showing as such in the server browser
+
+MUTATOR_HOOKABLE(Item_Spawn);
+ // called for each item being spawned on a map, including dropped weapons
+ // return 1 to remove an item
+ // INPUT
+ entity self; // the item
--- /dev/null
+MUTATOR_HOOKFUNCTION(item_spawning)
+{
+ dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
+
+ return 0;
+}
+
+MUTATOR_DEFINITION(mutator_physical_weapons)
+{
+ MUTATOR_HOOK(Item_Spawn, item_spawning, CBC_ORDER_ANY);
+
+ return 0;
+}
MUTATOR_DECLARATION(mutator_vampire);
MUTATOR_DECLARATION(mutator_spawn_near_teammate);
MUTATOR_DECLARATION(mutator_spawn_near_teammate);
+MUTATOR_DECLARATION(mutator_physical_weapons);
MUTATOR_DECLARATION(sandbox);
mutators/mutator_rocketflying.qc
mutators/mutator_vampire.qc
mutators/mutator_spawn_near_teammate.qc
+mutators/mutator_physical_weapons.qc
mutators/sandbox.qc
../warpzonelib/anglestransform.qc
self.weapons = weaponid;
self.flags = FL_ITEM | itemflags;
+ if(MUTATOR_CALLHOOK(Item_Spawn))
+ {
+ startitem_failed = TRUE;
+ remove(self);
+ return;
+ }
+
// is it a dropped weapon?
if (self.classname == "droppedweapon")
{