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 4455d3f..d4af7e3 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)