summaryrefslogtreecommitdiff
path: root/source/mvd_parse.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2007-09-16 19:57:58 +0000
committerAndrey Nazarov <skuller@skuller.net>2007-09-16 19:57:58 +0000
commite68f49dd90d1650880d7124ec0a909b49805a83c (patch)
treefb50637055786c87caf262f1d58b1fb8ebe6025c /source/mvd_parse.c
parenta9eefaa6dd9de85d28626fd2f141a38a3148caed (diff)
MVD client now makes sure mapfile exists before doing CM_LoadMap.
Fixed MVD client not being killed in case of Com_Error resulting in a crash. Made server HTML output pass formal validation. Fixed COM_AppendExtension. Pack usercmd button mask into 3 bits instead of 8. Bumped minor Q2PRO protocol version.
Diffstat (limited to 'source/mvd_parse.c')
-rw-r--r--source/mvd_parse.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/mvd_parse.c b/source/mvd_parse.c
index ebf3e9a..dd24697 100644
--- a/source/mvd_parse.c
+++ b/source/mvd_parse.c
@@ -865,7 +865,14 @@ static void MVD_ParseServerData( mvd_t *mvd ) {
strcpy( mvd->mapname, string + 5 ); // skip "maps/"
mvd->mapname[length - 9] = 0; // cut off ".bsp"
- // load the world model (we are only interesed in visibility info)
+ // check if map exists so CM_LoadMap does not kill
+ // entire server if it does not
+ if( FS_LoadFile( string, NULL ) == -1 ) {
+ MVD_Destroy( mvd, "Couldn't find map: %s", string );
+ }
+
+ // load the world model (we are only interesed in
+ // visibility info, do not load brushes and such)
Com_Printf( "Loading %s...\n", string );
CM_LoadMap( &mvd->cm, string, CM_LOAD_VISONLY, &checksum );