[HL25] Backport changes to CS bot place loading code
This commit is contained in:
parent
fd8a11b01b
commit
6d95ec7d03
1 changed files with 9 additions and 3 deletions
|
@ -139,7 +139,7 @@ public:
|
|||
}
|
||||
|
||||
/// load the directory
|
||||
void Load( SteamFile *file )
|
||||
bool Load( SteamFile *file )
|
||||
{
|
||||
// read number of entries
|
||||
EntryType count;
|
||||
|
@ -156,7 +156,7 @@ public:
|
|||
if ( len >= sizeof( placeName ) )
|
||||
{
|
||||
assert( false && "PlaceDirectory::Load: Invalid placeName size" );
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
file->Read( placeName, len );
|
||||
|
@ -164,6 +164,8 @@ public:
|
|||
|
||||
AddPlace( TheBotPhrases->NameToID( placeName ) );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -1020,7 +1022,11 @@ NavErrorType LoadNavigationMap( void )
|
|||
// load Place directory
|
||||
if (version >= 5)
|
||||
{
|
||||
placeDirectory.Load( &navFile );
|
||||
if ( !placeDirectory.Load( &navFile ) )
|
||||
{
|
||||
CONSOLE_ECHO( "ERROR: Invalid navigation file '%s'.\n", filename );
|
||||
return NAV_INVALID_FILE;
|
||||
}
|
||||
}
|
||||
|
||||
// get number of areas
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue