X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fmiscfunctions.qc;h=360305601a8b71cfdd345436f213f9eafb5e50ee;hp=b1bf10bdf15092e3fcfd666c06d5fd786f957d17;hb=991de5e6922cd3c283de56c3249624f0f1bfe767;hpb=bcc670b9a1b74e6b05f5e22c8da917ffc20f7051 diff --git a/qcsrc/client/miscfunctions.qc b/qcsrc/client/miscfunctions.qc index b1bf10bdf1..360305601a 100644 --- a/qcsrc/client/miscfunctions.qc +++ b/qcsrc/client/miscfunctions.qc @@ -1,5 +1,7 @@ #include "miscfunctions.qh" +#include "autocvars.qh" +#include "defs.qh" #include "hud/_mod.qh" #include @@ -119,7 +121,7 @@ void RemoveTeam(entity Team) entity GetTeam(int Team, bool add) { - TC(int, Team); TC(bool, add); + TC(int, Team); TC(bool, add); int num = (Team == NUM_SPECTATOR) ? 16 : Team; if(teamslots[num]) return teamslots[num]; @@ -197,8 +199,8 @@ bool projected_on_screen(vector screen_pos) return screen_pos.z >= 0 && screen_pos.x >= 0 && screen_pos.y >= 0 - && screen_pos.x <= vid_conwidth - && screen_pos.y <= vid_conheight; + && screen_pos.x < vid_conwidth + && screen_pos.y < vid_conheight; } float expandingbox_sizefactor_from_fadelerp(float fadelerp) @@ -551,7 +553,7 @@ void DrawCircleClippedPic(vector centre, float radi, string pic, float f, vector /** engine callback */ void URI_Get_Callback(int id, int status, string data) { - TC(int, id); TC(int, status); + TC(int, id); TC(int, status); if(url_URI_Get_Callback(id, status, data)) { // handled @@ -567,7 +569,7 @@ void URI_Get_Callback(int id, int status, string data) } else { - LOG_INFOF("Received HTTP request data for an invalid id %d.\n", id); + LOG_INFOF("Received HTTP request data for an invalid id %d.", id); } } @@ -575,14 +577,12 @@ void Accuracy_LoadLevels() { if(autocvar_accuracy_color_levels != acc_color_levels) { - if(acc_color_levels) - strunzone(acc_color_levels); - acc_color_levels = strzone(autocvar_accuracy_color_levels); + strcpy(acc_color_levels, autocvar_accuracy_color_levels); acc_levels = tokenize_console(acc_color_levels); if(acc_levels > MAX_ACCURACY_LEVELS) acc_levels = MAX_ACCURACY_LEVELS; if(acc_levels < 2) - LOG_INFO("Warning: accuracy_color_levels must contain at least 2 values\n"); + LOG_INFO("Warning: accuracy_color_levels must contain at least 2 values"); int i; for(i = 0; i < acc_levels; ++i)