From 5459648575c5dce5e34e2c21323dea5ff7005917 Mon Sep 17 00:00:00 2001 From: Bryce Hutchings Date: Tue, 18 Jun 2002 09:23:23 +0000 Subject: [PATCH] small callvote upgrade --- reaction/game/g_cmds.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/reaction/game/g_cmds.c b/reaction/game/g_cmds.c index bd4e1422..533b21a2 100644 --- a/reaction/game/g_cmds.c +++ b/reaction/game/g_cmds.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.133 2002/06/18 09:23:23 niceass +// small callvote upgrade +// // Revision 1.132 2002/06/18 03:57:38 jbravo // Committing for aasimon. Callvote nextmap removed and replaced with cyclemap for .ini // @@ -1797,9 +1800,9 @@ void Cmd_CallVote_f(gentity_t * ent) } else if (!Q_stricmp(arg1, "kick")) { } else if (!Q_stricmp(arg1, "clientkick")) { } else { - trap_SendServerCommand(ent - g_entities, "print \"Invalid vote string.\n\""); - trap_SendServerCommand(ent - g_entities, - "print \"Vote commands are: cyclemap, map , g_gametype , kick , clientkick .\n\""); + trap_SendServerCommand(ent - g_entities, "print \"Invalid vote command.\n\""); + trap_SendServerCommand(ent - g_entities, + "print \"Valid vote commands are: cyclemap, map , g_gametype , kick , and clientkick .\n\""); return; } @@ -1823,6 +1826,11 @@ void Cmd_CallVote_f(gentity_t * ent) // this allows a player to change maps, but not upset the map rotation char s[MAX_STRING_CHARS]; + if ( !G_FileExists(va("maps/%s.bsp", arg2)) ) { + trap_SendServerCommand(ent - g_entities, va("print \"The map %s does not exist.\n\"", arg2)); + return; + } + trap_Cvar_VariableStringBuffer("nextmap", s, sizeof(s)); if (*s) { Com_sprintf(level.voteString, sizeof(level.voteString), "%s %s; set nextmap \"%s\"", arg1, arg2,