summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorM. Kristall <mkpdev@gmail.com>2009-10-05 04:44:45 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:16:39 +0000
commitddb1d8ec4db9c2ac69b7313fbfb6d10347a4d3e8 (patch)
tree8b83aa68753bf2717ad30723e256ffb5baee464b
parent3c0790c7ec1bb2802ddd6d6cae713284b38bfd0a (diff)
* Fix ordinals in spawn queue to not display 21th, 22th, 23th etc.
* Try to be nice to log parsers
-rw-r--r--src/cgame/cg_draw.c20
-rw-r--r--src/game/bg_public.h6
-rw-r--r--src/game/g_combat.c6
3 files changed, 21 insertions, 11 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",
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index 22391537..a42fb735 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -871,8 +871,6 @@ typedef enum
MOD_TELEFRAG,
MOD_FALLING,
MOD_SUICIDE,
- MOD_DECONSTRUCT,
- MOD_NOCREEP,
MOD_TARGET_LASER,
MOD_TRIGGER_HURT,
@@ -900,7 +898,9 @@ typedef enum
MOD_ASPAWN,
MOD_ATUBE,
- MOD_OVERMIND
+ MOD_OVERMIND,
+ MOD_DECONSTRUCT,
+ MOD_NOCREEP
} meansOfDeath_t;
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index afa613a4..adc02f7f 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -98,8 +98,6 @@ char *modNames[ ] =
"MOD_TELEFRAG",
"MOD_FALLING",
"MOD_SUICIDE",
- "MOD_DECONSTRUCT",
- "MOD_NOCREEP",
"MOD_TARGET_LASER",
"MOD_TRIGGER_HURT",
@@ -127,7 +125,9 @@ char *modNames[ ] =
"MOD_ASPAWN",
"MOD_ATUBE",
- "MOD_OVERMIND"
+ "MOD_OVERMIND",
+ "MOD_DECONSTRUCT",
+ "MOD_NOCREEP"
};
/*