X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fteamradar.qc;h=01388fdd2ff7ad69609cc6f00ea671df7df98724;hb=0b740fb801278d163504f0c0a9792c11bc0f024f;hp=7623e9df86dd8d3ad637e0a9768321a7392c17e1;hpb=03f978544a8b13a18cef1c7cc3dbcaba1c3aee4c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/teamradar.qc b/qcsrc/client/teamradar.qc index 7623e9df8..01388fdd2 100644 --- a/qcsrc/client/teamradar.qc +++ b/qcsrc/client/teamradar.qc @@ -1,11 +1,10 @@ #include "teamradar.qh" -#include "_all.qh" -#include "hud.qh" +#include "hud/all.qh" -#include "../common/util.qh" +#include -#include "../csqcmodellib/interpolate.qh" +#include "../lib/csqcmodel/interpolate.qh" vector teamradar_3dcoord_to_texcoord(vector in) { @@ -59,12 +58,6 @@ vector teamradar_texcoord_to_3dcoord(vector in,float z) return out; } -vector yinvert(vector v) -{ - v.y = 1 - v.y; - return v; -} - void draw_teamradar_background(float fg) { float fga; @@ -155,6 +148,7 @@ void draw_teamradar_icon(vector coord, entity icon, entity pingdata, vector rgb, void draw_teamradar_link(vector start, vector end, int colors) { + TC(int, colors); vector c0, c1, norm; start = teamradar_texcoord_to_2dcoord(teamradar_3dcoord_to_texcoord(start)); @@ -201,34 +195,36 @@ void teamradar_loadcvars() // radar links -void Ent_RadarLink() -{SELFPARAM(); +NET_HANDLE(ENT_CLIENT_RADARLINK, bool isnew) +{ int sendflags = ReadByte(); - InterpolateOrigin_Undo(); + InterpolateOrigin_Undo(this); - self.iflags = IFLAG_VELOCITY | IFLAG_ORIGIN; - self.classname = "radarlink"; + this.iflags = IFLAG_VELOCITY | IFLAG_ORIGIN; + this.classname = "radarlink"; if(sendflags & 1) { - self.origin_x = ReadCoord(); - self.origin_y = ReadCoord(); - self.origin_z = ReadCoord(); - setorigin(self, self.origin); + this.origin_x = ReadCoord(); + this.origin_y = ReadCoord(); + this.origin_z = ReadCoord(); + setorigin(this, this.origin); } if(sendflags & 2) { - self.velocity_x = ReadCoord(); - self.velocity_y = ReadCoord(); - self.velocity_z = ReadCoord(); + this.velocity_x = ReadCoord(); + this.velocity_y = ReadCoord(); + this.velocity_z = ReadCoord(); } if(sendflags & 4) { - self.team = ReadByte(); + this.team = ReadByte(); } - InterpolateOrigin_Note(); + return = true; + + InterpolateOrigin_Note(this); }