{
if(!player.wps_enemyflagcarrier)
{
- entity wp = WaypointSprite_Spawn(((ctf_oneflag) ? WP_FlagCarrier : WP_FlagCarrierEnemy), 0, 0, player, FLAG_WAYPOINT_OFFSET, NULL, 0, player, wps_enemyflagcarrier, true, RADARICON_FLAG);
+ entity base_wp = WP_FlagCarrier;
+ if (!ctf_oneflag)
+ {
+ switch (player.team)
+ {
+ case NUM_TEAM_1: base_wp = WP_FlagCarrierEnemyRed; break;
+ case NUM_TEAM_2: base_wp = WP_FlagCarrierEnemyBlue; break;
+ case NUM_TEAM_3: base_wp = WP_FlagCarrierEnemyYellow; break;
+ case NUM_TEAM_4: base_wp = WP_FlagCarrierEnemyPink; break;
+ default: base_wp = WP_FlagCarrierEnemyNeutral; break;
+ }
+ }
+ entity wp = WaypointSprite_Spawn(base_wp, 0, 0, player, FLAG_WAYPOINT_OFFSET, NULL,
+ 0, player, wps_enemyflagcarrier, true, RADARICON_FLAG);
wp.colormod = WPCOLOR_ENEMYFC(player.team);
setcefc(wp, ctf_Stalemate_Customize);
// waypoints
if(autocvar_g_ctf_flag_dropped_waypoint) {
- entity wp = WaypointSprite_Spawn(WP_FlagDropped, 0, 0, flag, FLAG_WAYPOINT_OFFSET, NULL, ((autocvar_g_ctf_flag_dropped_waypoint == 2) ? 0 : player.team), flag, wps_flagdropped, true, RADARICON_FLAG);
+ entity base_wp;
+ switch (flag.team)
+ {
+ case NUM_TEAM_1: base_wp = WP_FlagDroppedRed; break;
+ case NUM_TEAM_2: base_wp = WP_FlagDroppedBlue; break;
+ case NUM_TEAM_3: base_wp = WP_FlagDroppedYellow; break;
+ case NUM_TEAM_4: base_wp = WP_FlagDroppedPink; break;
+ default: base_wp = WP_FlagDroppedNeutral; break;
+ }
+ int wp_team = ((autocvar_g_ctf_flag_dropped_waypoint == 2) ? 0 : player.team);
+ entity wp = WaypointSprite_Spawn(base_wp, 0, 0, flag, FLAG_WAYPOINT_OFFSET, NULL,
+ wp_team, flag, wps_flagdropped, true, RADARICON_FLAG);
wp.colormod = WPCOLOR_DROPPEDFLAG(flag.team);
}
{
if((tmp_entity.owner) && (!tmp_entity.owner.wps_enemyflagcarrier))
{
- entity wp = WaypointSprite_Spawn(((ctf_oneflag) ? WP_FlagCarrier : WP_FlagCarrierEnemy), 0, 0, tmp_entity.owner, FLAG_WAYPOINT_OFFSET, NULL, 0, tmp_entity.owner, wps_enemyflagcarrier, true, RADARICON_FLAG);
+ entity base_wp = WP_FlagCarrier;
+ if (!ctf_oneflag)
+ {
+ switch (tmp_entity.owner.team)
+ {
+ case NUM_TEAM_1: base_wp = WP_FlagCarrierEnemyRed; break;
+ case NUM_TEAM_2: base_wp = WP_FlagCarrierEnemyBlue; break;
+ case NUM_TEAM_3: base_wp = WP_FlagCarrierEnemyYellow; break;
+ case NUM_TEAM_4: base_wp = WP_FlagCarrierEnemyPink; break;
+ default: base_wp = WP_FlagCarrierEnemyNeutral; break;
+ }
+ }
+ entity wp = WaypointSprite_Spawn(base_wp, 0, 0, tmp_entity.owner, FLAG_WAYPOINT_OFFSET, NULL,
+ 0, tmp_entity.owner, wps_enemyflagcarrier, true, RADARICON_FLAG);
wp.colormod = WPCOLOR_ENEMYFC(tmp_entity.owner.team);
setcefc(tmp_entity.owner.wps_enemyflagcarrier, ctf_Stalemate_Customize);
}
REGISTER_WAYPOINT(AssaultPush, _("Push"), "", '1 0.5 0', 1);
REGISTER_WAYPOINT(FlagCarrier, _("Flag carrier"), "", '0.8 0.8 0', 1);
-REGISTER_WAYPOINT(FlagCarrierEnemy, _("Enemy carrier"), "flag_neutral_carrying", '1 1 1', 1);
-REGISTER_WAYPOINT(FlagDropped, _("Dropped flag"), "flag_neutral_lost", '1 1 1', 1);
-REGISTER_WAYPOINT(FlagBaseNeutral, _("White base"), "flag_neutral_taken", '0.8 0.8 0', 1);
-REGISTER_WAYPOINT(FlagBaseRed, _("Red base"), "flag_red_taken", '0.8 0.8 0', 1);
-REGISTER_WAYPOINT(FlagBaseBlue, _("Blue base"), "flag_blue_taken", '0.8 0.8 0', 1);
-REGISTER_WAYPOINT(FlagBaseYellow, _("Yellow base"), "flag_yellow_taken", '0.8 0.8 0', 1);
-REGISTER_WAYPOINT(FlagBasePink, _("Pink base"), "flag_pink_taken", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagBaseNeutral, _("White base"), "flag_neutral_taken", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagBaseRed, _("Red base"), "flag_red_taken", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagBaseBlue, _("Blue base"), "flag_blue_taken", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagBaseYellow, _("Yellow base"), "flag_yellow_taken", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagBasePink, _("Pink base"), "flag_pink_taken", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagDroppedNeutral, _("Dropped flag"), "flag_neutral_lost", '1 1 1', 1);
+REGISTER_WAYPOINT(FlagDroppedRed, _("Dropped flag"), "flag_red_lost", '1 1 1', 1);
+REGISTER_WAYPOINT(FlagDroppedBlue, _("Dropped flag"), "flag_blue_lost", '1 1 1', 1);
+REGISTER_WAYPOINT(FlagDroppedYellow, _("Dropped flag"), "flag_yellow_lost", '1 1 1', 1);
+REGISTER_WAYPOINT(FlagDroppedPink, _("Dropped flag"), "flag_pink_lost", '1 1 1', 1);
+REGISTER_WAYPOINT(FlagCarrierEnemyNeutral, _("Enemy carrier"), "flag_neutral_carrying", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagCarrierEnemyRed, _("Enemy carrier"), "flag_red_carrying", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagCarrierEnemyBlue, _("Enemy carrier"), "flag_blue_carrying", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagCarrierEnemyYellow, _("Enemy carrier"), "flag_yellow_carrying", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagCarrierEnemyPink, _("Enemy carrier"), "flag_pink_carrying", '0.8 0.8 0', 1);
REGISTER_WAYPOINT(FlagReturn, _("Return flag here"), "", '0 0.8 0.8', 1);
REGISTER_WAYPOINT(DomNeut, _("Control point"), "dom_icon_blue-highlighted", '0 1 1', 1);