//dprint(s, "\n");
+ // TODO limit centerprint spam and set the appropriated duration for each centerprinted msg
FOR_EACH_PLAYER(e)
if(clienttype(e) == CLIENTTYPE_REAL)
- centerprint_atprio(e, CENTERPRIO_SPAM, s);
+ Send_CSQC_Centerprint_Generic(e, CPID_KH_MSG, s, 2, 0); // duration > 1 works with all the messages
}
self.cnt -= 1;
}
if(key.kh_next == world)
{
// player is now a key carrier
- WaypointSprite_AttachCarrier("", player);
+ WaypointSprite_AttachCarrier("", player, RADARICON_FLAGCARRIER, colormapPaletteColor(player.team - 1, 0));
player.waypointsprite_attachedforcarrier.waypointsprite_visible_for_player = kh_KeyCarrier_waypointsprite_visible_for_player;
WaypointSprite_UpdateRule(player.waypointsprite_attachedforcarrier, player.team, SPRITERULE_TEAMPLAY);
if(player.team == COLOR_TEAM1)
WaypointSprite_UpdateSprites(player.waypointsprite_attachedforcarrier, "keycarrier-yellow", "keycarrier-friend", "keycarrier-yellow");
else if(player.team == COLOR_TEAM4)
WaypointSprite_UpdateSprites(player.waypointsprite_attachedforcarrier, "keycarrier-pink", "keycarrier-friend", "keycarrier-pink");
- WaypointSprite_UpdateTeamRadar(player.waypointsprite_attachedforcarrier, RADARICON_FLAGCARRIER, colormapPaletteColor(player.team - 1, 0));
if(!kh_no_radar_circles)
WaypointSprite_Ping(player.waypointsprite_attachedforcarrier);
}
{
if(head.team == kh_interferemsg_team)
if(head.kh_next)
- centerprint(head, "All keys are in your team's hands!\n\nMeet the other key carriers ^1NOW^7!");
+ Send_CSQC_Centerprint_Generic(head, CPID_KH_MSG, "All keys are in your team's hands!\n\nMeet the other key carriers ^1NOW^7!", 0, 0);
else
- centerprint(head, "All keys are in your team's hands!\n\nHelp the key carriers to meet!");
+ Send_CSQC_Centerprint_Generic(head, CPID_KH_MSG, "All keys are in your team's hands!\n\nHelp the key carriers to meet!", 0, 0);
else
- centerprint(head, strcat("All keys are in the ", ColoredTeamName(kh_interferemsg_team), "^7's hands!\n\nInterfere ^1NOW^7!"));
+ Send_CSQC_Centerprint_Generic(head, CPID_KH_MSG, strcat("All keys are in the ", ColoredTeamName(kh_interferemsg_team), "^7's hands!\n\nInterfere ^1NOW^7!"), 0, 0);
}
}
centerprint(initial_owner, strcat("You are starting with the ", key.netname, "\n")); // message to player at start of round
- WaypointSprite_Spawn("key-dropped", 0, 0, key, '0 0 1' * KH_KEY_WP_ZSHIFT, world, key.team, key, waypointsprite_attachedforcarrier, FALSE);
+ WaypointSprite_Spawn("key-dropped", 0, 0, key, '0 0 1' * KH_KEY_WP_ZSHIFT, world, key.team, key, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAG, '0 1 1');
key.waypointsprite_attachedforcarrier.waypointsprite_visible_for_player = kh_Key_waypointsprite_visible_for_player;
- WaypointSprite_UpdateTeamRadar(key.waypointsprite_attachedforcarrier, RADARICON_FLAG, '0 1 1');
kh_Key_AssignTo(key, initial_owner);
}
FOR_EACH_PLAYER(player)
if(clienttype(player) == CLIENTTYPE_REAL)
- centerprint_expire(player, CENTERPRIO_SPAM);
+ Send_CSQC_Centerprint_Generic_Expire(player, CPID_KH_MSG);
kh_tracking_enabled = TRUE;
}
FOR_EACH_PLAYER(player)
if(clienttype(player) == CLIENTTYPE_REAL)
- centerprint_expire(player, CENTERPRIO_SPAM);
+ Send_CSQC_Centerprint_Generic_Expire(player, CPID_KH_MSG);
for(i = 0; i < kh_teams; ++i)
{