2001-12-31 16:16:59 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// $Id$
|
|
|
|
//
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//
|
2001-12-31 16:28:42 +00:00
|
|
|
// $Log$
|
2002-06-16 20:06:15 +00:00
|
|
|
// Revision 1.5 2002/06/16 20:06:13 jbravo
|
|
|
|
// Reindented all the source files with "indent -kr -ut -i8 -l120 -lc120 -sob -bad -bap"
|
|
|
|
//
|
2002-01-11 19:48:33 +00:00
|
|
|
// Revision 1.4 2002/01/11 19:48:29 jbravo
|
|
|
|
// Formatted the source in non DOS format.
|
|
|
|
//
|
2001-12-31 16:28:42 +00:00
|
|
|
// Revision 1.3 2001/12/31 16:28:41 jbravo
|
|
|
|
// I made a Booboo with the Log tag.
|
|
|
|
//
|
2001-12-31 16:16:59 +00:00
|
|
|
//
|
|
|
|
//-----------------------------------------------------------------------------
|
2001-05-06 20:50:27 +00:00
|
|
|
// cg_rankings.c -- client global rankings system
|
|
|
|
|
|
|
|
#include "cg_local.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
================
|
|
|
|
CG_RankRunFrame
|
|
|
|
================
|
|
|
|
*/
|
|
|
|
|
|
|
|
void CG_RankRunFrame(void)
|
|
|
|
{
|
2002-06-16 20:06:15 +00:00
|
|
|
grank_status_t status;
|
2001-05-06 20:50:27 +00:00
|
|
|
|
2002-06-16 20:06:15 +00:00
|
|
|
if (!cgs.localServer)
|
2001-05-06 20:50:27 +00:00
|
|
|
trap_CL_RankPoll();
|
2002-06-16 20:06:15 +00:00
|
|
|
|
2001-05-06 20:50:27 +00:00
|
|
|
status = trap_CL_RankUserStatus();
|
2002-06-16 20:06:15 +00:00
|
|
|
|
|
|
|
if (cgs.client_status != status) {
|
2001-05-06 20:50:27 +00:00
|
|
|
// GRank status changed
|
2002-06-16 20:06:15 +00:00
|
|
|
|
2001-05-06 20:50:27 +00:00
|
|
|
// inform UI of current status
|
2002-06-16 20:06:15 +00:00
|
|
|
trap_Cvar_Set("client_status", va("%i", (int) (status)));
|
|
|
|
|
2001-05-06 20:50:27 +00:00
|
|
|
// show rankings status dialog if error
|
2002-06-16 20:06:15 +00:00
|
|
|
trap_CL_RankShowStatus((int) status);
|
|
|
|
|
2001-05-06 20:50:27 +00:00
|
|
|
cgs.client_status = status;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|