r4433 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Sep 9 06:53:07 EDT 2008


Author: div0
Date: 2008-09-09 06:53:06 -0400 (Tue, 09 Sep 2008)
New Revision: 4433

Modified:
   trunk/data/qcsrc/server/cl_weaponsystem.qc
Log:
force returning the dummy weapon info if the weapon number is out of range


Modified: trunk/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weaponsystem.qc	2008-09-09 07:35:42 UTC (rev 4432)
+++ trunk/data/qcsrc/server/cl_weaponsystem.qc	2008-09-09 10:53:06 UTC (rev 4433)
@@ -649,6 +649,8 @@
 entity get_weaponinfo(float id)
 {
 	entity w;
+	if(id < WEP_FIRST || id > WEP_LAST)
+		return dummy_weapon_info;
 	w = weapon_info[id - 1];
 	if(w)
 		return w;




More information about the nexuiz-commits mailing list