X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Flaser.qc;h=93c4103a9cd993ae2fdc7c45e050bd7e887ce2c3;hp=f6b3fc4cbe7894392a38fd455dacbe77d800a0dc;hb=9ae63d858415772fdb60bd549758825103c0ba17;hpb=bf20397b0c62c9de0335ef9d70d60842fde9d0b2 diff --git a/qcsrc/client/laser.qc b/qcsrc/client/laser.qc index f6b3fc4cbe..93c4103a9c 100644 --- a/qcsrc/client/laser.qc +++ b/qcsrc/client/laser.qc @@ -1,16 +1,27 @@ +#include "laser.qh" +#include "_all.qh" + +#include "hook.qh" + +#include "../common/buffs/all.qh" + +#include "../csqcmodellib/cl_model.qh" +#include "../csqcmodellib/interpolate.qh" + // a laser goes from origin in direction angles // it has color 'colormod' // and stops when something is in the way -.float cnt; // end effect -.vector colormod; -.float state; // on-off -.float count; // flags for the laser -.vector velocity; -.float alpha; -.float scale; // scaling factor of the thickness -.float modelscale; // scaling factor of the dlight +entityclass(Laser); +class(Laser) .int cnt; // end effect +class(Laser) .vector colormod; +class(Laser) .int state; // on-off +class(Laser) .int count; // flags for the laser +class(Laser) .vector velocity; +class(Laser) .float alpha; +class(Laser) .float scale; // scaling factor of the thickness +class(Laser) .float modelscale; // scaling factor of the dlight -void Draw_Laser() +void Draw_Laser(entity this) { if(!self.state) return; @@ -19,7 +30,7 @@ void Draw_Laser() { if(self.count & 0x10) { - trace_endpos = self.velocity, + trace_endpos = self.velocity; trace_dphitq3surfaceflags = 0; } else @@ -63,11 +74,10 @@ void Draw_Laser() void Ent_Laser() { - float f; InterpolateOrigin_Undo(); // 30 bytes, or 13 bytes for just moving - f = ReadByte(); + int f = ReadByte(); self.count = (f & 0xF0); if(self.count & 0x80)