summaryrefslogtreecommitdiff
path: root/src/cgame
diff options
context:
space:
mode:
Diffstat (limited to 'src/cgame')
-rw-r--r--src/cgame/cg_draw.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index fe81e269..4ae6792d 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -2913,12 +2913,22 @@ static qboolean CG_DrawQueue( void )
if( position < 1 )
return qfalse;
- switch( position )
+ switch( position % 100 )
{
- case 1: ordinal = "st"; break;
- case 2: ordinal = "nd"; break;
- case 3: ordinal = "rd"; break;
- default: ordinal = "th"; break;
+ case 11:
+ case 12:
+ case 13:
+ ordinal = "th";
+ break;
+ default:
+ switch( position % 10 )
+ {
+ case 1: ordinal = "st"; break;
+ case 2: ordinal = "nd"; break;
+ case 3: ordinal = "rd"; break;
+ default: ordinal = "th"; break;
+ }
+ break;
}
Com_sprintf( buffer, MAX_STRING_CHARS, "You are %d%s in the spawn queue",