]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Properly detect if the item is dropped or not. If some mod ever happens to allow...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 4 Apr 2012 19:22:08 +0000 (22:22 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 4 Apr 2012 19:22:08 +0000 (22:22 +0300)
qcsrc/server/mutators/mutator_physical_weapons.qc

index 71d2f753d4cd992f3e611519ada85672c33d7d64..3bf1c535961406adc5253350122e31fc21e4715d 100644 (file)
@@ -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;