]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix target_give by retrieving netname from itemdef
authorbones_was_here <bones_was_here@xa.org.au>
Wed, 21 Jul 2021 07:59:25 +0000 (17:59 +1000)
committerbones_was_here <bones_was_here@xa.org.au>
Wed, 21 Jul 2021 07:59:25 +0000 (17:59 +1000)
qcsrc/server/compat/quake3.qc

index 11e41f86340a8dd080507c4553875c394ddd1b60..e65cbdba3118aff61bd128a967ac8f6ec72bdb5d 100644 (file)
@@ -230,7 +230,7 @@ void target_give_init(entity this)
                        else if (it.armorvalue)
                                this.armorvalue += it.armorvalue;
 
-                       this.netname = cons(this.netname, it.netname);
+                       this.netname = cons(this.netname, (it.itemdef.m_weapon) ? it.itemdef.m_weapon.netname : it.itemdef.netname);
                }
 
                //remove(it); // removing ents in init functions causes havoc, workaround: