r5259 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Dec 18 02:48:05 EST 2008
Author: div0
Date: 2008-12-18 02:48:05 -0500 (Thu, 18 Dec 2008)
New Revision: 5259
Modified:
trunk/data/qcsrc/server/cl_weaponsystem.qc
Log:
now the weapon icon showing REALLY works
Modified: trunk/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weaponsystem.qc 2008-12-18 07:39:10 UTC (rev 5258)
+++ trunk/data/qcsrc/server/cl_weaponsystem.qc 2008-12-18 07:48:05 UTC (rev 5259)
@@ -373,11 +373,18 @@
self.exteriorweaponentity.nextthink = time;
};
+.float hasweapon_complain_spam;
+
float client_hasweapon(entity cl, float wpn, float andammo, float complain)
{
local float weaponbit, f;
local entity oldself;
+ if(time < self.hasweapon_complain_spam)
+ complain = 0;
+ if(complain)
+ self.hasweapon_complain_spam = time + 0.2;
+
if (wpn < WEP_FIRST || wpn > WEP_LAST)
{
if (complain)
@@ -421,6 +428,11 @@
if(cvar("g_showweaponspawns"))
{
entity e;
+ string s;
+
+ e = get_weaponinfo(wpn);
+ s = e.model2;
+
for(e = world; (e = findfloat(e, weapons, weaponbit)); )
{
if(e.classname == "droppedweapon")
@@ -428,7 +440,7 @@
if not(e.flags & FL_ITEM)
continue;
WaypointSprite_Spawn(
- e.model2,
+ s,
1, 0,
world, e.origin,
self, 0,
More information about the nexuiz-commits
mailing list