From: Rudolf Polzer Date: Fri, 17 Dec 2010 17:53:59 +0000 (+0100) Subject: also allow overriding pickup sound by setting the item_pickupsound key X-Git-Tag: xonotic-v0.6.0~188^2~3^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2853aa9315226a1e8816ed8b792525d7e3420bc6;p=xonotic%2Fxonotic-data.pk3dir.git also allow overriding pickup sound by setting the item_pickupsound key --- diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index 166aad589..2ca9162f8 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -712,6 +712,11 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, return; } + if(self.model != "") + itemmodel = self.model; + if(self.item_pickupsound != "") + pickupsound = self.item_pickupsound; + self.reset = Item_Reset; // it's a level item if(self.spawnflags & 1) @@ -843,10 +848,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, self.bot_pickup = TRUE; self.bot_pickupevalfunc = pickupevalfunc; self.bot_pickupbasevalue = pickupbasevalue; - if(self.model == "") - self.mdl = itemmodel; - else - self.mdl = self.model; + self.mdl = itemmodel; self.item_pickupsound = pickupsound; // let mappers override respawntime if(!self.respawntime) // both set