X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Fmisc%2Flaser.qc;h=31e9fa4d9edafc29d20fbdde07fd2f9d61c39b7e;hb=6317faf49d3c92fffe52f790ff39b6792fbfe458;hp=399ba5baf5b9f134476ae64fcba2147ccbbd3b62;hpb=8e0690ba978a6a0c7287bc3cfa2873a05b15fc5f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/misc/laser.qc b/qcsrc/common/triggers/misc/laser.qc index 399ba5baf..31e9fa4d9 100644 --- a/qcsrc/common/triggers/misc/laser.qc +++ b/qcsrc/common/triggers/misc/laser.qc @@ -1,3 +1,4 @@ +#include "laser.qh" #if defined(CSQC) #include #include @@ -117,7 +118,7 @@ void misc_laser_think(entity this) if(((this.spawnflags & 8) == 0) == (this.team != hitent.team)) return; if(hitent.takedamage) - Damage(hitent, this, this, ((this.dmg < 0) ? 100000 : (this.dmg * frametime)), DEATH_HURTTRIGGER.m_id, hitloc, '0 0 0'); + Damage(hitent, this, this, ((this.dmg < 0) ? 100000 : (this.dmg * frametime)), DEATH_HURTTRIGGER.m_id, DMG_NOWEP, hitloc, '0 0 0'); } } @@ -136,9 +137,7 @@ bool laser_SendEntity(entity this, entity to, float fl) WriteByte(MSG_ENTITY, fl); if(fl & 1) { - WriteCoord(MSG_ENTITY, this.origin_x); - WriteCoord(MSG_ENTITY, this.origin_y); - WriteCoord(MSG_ENTITY, this.origin_z); + WriteVector(MSG_ENTITY, this.origin); } if(fl & 8) { @@ -159,9 +158,7 @@ bool laser_SendEntity(entity this, entity to, float fl) { if(fl & 0x80) { - WriteCoord(MSG_ENTITY, this.enemy.origin_x); - WriteCoord(MSG_ENTITY, this.enemy.origin_y); - WriteCoord(MSG_ENTITY, this.enemy.origin_z); + WriteVector(MSG_ENTITY, this.enemy.origin); } else { @@ -240,7 +237,7 @@ spawnfunc(misc_laser) Net_LinkEntity(this, false, 0, laser_SendEntity); - IFTARGETED + if(THIS_TARGETED) { this.reset = laser_reset; this.reset(this); @@ -330,9 +327,7 @@ NET_HANDLE(ENT_CLIENT_LASER, bool isnew) if(f & 1) { - this.origin_x = ReadCoord(); - this.origin_y = ReadCoord(); - this.origin_z = ReadCoord(); + this.origin = ReadVector(); setorigin(this, this.origin); } if(f & 8) @@ -360,9 +355,7 @@ NET_HANDLE(ENT_CLIENT_LASER, bool isnew) { if(f & 0x80) { - this.velocity_x = ReadCoord(); - this.velocity_y = ReadCoord(); - this.velocity_z = ReadCoord(); + this.velocity = ReadVector(); } else { @@ -377,5 +370,6 @@ NET_HANDLE(ENT_CLIENT_LASER, bool isnew) InterpolateOrigin_Note(this); this.draw = Draw_Laser; + if (isnew) IL_PUSH(g_drawables, this); } #endif