+ if(sf & 2)
+ {
+ WriteCoord(MSG_ENTITY, self.hook_start_x);
+ WriteCoord(MSG_ENTITY, self.hook_start_y);
+ WriteCoord(MSG_ENTITY, self.hook_start_z);
+ }
+ if(sf & 4)
+ {
+ WriteCoord(MSG_ENTITY, self.hook_end_x);
+ WriteCoord(MSG_ENTITY, self.hook_end_y);
+ WriteCoord(MSG_ENTITY, self.hook_end_z);
+ }
+ return TRUE;
+}
+.entity gauntletbeam;
+.float prevgauntletfire;
+void gauntletbeam_think()
+{
+ float damage, myforce, myradius;
+ damage = autocvar_g_balance_laser_secondary_damage;
+ myforce = autocvar_g_balance_laser_secondary_force;
+ myradius = autocvar_g_balance_laser_secondary_radius;
+
+ self.owner.prevgauntletfire = time;
+ if (self.owner.weaponentity.state != WS_INUSE || self != self.owner.gauntletbeam || self.owner.deadflag != DEAD_NO || !self.owner.BUTTON_ATCK2)
+ {
+ remove(self);
+ return;
+ }
+
+ self.nextthink = time;
+
+ makevectors(self.owner.v_angle);
+
+ float dt;
+ dt = frametime;
+
+ W_SetupShot_Range(self.owner, TRUE, 0, "", 0, damage * dt, myradius);
+ WarpZone_traceline_antilag(self.owner, w_shotorg, w_shotend, MOVE_NORMAL, self.owner, ANTILAG_LATENCY(self.owner));
+
+ // apply the damage
+ if(trace_ent)
+ {
+ vector force;
+ force = w_shotdir * myforce;
+ if(accuracy_isgooddamage(self.owner, trace_ent))
+ accuracy_add(self.owner, WEP_LASER, 0, damage * dt);
+ Damage (trace_ent, self.owner, self.owner, damage * dt, WEP_LASER | HITTYPE_SECONDARY, trace_endpos, force * dt);
+ }
+
+ // draw effect
+ if(w_shotorg != self.hook_start)
+ {
+ self.SendFlags |= 2;
+ self.hook_start = w_shotorg;
+ }
+ if(w_shotend != self.hook_end)
+ {
+ self.SendFlags |= 4;
+ self.hook_end = w_shotend;
+ }
+}
+
+// experimental gauntlet
+void W_Laser_Attack2 ()
+{
+ // only play fire sound if 0.5 sec has passed since player let go the fire button
+ if(time - self.prevgauntletfire > 0.5)