r1888 - branches/nexuiz-2.0/data/qcsrc/server trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Sep 19 01:37:26 EDT 2006
Author: kadaverjack
Date: 2006-09-19 01:37:26 -0400 (Tue, 19 Sep 2006)
New Revision: 1888
Modified:
branches/nexuiz-2.0/data/qcsrc/server/ctf.qc
branches/nexuiz-2.0/data/qcsrc/server/w_uzi.qc
trunk/data/qcsrc/server/ctf.qc
trunk/data/qcsrc/server/w_uzi.qc
Log:
setattachment() for uzi muzzle flash... it's currently only visible for the 1st person view, in 3rd person it was way to small and the position was wrong. (perhaps that could be fixed with a second flash, attached to the exterior weapon model)
Modified: branches/nexuiz-2.0/data/qcsrc/server/ctf.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/ctf.qc 2006-09-19 01:35:31 UTC (rev 1887)
+++ branches/nexuiz-2.0/data/qcsrc/server/ctf.qc 2006-09-19 05:37:26 UTC (rev 1888)
@@ -125,8 +125,6 @@
void() FlagThink =
{
local entity e;
- local vector v;
- local float f;
self.nextthink = time + 0.1;
Modified: branches/nexuiz-2.0/data/qcsrc/server/w_uzi.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_uzi.qc 2006-09-19 01:35:31 UTC (rev 1887)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_uzi.qc 2006-09-19 05:37:26 UTC (rev 1888)
@@ -1,5 +1,7 @@
.float uzi_bulletcounter;
+float() FlashCustomize = { return other == self.owner; };
+
void W_Uzi_Attack (void)
{
local entity flash;
@@ -26,15 +28,18 @@
else
fireBullet (w_shotorg, w_shotdir, cvar("g_balance_uzi_sustained_spread"), cvar("g_balance_uzi_sustained_damage"), IT_UZI, (self.uzi_bulletcounter & 3) == 0);
- flash = spawn ();
- setorigin (flash, w_shotorg + v_forward * 17);
- setmodel (flash, "models/uziflash.md3");
- flash.angles = vectoangles (w_shotdir);
- flash.angles_z=flash.v_angle_z + random () * 180;
- flash.scale = 0.75;
+
+ flash = spawn();
+ setorigin(flash, '53 5 0');
+ setmodel(flash, "models/uziflash.md3");
+ setattachment(flash, self.weaponentity, "bone01");
+ flash.owner = self;
+ flash.customizeentityforclient = FlashCustomize;
+ flash.angles_z = flash.v_angle_z + random() * 180;
+ flash.scale = 1.2;
flash.alpha = 0.5;
- SUB_SetFade (flash, time, 0.2);
- flash.effects = flash.effects | EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
+ SUB_SetFade(flash, time, 0.2);
+ flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
// casing code
if (cvar("g_casings") >= 2)
Modified: trunk/data/qcsrc/server/ctf.qc
===================================================================
--- trunk/data/qcsrc/server/ctf.qc 2006-09-19 01:35:31 UTC (rev 1887)
+++ trunk/data/qcsrc/server/ctf.qc 2006-09-19 05:37:26 UTC (rev 1888)
@@ -125,8 +125,6 @@
void() FlagThink =
{
local entity e;
- local vector v;
- local float f;
self.nextthink = time + 0.1;
Modified: trunk/data/qcsrc/server/w_uzi.qc
===================================================================
--- trunk/data/qcsrc/server/w_uzi.qc 2006-09-19 01:35:31 UTC (rev 1887)
+++ trunk/data/qcsrc/server/w_uzi.qc 2006-09-19 05:37:26 UTC (rev 1888)
@@ -1,5 +1,7 @@
.float uzi_bulletcounter;
+float() FlashCustomize = { return other == self.owner; };
+
void W_Uzi_Attack (void)
{
local entity flash;
@@ -26,15 +28,18 @@
else
fireBullet (w_shotorg, w_shotdir, cvar("g_balance_uzi_sustained_spread"), cvar("g_balance_uzi_sustained_damage"), IT_UZI, (self.uzi_bulletcounter & 3) == 0);
- flash = spawn ();
- setorigin (flash, w_shotorg + v_forward * 17);
- setmodel (flash, "models/uziflash.md3");
- flash.angles = vectoangles (w_shotdir);
- flash.angles_z=flash.v_angle_z + random () * 180;
- flash.scale = 0.75;
+
+ flash = spawn();
+ setorigin(flash, '53 5 0');
+ setmodel(flash, "models/uziflash.md3");
+ setattachment(flash, self.weaponentity, "bone01");
+ flash.owner = self;
+ flash.customizeentityforclient = FlashCustomize;
+ flash.angles_z = flash.v_angle_z + random() * 180;
+ flash.scale = 1.2;
flash.alpha = 0.5;
- SUB_SetFade (flash, time, 0.2);
- flash.effects = flash.effects | EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
+ SUB_SetFade(flash, time, 0.2);
+ flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
// casing code
if (cvar("g_casings") >= 2)
More information about the nexuiz-commits
mailing list