#include "miscfunctions.qh"
+#include "autocvars.qh"
+#include "defs.qh"
#include "hud/_mod.qh"
#include <common/command/_mod.qh>
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];
return vec;
}
+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;
+}
+
float expandingbox_sizefactor_from_fadelerp(float fadelerp)
{
return 1.2 / (1.2 - fadelerp);
float d;
vector ringsize, v, t;
ringsize = radi * '1 1 0';
+ centre = HUD_Shift(centre);
+ ringsize = HUD_Scale(ringsize);
float co = cos(f * 2 * M_PI);
float si = sin(f * 2 * M_PI);
/** 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
}
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);
}
}
{
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)
color = color + factor * (acc_col[j+1] - color);
return color;
}
-