summaryrefslogtreecommitdiff
path: root/source/mvd_parse.c
diff options
context:
space:
mode:
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 );