[nexuiz-commits] r8567 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Jan 25 12:10:58 EST 2010
Author: div0
Date: 2010-01-25 12:10:50 -0500 (Mon, 25 Jan 2010)
New Revision: 8567
Modified:
trunk/data/qcsrc/server/t_items.qc
Log:
fix precaching
Modified: trunk/data/qcsrc/server/t_items.qc
===================================================================
--- trunk/data/qcsrc/server/t_items.qc 2010-01-25 17:10:19 UTC (rev 8566)
+++ trunk/data/qcsrc/server/t_items.qc 2010-01-25 17:10:50 UTC (rev 8567)
@@ -1381,22 +1381,6 @@
n = tokenize_console(self.netname);
if(argv(0) == "give")
{
- for(i = 0; i < n; ++i)
- {
- for(j = WEP_FIRST; j <= WEP_LAST; ++j)
- {
- e = get_weaponinfo(j);
- if(argv(i) == e.netname)
- {
- if(self.spawnflags == 0 || self.spawnflags == 2)
- weapon_action(e.weapon, WR_PRECACHE);
- break;
- }
- }
- if(j > WEP_LAST)
- print("target_items: invalid item ", argv(i), "\n");
- }
-
self.netname = substring(self.netname, argv_start_index(1), argv_end_index(-1) - argv_start_index(1));
}
else
@@ -1473,6 +1457,22 @@
}
self.netname = strzone(self.netname);
//print(self.netname, "\n");
+
+ n = tokenize(self.netname);
+ for(i = 0; i < n; ++i)
+ {
+ for(j = WEP_FIRST; j <= WEP_LAST; ++j)
+ {
+ e = get_weaponinfo(j);
+ if(argv(i) == e.netname)
+ {
+ weapon_action(e.weapon, WR_PRECACHE);
+ break;
+ }
+ }
+ if(j > WEP_LAST)
+ print("target_items: invalid item ", argv(i), "\n");
+ }
}
void spawnfunc_item_fuel(void)
More information about the nexuiz-commits
mailing list