if(!CheckWireframeBox(porto, p - 48 * v_right - 48 * v_up + 16 * v_forward, 96 * v_right, 96 * v_up, 96 * v_forward))
return;
if(portal_number == 1)
+ {
portal1_idx = idx;
- if(portal_number >= 2)
- break;
+ if(portal_number >= 2)
+ break;
+ }
}
while(idx >= 2)
}
// edge detection postprocess handling done second (used by hud_powerup)
- float sharpen_intensity, strength_finished = getstatf(STAT_STRENGTH_FINISHED), invincible_finished = getstatf(STAT_INVINCIBLE_FINISHED);
+ float sharpen_intensity = 0, strength_finished = getstatf(STAT_STRENGTH_FINISHED), invincible_finished = getstatf(STAT_INVINCIBLE_FINISHED);
if (strength_finished - time > 0) { sharpen_intensity += (strength_finished - time); }
if (invincible_finished - time > 0) { sharpen_intensity += (invincible_finished - time); }
shottype = SHOTTYPE_HITWORLD;
vector wcross_color, wcross_size;
- string wcross_wep, wcross_name;
+ string wcross_wep = "", wcross_name;
float wcross_scale, wcross_blur;
if (autocvar_crosshair_per_weapon || autocvar_crosshair_color_per_weapon) {
if (autocvar_crosshair_ring || autocvar_crosshair_ring_reload)
{
// declarations and stats
- float ring_value, ring_scale, ring_alpha, ring_inner_value, ring_inner_alpha;
- string ring_image, ring_inner_image;
- vector ring_rgb, ring_inner_rgb;
+ float ring_value = 0, ring_scale = 0, ring_alpha = 0, ring_inner_value = 0, ring_inner_alpha = 0;
+ string ring_image = string_null, ring_inner_image = string_null;
+ vector ring_rgb = '0 0 0', ring_inner_rgb = '0 0 0';
ring_scale = autocvar_crosshair_ring_size;
float panel_ar = mySize_x/mySize_y;
float is_vertical = (panel_ar < 1);
- vector shield_offset, strength_offset, superweapons_offset;
+ vector shield_offset = '0 0 0', strength_offset = '0 0 0', superweapons_offset = '0 0 0';
float superweapons_is = -1;
if(superweapons_is == 0)
{
+ superweapons_offset = '0 0 0';
superweapons_iconalign = strength_iconalign;
superweapons_baralign = 2;
}
superweapons_iconalign = strength_iconalign;
superweapons_baralign = strength_baralign;
}
- else if(superweapons_is == 2)
+ else // if(superweapons_is == 2)
{
superweapons_offset = shield_offset;
superweapons_iconalign = shield_iconalign;
{
float panel_ar = mySize_x/mySize_y;
float is_vertical = (panel_ar < 1);
- vector health_offset, armor_offset;
+ vector health_offset = '0 0 0', armor_offset = '0 0 0';
if (panel_ar >= 4 || (panel_ar >= 1/4 && panel_ar < 1))
{
mySize_x *= 0.5;
void HUD_Score_Rankings(vector pos, vector mySize, entity me, float team_count)
{
float score;
- entity tm, pl;
+ entity tm = world, pl;
#define SCOREPANEL_MAX_ENTRIES 6
#define SCOREPANEL_ASPECTRATIO 2
float entries = bound(1, floor(SCOREPANEL_MAX_ENTRIES * mySize_y/mySize_x * SCOREPANEL_ASPECTRATIO), SCOREPANEL_MAX_ENTRIES);
float name_size = mySize_x*0.75;
float spacing_size = mySize_x*0.04;
const float highlight_alpha = 0.2;
- float i, me_printed, first_pl;
+ float i = 0, me_printed = 0, first_pl = 0;
string s;
- i = 0;
- first_pl = 0;
if (autocvar__hud_configure)
{
- float players_per_team;
+ float players_per_team = 0;
if (team_count)
{
// show team scores in the first line
{
rgb = '1 1 0';
drawfill(pos, eX * mySize_x + eY * fontsize_y, rgb, highlight_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
- s = GetPlayerName(pl.sv_entnum);
+ s = GetPlayerName(player_localnum);
score = 7;
}
else
mySize -= '2 2 0' * panel_bg_padding;
}
- float score, distribution;
+ float score, distribution = 0;
string sign;
vector distribution_color;
entity tm, pl, me;
drawstring_aspect(pos + eX * 0.75 * mySize_x, distribution_str, eX * 0.25 * mySize_x + eY * (1/3) * mySize_y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL);
draw_endBoldFont();
} else { // teamgames
- float scores_count, row, column, rows, columns;
- local noref vector offset; // fteqcc sucks
+ float scores_count = 0, row, column, rows = 0, columns = 0;
+ local noref vector offset = '0 0 0';
vector score_pos, score_size; //for scores other than myteam
if (spectatee_status == -1 || autocvar_hud_panel_score_rankings)
{
float max_fragcount;
max_fragcount = -99;
draw_beginBoldFont();
+ row = column = 0;
for(tm = teams.sort_next; tm; tm = tm.sort_next) {
if(tm.team == COLOR_SPECTATOR)
continue;
float rank;
if(race_status > 0)
rank = race_CheckName(race_status_name);
+ else
+ rank = 0;
string rankname;
rankname = race_PlaceName(rank);
float stat, pps_ratio;
string pic;
vector color;
+#ifdef GMQCC
+ stat = -1;
+ pic = "";
+ color = '0 0 0';
+#endif
switch(i)
{
case 0:
pic = "dom_icon_yellow";
color = '1 1 0';
break;
+ default:
case 3:
stat = getstatf(STAT_DOM_PPS_PINK);
pic = "dom_icon_pink";
color = '1 0 1';
+ break;
}
pps_ratio = stat / getstatf(STAT_DOM_TOTAL_PPS);
{
mod_active = 1; // required in each mod function that always shows something
entity tm;
- float teams_count;
+ float teams_count = 0;
for(tm = teams.sort_next; tm; tm = tm.sort_next)
if(tm.team != COLOR_SPECTATOR)
++teams_count;
columns = ceil(teams_count/rows);
int i;
- float row, column;
+ float row = 0, column = 0;
for(i=0; i<teams_count; ++i)
{
vector pos, itemSize;
if(teamplay && !intermission && !spectatee_status && gametype != MAPINFO_TYPE_CA && teamnagger)
{
- float ts_min, ts_max;
+ float ts_min = 0, ts_max = 0;
tm = teams.sort_next;
if (tm)
{
panel_size -= '2 2 0' * panel_bg_padding;
}
- float acceleration_progressbar_scale;
+ float acceleration_progressbar_scale = 0;
if(autocvar_hud_panel_physics_progressbar && autocvar_hud_panel_physics_acceleration_progressbar_scale > 1)
acceleration_progressbar_scale = autocvar_hud_panel_physics_acceleration_progressbar_scale;
//compute layout
float panel_ar = panel_size_x/panel_size_y;
- vector speed_offset, acceleration_offset;
+ vector speed_offset = '0 0 0', acceleration_offset = '0 0 0';
if (panel_ar >= 5 && !acceleration_progressbar_scale)
{
panel_size_x *= 0.5;
peak_offset_x = min(top_speed, max_speed)/max_speed * panel_size_x;
else if (speed_baralign == 1)
peak_offset_x = (1 - min(top_speed, max_speed)/max_speed) * panel_size_x;
- else if (speed_baralign == 2)
+ else // if (speed_baralign == 2)
peak_offset_x = min(top_speed, max_speed)/max_speed * panel_size_x * 0.5;
//if speed is not 0 the speed progressbar already fetched the color
if (speed == 0)
entries = bound(1, floor(panel_size_y/height), CENTERPRINT_MAX_ENTRIES);
float i, j, k, n;
- float a, sz, align, current_msg_pos_y, msg_size;
+ float a, sz, align, current_msg_pos_y = 0, msg_size;
vector pos;
string ts;
a = bound(0, (time - (centerprint_expire_time[j] - centerprint_time[j])) / max(0.0001, autocvar_hud_panel_centerprint_fade_in), 1);
else if (centerprint_expire_time[j] > time)
a = (centerprint_expire_time[j] - time) / max(0.0001, autocvar_hud_panel_centerprint_fade_out);
+ else
+ a = 0;
// set the size from fading in/out before subsequent fading
sz = autocvar_hud_panel_centerprint_fade_minfontsize + a * (1 - autocvar_hud_panel_centerprint_fade_minfontsize);
if(autocvar__hud_panelorder != hud_panelorder_prev) {
for(i = 0; i < HUD_PANEL_NUM; ++i)
panel_order[i] = -1;
- string s;
- float p_num, warning;
+ string s = "";
+ float p_num, warning = false;
float argc = tokenize_console(autocvar__hud_panelorder);
if (argc > HUD_PANEL_NUM)
warning = true;