diff options
author | Tim Angus <tim@ngus.net> | 2009-10-03 12:47:15 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:16:14 +0000 |
commit | c4fe8300adef0b3d63152c419f9411f14eb41831 (patch) | |
tree | 9384cc90a6e6fd23f3cdff90bfc5c85e5062f7b6 | |
parent | d8156afbb123a3493e2205b5f5b95ad8b98b172b (diff) |
* Use the MN_ system for team lock and player limit messages
-rw-r--r-- | src/cgame/cg_servercmds.c | 25 | ||||
-rw-r--r-- | src/game/bg_public.h | 3 | ||||
-rw-r--r-- | src/game/g_cmds.c | 12 |
3 files changed, 30 insertions, 10 deletions
diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c index 28f42553..ae3e179e 100644 --- a/src/cgame/cg_servercmds.c +++ b/src/cgame/cg_servercmds.c @@ -511,17 +511,38 @@ void CG_Menu( int menu, int arg ) type = DT_COMMAND; break; + case MN_A_TEAMLOCKED: + longMsg = "The alien team is locked. You cannot join the aliens " + "at this time."; + shortMsg = "The alien team is locked"; + type = DT_COMMAND; + break; + + case MN_H_TEAMLOCKED: + longMsg = "The human team is locked. You cannot join the humans " + "at this time."; + shortMsg = "The human team is locked"; + type = DT_COMMAND; + break; + + case MN_PLAYERLIMIT: + longMsg = "The maximum number of playing clients has been reached. " + "Please wait until slots become available."; + shortMsg = "No free player slots"; + type = DT_COMMAND; + break; + case MN_A_TEAMCHANGEBUILDTIMER: longMsg = "You cannot leave the Alien team until your build timer " "has expired."; - shortMsg = "You cannot change teams until your build timer expires."; + shortMsg = "You cannot change teams until your build timer expires"; type = DT_COMMAND; break; case MN_H_TEAMCHANGEBUILDTIMER: longMsg = "You cannot leave the Human team until your build timer " "has expired."; - shortMsg = "You cannot change teams until your build timer expires."; + shortMsg = "You cannot change teams until your build timer expires"; type = DT_COMMAND; break; diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 5be99588..d978127a 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -552,6 +552,9 @@ typedef enum MN_TEAM, MN_A_TEAMFULL, MN_H_TEAMFULL, + MN_A_TEAMLOCKED, + MN_H_TEAMLOCKED, + MN_PLAYERLIMIT, // cmd stuff MN_CMD_CHEAT, diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index ce96939c..ec00c8a4 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -525,7 +525,7 @@ void Cmd_Kill_f( gentity_t *ent ) } else if( ent->suicideTime > level.time ) { - trap_SendServerCommand( ent-g_entities, "print \"Suicide canceled\n\"" ); + trap_SendServerCommand( ent-g_entities, "print \"Suicide cancelled\n\"" ); ent->suicideTime = 0; } } @@ -584,8 +584,7 @@ void Cmd_Team_f( gentity_t *ent ) case TEAM_ALIENS: if( level.alienTeamLocked ) { - trap_SendServerCommand( ent-g_entities, - "print \"Alien team has been ^1LOCKED\n\"" ); + G_TriggerMenu( ent - g_entities, MN_A_TEAMLOCKED ); return; } else if( level.humanTeamLocked ) @@ -603,8 +602,7 @@ void Cmd_Team_f( gentity_t *ent ) case TEAM_HUMANS: if( level.humanTeamLocked ) { - trap_SendServerCommand( ent-g_entities, - "print \"Human team has been ^1LOCKED\n\"" ); + G_TriggerMenu( ent - g_entities, MN_H_TEAMLOCKED ); return; } else if( level.alienTeamLocked ) @@ -632,9 +630,7 @@ void Cmd_Team_f( gentity_t *ent ) if( team != TEAM_NONE && g_maxGameClients.integer && level.numPlayingClients >= g_maxGameClients.integer ) { - trap_SendServerCommand( ent-g_entities, va( "print \"The maximum number of " - "playing clients has been reached (g_maxGameClients = %d)\n\"", - g_maxGameClients.integer ) ); + G_TriggerMenu( ent - g_entities, MN_PLAYERLIMIT ); return; } |