X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fmiscfunctions.qc;h=0c262604b9397155405915700b94243a86497ee5;hp=e8808e21299420831f25bb0fc78c088cfa8e3b06;hb=6ba37d06b4afe2b08882f5cc5b211441227586b2;hpb=935976d2b23b527a6dda9f8309972f0334bfc829 diff --git a/qcsrc/client/miscfunctions.qc b/qcsrc/client/miscfunctions.qc index e8808e212..0c262604b 100644 --- a/qcsrc/client/miscfunctions.qc +++ b/qcsrc/client/miscfunctions.qc @@ -2,11 +2,11 @@ #include "hud/all.qh" -#include "../common/command/generic.qh" +#include -#include "../common/teams.qh" +#include -#include "../lib/csqcmodel/cl_model.qh" +#include void AuditLists() @@ -79,6 +79,7 @@ void MoveToLast(entity e) float RegisterTeam(entity Team) { + assert_once(Team.team, eprint(Team)); entity tm; AuditLists(); for(tm = teams.sort_next; tm; tm = tm.sort_next) @@ -156,15 +157,6 @@ float PreviewExists(string name) return false; } -vector rotate(vector v, float a) -{ - vector w = '0 0 0'; - // FTEQCC SUCKS AGAIN - w.x = v.x * cos(a) + v.y * sin(a); - w.y = -1 * v.x * sin(a) + v.y * cos(a); - return w; -} - // decolorizes and team colors the player name when needed string playername(string thename, float teamid) { @@ -199,10 +191,6 @@ vector project_3d_to_2d(vector vec) return vec; } -void dummyfunction(float a1, float a2, float a3, float a4, float a5, float a6, float a7, float a8) -{ -} - float expandingbox_sizefactor_from_fadelerp(float fadelerp) { return 1.2 / (1.2 - fadelerp); @@ -287,7 +275,6 @@ void drawstring_expanding(vector position, string text, vector theScale, vector sz = expandingbox_sizefactor_from_fadelerp(fadelerp); drawfontscale = sz * '1 1 0'; - dummyfunction(0, 0, 0, 0, 0, 0, 0, 0); drawstring(position + expandingbox_resize_centered_box_offset(sz, theScale, stringwidth(text, false, theScale * (sz / drawfontscale.x)) / (theScale.x * sz)), text, theScale * (sz / drawfontscale.x), rgb, theAlpha * (1 - fadelerp), flag); // width parameter: // (scale_x * sz / drawfontscale_x) * drawfontscale_x * SIZE1 / (scale_x * sz) @@ -307,7 +294,6 @@ void drawcolorcodedstring_expanding(vector position, string text, vector theScal sz = expandingbox_sizefactor_from_fadelerp(fadelerp); drawfontscale = sz * '1 1 0'; - dummyfunction(0, 0, 0, 0, 0, 0, 0, 0); drawcolorcodedstring(position + expandingbox_resize_centered_box_offset(sz, theScale, stringwidth(text, true, theScale * (sz / drawfontscale.x)) / (theScale.x * sz)), text, theScale * (sz / drawfontscale.x), theAlpha * (1 - fadelerp), flag); drawfontscale = '1 1 0'; } @@ -497,57 +483,7 @@ void DrawCircleClippedPic(vector centre, float radi, string pic, float f, vector } } -vector getplayerorigin(int pl) -{ - entity e; - - e = CSQCModel_server2csqc(pl + 1); - if(e) - return e.origin; - - e = entcs_receiver[pl]; - if(e) - return e.origin; - - return GETPLAYERORIGIN_ERROR; -} - -float getplayeralpha(float pl) -{ - entity e; - - e = CSQCModel_server2csqc(pl + 1); - if(e) - return e.alpha; - - return 1; -} - -vector getcsqcplayercolor(float pl) -{ - entity e; - - e = CSQCModel_server2csqc(pl); - if(e) - { - if(e.colormap > 0) - return colormapPaletteColor(((e.colormap >= 1024) ? e.colormap : stof(getplayerkeyvalue(e.colormap - 1, "colors"))) & 0x0F, true); - } - - return '1 1 1'; -} - -float getplayerisdead(float pl) -{ - entity e; - - e = CSQCModel_server2csqc(pl + 1); - if(e) - return e.csqcmodel_isdead; - - return false; -} - +/** engine callback */ void URI_Get_Callback(int id, float status, string data) { if(url_URI_Get_Callback(id, status, data)) @@ -569,16 +505,6 @@ void URI_Get_Callback(int id, float status, string data) } } -void draw_beginBoldFont() -{ - drawfont = FONT_USER+2; -} - -void draw_endBoldFont() -{ - drawfont = FONT_USER+1; -} - void Accuracy_LoadLevels() { if(autocvar_accuracy_color_levels != acc_color_levels)