[nexuiz-commits] r8379 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Dec 7 09:18:34 EST 2009
Author: fruitiex
Date: 2009-12-07 09:18:34 -0500 (Mon, 07 Dec 2009)
New Revision: 8379
Modified:
trunk/data/qcsrc/server/t_quake3.qc
Log:
fix a bug in target_give by using InitializeEntity
Modified: trunk/data/qcsrc/server/t_quake3.qc
===================================================================
--- trunk/data/qcsrc/server/t_quake3.qc 2009-12-06 19:37:53 UTC (rev 8378)
+++ trunk/data/qcsrc/server/t_quake3.qc 2009-12-07 14:18:34 UTC (rev 8379)
@@ -48,7 +48,7 @@
}
// weapon give ent from defrag
-void spawnfunc_target_give()
+void target_give_init()
{
entity targ;
for (targ = world; (targ = find(targ, targetname, self.target)); ) {
@@ -56,30 +56,30 @@
self.ammo_rockets += targ.count * cvar("g_balance_rocketlauncher_ammo");
self.netname = "rocketlauncher";
}
- if (targ.classname == "weapon_plasmagun") {
+ else if (targ.classname == "weapon_plasmagun") {
self.ammo_rockets += targ.count * cvar("g_balance_hagar_primary_ammo");
if(self.netname == "")
self.netname = "hagar";
else
self.netname = strcat(self.netname, " hagar");
}
- if (targ.classname == "weapon_bfg") {
+ else if (targ.classname == "weapon_bfg") {
self.ammo_cells += targ.count * cvar("g_balance_crylink_primary_ammo");
if(self.netname == "")
self.netname = "crylink";
else
self.netname = strcat(self.netname, " crylink");
}
- if (targ.classname == "weapon_grenadelauncher") {
+ else if (targ.classname == "weapon_grenadelauncher") {
self.ammo_rockets += targ.count * cvar("g_balance_grenadelauncher_primary_ammo");
if(self.netname == "")
self.netname = "grenadelauncher";
else
self.netname = strcat(self.netname, " grenadelauncher");
}
- if (targ.classname == "item_armor_body")
+ else if (targ.classname == "item_armor_body")
self.armorvalue = 100;
- if (targ.classname == "item_health_mega")
+ else if (targ.classname == "item_health_mega")
self.health = 200;
remove(targ);
}
@@ -87,6 +87,11 @@
spawnfunc_target_items();
}
+void spawnfunc_target_give()
+{
+ InitializeEntity(self, target_give_init, INITPRIO_FINDTARGET);
+}
+
//void spawnfunc_item_flight() /* not supported */
//void spawnfunc_item_haste() /* not supported */
//void spawnfunc_item_health() /* handled in t_quake.qc */
More information about the nexuiz-commits
mailing list