r3034 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Dec 18 08:33:26 EST 2007
Author: div0
Date: 2007-12-18 08:33:25 -0500 (Tue, 18 Dec 2007)
New Revision: 3034
Modified:
trunk/data/qcsrc/server/cl_weaponsystem.qc
Log:
also support "tag_weapon" for attaching the exterior weapon model
Modified: trunk/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weaponsystem.qc 2007-12-17 18:15:59 UTC (rev 3033)
+++ trunk/data/qcsrc/server/cl_weaponsystem.qc 2007-12-18 13:33:25 UTC (rev 3034)
@@ -197,6 +197,7 @@
void() CL_ExteriorWeaponentity_Think =
{
+ float tag_found;
self.nextthink = time;
if (self.owner.exteriorweaponentity != self)
{
@@ -217,7 +218,15 @@
setmodel(self, strcat("models/weapons/v_", self.owner.weaponname, ".md3")); // precision set below
else
self.model = "";
- setattachment(self, self.owner, "bip01 r hand");
+
+ if((tag_found = gettagindex(self.owner, "tag_weapon")))
+ {
+ self.tag_index = tag_found;
+ self.tag_entity = self.owner;
+ }
+ else
+ setattachment(self, self.owner, "bip01 r hand");
+
// if that didn't find a tag, hide the exterior weapon model
if (!self.tag_index)
self.model = "";
More information about the nexuiz-commits
mailing list