diff options
author | Tony J. White <tjw@tjw.org> | 2006-12-04 15:55:13 +0000 |
---|---|---|
committer | Tony J. White <tjw@tjw.org> | 2006-12-04 15:55:13 +0000 |
commit | 2632826fb90eb7b00f6a234cbb18b7152b9f90ac (patch) | |
tree | b183e77f6b1deb80f882017c549745e3c1e85374 | |
parent | 94ce65288f321dc0ea8a6f6eda7e0d844d9a943c (diff) |
* (bug 2869) don't allow map votes for maps that do not exist ( M. Kristall )
-rw-r--r-- | src/game/g_cmds.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index c76e47bf..8601717b 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1122,6 +1122,13 @@ void Cmd_CallVote_f( gentity_t *ent ) } else if( !Q_stricmp( arg1, "map" ) ) { + if( trap_FS_FOpenFile( va( "maps/%s.bsp", arg2 ), NULL, FS_READ ) == -1 ) + { + trap_SendServerCommand( ent - g_entities, va( "print \"callvote: " + "'maps/%s.bsp' could not be found on the server\n\"", arg2 ) ); + return; + } + Com_sprintf( level.voteString, sizeof( level.voteString ), "%s %s", arg1, arg2 ); Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "Change to map \'%s\'", arg2 ); |