X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fmiscfunctions.qc;h=036c9570f1df2a3b4da7ed475c1db368e89c947c;hb=e9e91f9bc18dd5002e60c595c83cb8f45068a14b;hp=d74a24a320142d35e7da242c19f24586ca1e08fe;hpb=d1ec6cd7b36e2c16817720fe5cce775fc3d26357;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/miscfunctions.qc b/qcsrc/client/miscfunctions.qc index d74a24a32..036c9570f 100644 --- a/qcsrc/client/miscfunctions.qc +++ b/qcsrc/client/miscfunctions.qc @@ -1,9 +1,14 @@ #include "miscfunctions.qh" -#include "../common/urllib.qh" +#include "hud.qh" #include "../common/command/generic.qh" +#include "../common/teams.qh" + +#include "../lib/csqcmodel/cl_model.qh" + + void AuditLists() { entity e; @@ -100,7 +105,7 @@ void RemoveTeam(entity Team) if(!tm) { - print(_("Trying to remove a team which is not in the teamlist!")); + LOG_INFO(_("Trying to remove a team which is not in the teamlist!")); return; } parent.sort_next = Team.sort_next; @@ -118,7 +123,8 @@ entity GetTeam(int Team, bool add) return teamslots[num]; if (!add) return world; - entity tm = spawn(); + entity tm = new(team); + make_pure(tm); tm.team = Team; teamslots[num] = tm; RegisterTeam(tm); @@ -159,14 +165,6 @@ vector rotate(vector v, float a) return w; } -string ColorTranslateRGB(string s) -{ - if(ColorTranslateMode & 1) - return strdecolorize(s); - else - return s; -} - // decolorizes and team colors the player name when needed string playername(string thename, float teamid) { @@ -349,11 +347,11 @@ void PolyDrawModel(entity e) break; } -void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vector rgb, float a, float drawflag) +void DrawCircleClippedPic(vector centre, float radi, string pic, float f, vector rgb, float a, float drawflag) { float x, y, q, d; vector ringsize, v, t; - ringsize = radius * '1 1 0'; + ringsize = radi * '1 1 0'; x = cos(f * 2 * M_PI); y = sin(f * 2 * M_PI); @@ -567,7 +565,7 @@ void URI_Get_Callback(int id, float status, string data) } else { - printf("Received HTTP request data for an invalid id %d.\n", id); + LOG_INFOF("Received HTTP request data for an invalid id %d.\n", id); } } @@ -592,7 +590,7 @@ void Accuracy_LoadLevels() if(acc_levels > MAX_ACCURACY_LEVELS) acc_levels = MAX_ACCURACY_LEVELS; if(acc_levels < 2) - print("Warning: accuracy_color_levels must contain at least 2 values\n"); + LOG_INFO("Warning: accuracy_color_levels must contain at least 2 values\n"); int i; for(i = 0; i < acc_levels; ++i)