From: Mircea Kitsune Date: Wed, 4 Apr 2012 19:22:08 +0000 (+0300) Subject: Properly detect if the item is dropped or not. If some mod ever happens to allow... X-Git-Tag: xonotic-v0.7.0~111^2~8 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fd2b4bf81c805552031942baa7ab64c97dce5543;p=xonotic%2Fxonotic-data.pk3dir.git Properly detect if the item is dropped or not. If some mod ever happens to allow dropping other items, this should automatically work now --- diff --git a/qcsrc/server/mutators/mutator_physical_weapons.qc b/qcsrc/server/mutators/mutator_physical_weapons.qc index 71d2f753d4..3bf1c53596 100644 --- a/qcsrc/server/mutators/mutator_physical_weapons.qc +++ b/qcsrc/server/mutators/mutator_physical_weapons.qc @@ -47,7 +47,7 @@ void thrown_wep_ode_touch() MUTATOR_HOOKFUNCTION(item_spawning) { - if(self.classname != "droppedweapon" && autocvar_g_ode_items <= 1) + if(self.owner == world && autocvar_g_ode_items <= 1) return FALSE; if (self.spawnflags & 1) // floating item return FALSE; @@ -71,7 +71,7 @@ MUTATOR_HOOKFUNCTION(item_spawning) wep.glowmod = self.owner.glowmod; wep.damageforcescale = autocvar_g_ode_items_damageforcescale; wep.dphitcontentsmask = self.dphitcontentsmask; - wep.cnt = (self.classname == "droppedweapon"); + wep.cnt = (self.owner != world); wep.think = thrown_wep_ode_think; wep.nextthink = time;