]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/physical_items/physical_items.qc
Propagate this
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / physical_items / physical_items.qc
index 6fbe77bce4443ad9f639d2e5ba93f53da5ddf82b..aaad9d47be599b59c91a7c879014d0deb8dc6535 100644 (file)
@@ -78,13 +78,13 @@ void physical_item_touch()
        }
 }
 
-void physical_item_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
-{SELFPARAM();
-       if(!self.cnt) // not for dropped items
+void physical_item_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+{
+       if(!this.cnt) // not for dropped items
        if(ITEM_DAMAGE_NEEDKILL(deathtype))
        {
-               setorigin(self, self.spawn_origin);
-               self.angles = self.spawn_angles;
+               setorigin(this, this.spawn_origin);
+               this.angles = this.spawn_angles;
        }
 }
 
@@ -127,7 +127,7 @@ MUTATOR_HOOKFUNCTION(physical_items, Item_Spawn)
                setorigin(wep, wep.origin + '0 0 1');
                entity oldself;
                oldself = self;
-               WITH(entity, self, wep, builtin_droptofloor());
+               WITHSELF(wep, builtin_droptofloor());
        }
 
        wep.spawn_origin = wep.origin;
@@ -136,7 +136,7 @@ MUTATOR_HOOKFUNCTION(physical_items, Item_Spawn)
        self.effects |= EF_NODRAW; // hide the original weapon
        self.movetype = MOVETYPE_FOLLOW;
        self.aiment = wep; // attach the original weapon
-       self.SendEntity = func_null;
+       self.SendEntity3 = func_null;
 
        return false;
 }