From: TimePath Date: Sat, 26 Sep 2015 01:31:10 +0000 (+1000) Subject: Fix overkill superweapon waypoints X-Git-Tag: xonotic-v0.8.2~1915 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4fd4f693e6f21ac27beb4439bc2892f238e1b746;p=xonotic%2Fxonotic-data.pk3dir.git Fix overkill superweapon waypoints Closes #1553 --- diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index 0fbbf2732..408bc4388 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -472,15 +472,24 @@ void Item_RespawnCountdown (void) if(self.count == 1) { MUTATOR_CALLHOOK(Item_RespawnCountdown, string_null, '0 0 0'); - int wpextra = 0; - entity e = self.itemdef; - if (e) wpextra = e.m_id; - if (self.flags & FL_WEAPON) { - entity wi = get_weaponinfo(self.weapon); - if (wi) wpextra = wi.m_id; - } - entity wp = WaypointSprite_Spawn(WP_Item, 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, true, RADARICON_POWERUP); - wp.wp_extra = wpextra; + do { + { + entity wi = get_weaponinfo(self.weapon); + if (wi.m_id) { + entity wp = WaypointSprite_Spawn(WP_Weapon, 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, true, RADARICON_POWERUP); + wp.wp_extra = wi.m_id; + break; + } + } + { + entity ii = self.itemdef; + if (ii.m_id) { + entity wp = WaypointSprite_Spawn(WP_Item, 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, true, RADARICON_POWERUP); + wp.wp_extra = ii.m_id; + break; + } + } + } while (0); if(self.waypointsprite_attached) { GameItem def = self.itemdef;