1 // a laser goes from origin in direction velocity
2 // it has color 'colormod'
3 // and stops when something is in the way
4 .float cnt; // end effect
9 traceline(self.origin, self.origin + self.velocity, 0, self);
10 Draw_CylindricLine(self.origin, trace_endpos, 4, "", 1, self.colormod, DRAWFLAG_ADDITIVE); // TODO make a texture to make the laser look smoother
11 pointparticles(self.cnt, trace_endpos, trace_plane_normal, 256 * drawframetime);
17 // 30 bytes, or 13 bytes for just moving
21 self.origin_x = ReadCoord();
22 self.origin_y = ReadCoord();
23 self.origin_z = ReadCoord();
24 self.colormod_x = ReadByte() / 255.0;
25 self.colormod_y = ReadByte() / 255.0;
26 self.colormod_z = ReadByte() / 255.0;
27 self.cnt = ReadShort(); // effect number
31 self.velocity_x = ReadCoord();
32 self.velocity_y = ReadCoord();
33 self.velocity_z = ReadCoord();
35 self.draw = Draw_Laser;