]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix netname field of weapon and item entities (was getting set to m_name)
authorbones_was_here <bones_was_here@xa.org.au>
Wed, 26 Aug 2020 02:23:25 +0000 (12:23 +1000)
committerbones_was_here <bones_was_here@xa.org.au>
Wed, 26 Aug 2020 02:23:25 +0000 (12:23 +1000)
qcsrc/server/items/items.qc

index 861b21eed2b566df931eef6a382f4b848139ec7c..bec701e13a8146df0f017712bd9e148ee068c781 100644 (file)
@@ -1055,7 +1055,7 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default
        this.bot_pickupevalfunc = pickupevalfunc;
        this.bot_pickupbasevalue = pickupbasevalue;
        this.mdl = this.model ? this.model : strzone(this.item_model_ent.model_str());
-       this.netname = itemname;
+       this.netname = (def.m_weapon) ? def.m_weapon.netname : def.netname;
        settouch(this, Item_Touch);
        setmodel(this, MDL_Null); // precision set below
        //this.effects |= EF_LOWPRECISION;