]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'z411/powerups_drop' into 'master'
authorLegendaryGuard <rootuser999@gmail.com>
Thu, 6 Oct 2022 07:57:22 +0000 (07:57 +0000)
committerLegendaryGuard <rootuser999@gmail.com>
Thu, 6 Oct 2022 07:57:22 +0000 (07:57 +0000)
Use Mario's RemoveItem function to remove powerup when expired

See merge request xonotic/xonotic-data.pk3dir!1080

qcsrc/common/mutators/mutator/powerups/sv_powerups.qc

index ef9aa3acb8c3f22d7fbc5f6138e2de698f4e7c2c..33a3d16836e2b37507a162db3702b0becdd0e422 100644 (file)
@@ -82,8 +82,7 @@ void powerups_DropItem_Think(entity this)
        TakeResource(this, RES_HEALTH, 1);
        
        if(GetResource(this, RES_HEALTH) < 1) {
-               WaypointSprite_Kill(this.waypointsprite_attached);
-               delete(this);
+               RemoveItem(this);
                return;
        }