}
else if(cmd == "sendcvar") {
// W_FixWeaponOrder will trash argv, so save what we need.
- string cvar;
- cvar = strzone(argv(1));
- s = cvar_string(cvar);
- if(cvar == "cl_weaponpriority")
+ string thiscvar;
+ thiscvar = strzone(argv(1));
+ s = cvar_string(thiscvar);
+ if(thiscvar == "cl_weaponpriority")
s = W_FixWeaponOrder(W_NumberWeaponOrder(s), 1);
- else if(substring(cvar, 0, 17) == "cl_weaponpriority" && strlen(cvar) == 18)
+ else if(substring(thiscvar, 0, 17) == "cl_weaponpriority" && strlen(thiscvar) == 18)
s = W_FixWeaponOrder(W_NumberWeaponOrder(s), 0);
- localcmd("cmd sentcvar ", cvar, " \"", s, "\"\n");
- strunzone(cvar);
+ localcmd("cmd sentcvar ", thiscvar, " \"", s, "\"\n");
+ strunzone(thiscvar);
}
else if(cmd == "spawn") {
s = argv(1);
vector targSize;
vector myCenter;
vector targCenter;
+ myCenter = '0 0 0'; // shut up fteqcc, there IS a reference
+ targCenter = '0 0 0'; // shut up fteqcc, there IS a reference
for (i = 0; i < panel_cnt; ++i) {
if(i == id || !HUD_Panel_CheckActive(i))
targCenter_x = targPos_x + 0.5 * targSize_x;
targCenter_y = targPos_y + 0.5 * targSize_y;
- float k, y;
if(myCenter_x < targCenter_x && myCenter_y < targCenter_y && resizeCorner != 1) // top left (of target panel)
{
if(myPos_x + mySize_x - targPos_x < myPos_y + mySize_y - targPos_y) // push it to the side
vector targSize;
vector myCenter;
vector targCenter;
+ myCenter = '0 0 0'; // shut up fteqcc, there IS a reference
+ targCenter = '0 0 0'; // shut up fteqcc, there IS a reference
for (i = 0; i < panel_cnt; ++i) {
if(i == id || !HUD_Panel_CheckActive(i))
targCenter_x = targPos_x + 0.5 * targSize_x;
targCenter_y = targPos_y + 0.5 * targSize_y;
- float k, y;
if(myCenter_x < targCenter_x && myCenter_y < targCenter_y) // top left (of the target panel)
{
if(myPos_x + mySize_x - targPos_x < myPos_y + mySize_y - targPos_y) // push it to the side
float weaponorder_cmp(float i, float j, entity pass)
{
- float d, ii, ij;
+ float d;
d = mod(weaponorder[i].impulse + 9, 10) - mod(weaponorder[j].impulse + 9, 10);
if(d)
return d;
void HUD_WeaponIcons()
{
float id = 0;
- float alpha, height, accuracybar_height, stat_weapons; // "constants"
- vector pos, mySize, mysize, mypos, accuracy_color;
+ float alpha, accuracybar_height, stat_weapons; // "constants"
+ vector pos, mySize, accuracy_color;
float i, weapid, fade, weapon_stats, weapon_hit, weapon_damage, weapon_cnt; // variables
pos = HUD_Panel_GetPos(id);
// Powerups (#2)
//
-float shield_maxtime;
-float strength_maxtime;
void HUD_Powerups() {
float id = 2;
float stat_items;
mySize -= '2 2 0' * padding;
}
- float armor, health, x;
+ float armor, health;
armor = getstati(STAT_ARMOR);
health = getstati(STAT_HEALTH);
float score, distribution, leader;
float score_len, distr_len;
- vector score_pos, secondary_score_pos, distribution_color;
+ vector distribution_color;
entity tm, pl, me;
me = (spectatee_status > 0) ? playerslots[spectatee_status - 1] : playerslots[player_localentnum - 1];
//Manage the progress bar if any
if (nb_pb_starttime > 0)
{
- vector s;
dt = mod(time - nb_pb_starttime, nb_pb_period);
// one period of positive triangle
p = 2 * dt / nb_pb_period;