12 void misc_laser_aim(
entity this)
19 if(this.
enemy.origin !=
this.mangle)
51 void misc_laser_init(
entity this)
58 void misc_laser_think(
entity this)
73 o = this.
enemy.origin;
83 if(this.
dmg || this.
enemy.target !=
"")
90 if(this.
enemy.target !=
"")
118 if(hitent.takedamage)
125 WriteHeader(MSG_ENTITY, ENT_CLIENT_LASER);
126 sendflags = sendflags & 0x0F;
138 WriteVector(MSG_ENTITY, this.
origin);
157 if(sendflags & SF_LASER_FINITE)
159 WriteVector(MSG_ENTITY, this.
enemy.origin);
163 WriteAngleVector2D(MSG_ENTITY, this.
mangle);
184 void laser_setactive(
entity this,
int act)
186 int old_status = this.
active;
203 if (this.
active != old_status)
206 misc_laser_aim(
this);
219 if(this.mdl ==
"none")
223 this.
cnt = _particleeffectnum(this.mdl);
224 if(this.
cnt < 0 && this.
dmg)
240 LOG_WARN(
"misc_laser uses legacy field 'colormod', please use 'beam_color' instead");
252 this.
message =
"saw the light";
254 if (this.message2 ==
"")
256 this.message2 =
"was pushed into a laser by";
276 Net_LinkEntity(
this,
false, 0, laser_SendEntity);
278 this.setactive = laser_setactive;
283 this.
use = laser_use;
286 this.reset = generic_netlinked_reset;
291 void Draw_Laser(
entity this)
296 if(this.
count & SF_LASER_FINITE)
347 int sendflags = ReadByte();
348 this.
count = (sendflags & 0xF0);
350 if(this.
count & SF_LASER_FINITE)
355 if(sendflags & SF_LASER_UPDATE_ORIGIN)
357 this.
origin = ReadVector();
360 if(sendflags & SF_LASER_UPDATE_EFFECT)
365 if(sendflags & SF_LASER_ALPHA)
366 this.
alpha = ReadByte() / 255.0;
371 if(sendflags & SF_LASER_SCALE)
373 this.
scale *= ReadByte() / 16.0;
376 if((sendflags & SF_LASER_FINITE) || !(sendflags & SF_LASER_NOTRACE))
377 this.
cnt = ReadShort();
381 if(sendflags & SF_LASER_UPDATE_TARGET)
383 if(sendflags & SF_LASER_FINITE)
389 this.
angles = ReadAngleVector2D();
398 this.draw = Draw_Laser;
void InterpolateOrigin_Note(entity this)
const float LASER_BEAM_MAXLENGTH
const int SF_LASER_UPDATE_EFFECT
#define REGISTER_NET_LINKED(id)
const float LASER_BEAM_MAXWORLDSIZE
void InterpolateOrigin_Undo(entity this)
snap origin to iorigin2 (actual origin)
float trace_dphitq3surfaceflags
const int SF_LASER_UPDATE_TARGET
const int SF_LASER_UPDATE_ORIGIN
void SUB_UseTargets(entity this, entity actor, entity trigger)
#define NET_HANDLE(id, param)
spawnfunc(info_player_attacker)
const int SF_LASER_UPDATE_ACTIVE
const int SF_LASER_NOTRACE
const float DRAWFLAG_ADDITIVE
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
const float DRAWFLAG_NORMAL
const int SF_LASER_FINITE
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
float Q3SURFACEFLAG_NOIMPACT
vector(float skel, float bonenum) _skel_get_boneabs_hidden
void InitializeEntity(entity e, void(entity this) func, int order)
vector trace_plane_normal
const int LASER_INVERT_TEAM
void InterpolateOrigin_Do(entity this)
set origin based on iorigin1 (old pos), iorigin2 (desired pos), and time
IntrusiveList g_drawables
#define particleeffectnum(e)