]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Possibly fix issue with old weapon names and target_items
authorMario <zacjardine@y7mail.com>
Sat, 31 Jan 2015 02:40:58 +0000 (13:40 +1100)
committerMario <zacjardine@y7mail.com>
Sat, 31 Jan 2015 02:40:58 +0000 (13:40 +1100)
qcsrc/server/t_items.qc

index 4455d3fb46a3128ecf541c8d4558286341eb8a4e..d4af7e3fd59bf0e61af5d867e848be6381f6cd83 100644 (file)
@@ -1315,6 +1315,7 @@ void spawnfunc_target_items (void)
 {
        float n, i, j;
        entity e;
+       string s;
 
        self.use = target_items_use;
        if(!self.strength_finished)
@@ -1353,7 +1354,8 @@ void spawnfunc_target_items (void)
                                for(j = WEP_FIRST; j <= WEP_LAST; ++j)
                                {
                                        e = get_weaponinfo(j);
-                                       if(argv(i) == e.netname)
+                                       s = W_UndeprecateName(argv(i));
+                                       if(s == e.netname)
                                        {
                                                self.weapons |= WepSet_FromWeapon(j);
                                                if(self.spawnflags == 0 || self.spawnflags == 2)