// used in qcsrc/server/w_electro.qc: pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg, w_shotdir * 1000, 1)
// used in qcsrc/server/w_electro.qc: pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg, w_shotdir * 1000, 1)
effect electro_lightning
+countabsolute 1
+type decal
+tex 59 59
+size 16 16
+alpha 256 256 0
+originjitter 2 2 2
+lightradius 50
+lightradiusfade 200
+lightcolor 3.125 4.375 10
+effect electro_lightning
count 300
type spark
color 0x283880 0x283880 // 0x202020 0x404040
tex 65 65
-size 5 5
+size 3 3
alpha 256 256 1024
originjitter 1.5 1.5 1.5
velocityjitter 6 6 6
-sizeincrease 20
+sizeincrease 15
velocitymultiplier 2000
effect electro_lightning
count 30
.vector velocity;
.float HookSound;
.float HookSilent;
+.float HookRange;
void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float alpha, float drawflag)
{
void Draw_GrapplingHook()
{
- vector a, b;
+ vector a, b, atrans;
string tex, snd;
vector rgb;
float t;
break;
case ENT_CLIENT_LGBEAM:
case ENT_CLIENT_GAUNTLET:
- b = view_origin + view_forward * vlen(self.velocity - self.origin); // honor original length of beam!
+ if(self.HookRange)
+ b = view_origin + view_forward * self.HookRange;
+ else
+ b = view_origin + view_forward * vlen(self.velocity - self.origin); // honor original length of beam!
WarpZone_TraceLine(view_origin, b, MOVE_NORMAL, world);
b = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
a = view_origin + view_forward * vs_x + view_right * -vs_y + view_up * vs_z;
WarpZone_TraceBox_ThroughZone(a, '0 0 0', '0 0 0', b, ((self.HookType == ENT_CLIENT_HOOK) ? MOVE_NOTHING : MOVE_NORMAL), world, world, Draw_GrapplingHook_trace_callback);
Draw_GrapplingHook_trace_callback_tex = string_null;
+ atrans = WarpZone_TransformOrigin(WarpZone_trace_transform, a);
+
switch(self.HookType)
{
default:
case ENT_CLIENT_HOOK:
setorigin(self, trace_endpos); // hook endpoint!
- self.angles = vectoangles(trace_endpos - WarpZone_TransformOrigin(WarpZone_trace_transform, a));
+ self.angles = vectoangles(trace_endpos - atrans);
break;
case ENT_CLIENT_LGBEAM:
case ENT_CLIENT_GAUNTLET:
case ENT_CLIENT_HOOK:
break;
case ENT_CLIENT_LGBEAM:
- pointparticles(particleeffectnum("electro_lightning"), b, normalize(a - b), frametime);
+ pointparticles(particleeffectnum("electro_lightning"), trace_endpos, normalize(atrans - trace_endpos), frametime);
break;
case ENT_CLIENT_GAUNTLET:
break;
if(sf & 1)
{
self.owner = playerslots[ReadByte() - 1];
+ switch(self.HookType)
+ {
+ default:
+ case ENT_CLIENT_HOOK:
+ case ENT_CLIENT_GAUNTLET:
+ self.HookRange = 0;
+ break;
+ case ENT_CLIENT_LGBEAM:
+ self.HookRange = ReadCoord();
+ break;
+ }
}
if(sf & 2)
{