+ string yellow_icon, yellow_icon_prevstatus;
+ int yellow_alpha, yellow_alpha_prevstatus;
+ yellow_alpha = yellow_alpha_prevstatus = 1;
+ switch(yellowflag)
+ {
+ case 1: yellow_icon = "flag_yellow_taken"; break;
+ case 2: yellow_icon = "flag_yellow_lost"; break;
+ case 3: yellow_icon = "flag_yellow_carrying"; yellow_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break;
+ default:
+ if((stat_items & CTF_SHIELDED) && (myteam != NUM_TEAM_3))
+ yellow_icon = "flag_yellow_shielded";
+ else
+ yellow_icon = string_null;
+ break;
+ }
+ switch(yellowflag_prevstatus)
+ {
+ case 1: yellow_icon_prevstatus = "flag_yellow_taken"; break;
+ case 2: yellow_icon_prevstatus = "flag_yellow_lost"; break;
+ case 3: yellow_icon_prevstatus = "flag_yellow_carrying"; yellow_alpha_prevstatus = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break;
+ default:
+ if(yellowflag == 3)
+ yellow_icon_prevstatus = "flag_yellow_carrying"; // make it more visible
+ else if((stat_items & CTF_SHIELDED) && (myteam != NUM_TEAM_3))
+ yellow_icon_prevstatus = "flag_yellow_shielded";
+ else
+ yellow_icon_prevstatus = string_null;
+ break;
+ }
+
+ string pink_icon, pink_icon_prevstatus;
+ int pink_alpha, pink_alpha_prevstatus;
+ pink_alpha = pink_alpha_prevstatus = 1;
+ switch(pinkflag)
+ {
+ case 1: pink_icon = "flag_pink_taken"; break;
+ case 2: pink_icon = "flag_pink_lost"; break;
+ case 3: pink_icon = "flag_pink_carrying"; pink_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break;
+ default:
+ if((stat_items & CTF_SHIELDED) && (myteam != NUM_TEAM_4))
+ pink_icon = "flag_pink_shielded";
+ else
+ pink_icon = string_null;
+ break;
+ }
+ switch(pinkflag_prevstatus)
+ {
+ case 1: pink_icon_prevstatus = "flag_pink_taken"; break;
+ case 2: pink_icon_prevstatus = "flag_pink_lost"; break;
+ case 3: pink_icon_prevstatus = "flag_pink_carrying"; pink_alpha_prevstatus = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break;
+ default:
+ if(pinkflag == 3)
+ pink_icon_prevstatus = "flag_pink_carrying"; // make it more visible
+ else if((stat_items & CTF_SHIELDED) && (myteam != NUM_TEAM_4))
+ pink_icon_prevstatus = "flag_pink_shielded";
+ else
+ pink_icon_prevstatus = string_null;
+ break;
+ }
+
+ string neutral_icon, neutral_icon_prevstatus;
+ int neutral_alpha, neutral_alpha_prevstatus;
+ neutral_alpha = neutral_alpha_prevstatus = 1;
+ switch(neutralflag)
+ {
+ case 1: neutral_icon = "flag_neutral_taken"; break;
+ case 2: neutral_icon = "flag_neutral_lost"; break;
+ case 3: neutral_icon = "flag_neutral_carrying"; neutral_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break;
+ default:
+ if((stat_items & CTF_SHIELDED))
+ neutral_icon = "flag_neutral_shielded";
+ else
+ neutral_icon = string_null;
+ break;
+ }
+ switch(neutralflag_prevstatus)
+ {
+ case 1: neutral_icon_prevstatus = "flag_neutral_taken"; break;
+ case 2: neutral_icon_prevstatus = "flag_neutral_lost"; break;
+ case 3: neutral_icon_prevstatus = "flag_neutral_carrying"; neutral_alpha_prevstatus = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break;
+ default:
+ if(neutralflag == 3)
+ neutral_icon_prevstatus = "flag_neutral_carrying"; // make it more visible
+ else if((stat_items & CTF_SHIELDED))
+ neutral_icon_prevstatus = "flag_neutral_shielded";
+ else
+ neutral_icon_prevstatus = string_null;
+ break;
+ }
+
+ if(ctf_oneflag)
+ {
+ // hacky, but these aren't needed
+ red_icon = red_icon_prevstatus = blue_icon = blue_icon_prevstatus = yellow_icon = yellow_icon_prevstatus = pink_icon = pink_icon_prevstatus = string_null;
+ fs = fs2 = fs3 = 1;
+ }
+ else switch(team_count)
+ {
+ default:
+ case 2: fs = 0.5; fs2 = 0.5; fs3 = 0.5; break;
+ case 3: fs = 1; fs2 = 0.35; fs3 = 0.35; break;
+ case 4: fs = 0.75; fs2 = 0.25; fs3 = 0.5; break;
+ }
+
+ if(mySize_x > mySize_y)
+ {
+ size1 = mySize_x;
+ size2 = mySize_y;
+ e1 = eX;
+ e2 = eY;
+ }
+ else
+ {
+ size1 = mySize_y;
+ size2 = mySize_x;
+ e1 = eY;
+ e2 = eX;
+ }
+
+ switch(myteam)
+ {
+ default:
+ case NUM_TEAM_1:
+ {