diff options
author | Andrey Nazarov <skuller@skuller.net> | 2008-03-26 20:17:21 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2008-03-26 20:17:21 +0000 |
commit | 2e5bdb7d4141cd6eb690ceca234fd2cf62410cff (patch) | |
tree | 7d5a1500d396ad593036fa260e57c67438844ab4 /source/mvd_parse.c | |
parent | a2b6e72158970ffbe789776649c07107b9cfb553 (diff) |
CM loading code no longer calls Com_Error.
Made endianness conversion macros return unsigned integers.
Diffstat (limited to 'source/mvd_parse.c')
-rw-r--r-- | source/mvd_parse.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source/mvd_parse.c b/source/mvd_parse.c index 457829e..b968539 100644 --- a/source/mvd_parse.c +++ b/source/mvd_parse.c @@ -890,6 +890,7 @@ static void MVD_ParseServerData( mvd_t *mvd ) { int protocol; int length, index; char *gamedir, *string, *p; + const char *error; uint32_t checksum; int i; mvd_player_t *player; @@ -976,16 +977,13 @@ static void MVD_ParseServerData( mvd_t *mvd ) { strcpy( mvd->mapname, string + 5 ); // skip "maps/" mvd->mapname[length - 9] = 0; // cut off ".bsp" - // check if map exists so CM_LoadMap does not kill - // entire server if it does not - if( FS_LoadFile( string, NULL ) == -1 ) { - MVD_Destroyf( 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( "[%s] Loading %s...\n", mvd->name, string ); - CM_LoadMap( &mvd->cm, string, CM_LOAD_VISONLY, &checksum ); + error = CM_LoadMapEx( &mvd->cm, string, CM_LOAD_VISONLY, &checksum ); + if( error ) { + MVD_Destroyf( mvd, "Couldn't load %s: %s", string, error ); + } #if USE_MAPCHECKSUM if( checksum != atoi( mvd->configstrings[CS_MAPCHECKSUM] ) ) { |