mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-05-31 08:50:54 +00:00
gltf2 -> idMapFile fixes. dmap and map commands work
# Conflicts: # neo/idlib/containers/List.h
This commit is contained in:
parent
50bb904e22
commit
24845c7edf
14 changed files with 1823 additions and 1134 deletions
|
@ -1574,11 +1574,12 @@ bool idMapFile::Parse( const char* filename, bool ignoreRegion, bool osPath )
|
|||
}
|
||||
|
||||
bool isGTLF = false;
|
||||
if ( !src.IsLoaded( ) ) {
|
||||
if( !src.IsLoaded( ) )
|
||||
{
|
||||
// HVG: try loading a .gltf/glb second
|
||||
fullName.SetFileExtension( "glb" );
|
||||
isGTLF = src.LoadFile( fullName, osPath );
|
||||
if ( !isGTLF )
|
||||
if( !isGTLF )
|
||||
{
|
||||
fullName.SetFileExtension( "gltf" );
|
||||
isGTLF = src.LoadFile( fullName, osPath );
|
||||
|
@ -1601,7 +1602,7 @@ bool idMapFile::Parse( const char* filename, bool ignoreRegion, bool osPath )
|
|||
fileTime = src.GetFileTime();
|
||||
entities.DeleteContents( true );
|
||||
|
||||
if(!isGTLF && !src.ReadToken( &token ) )
|
||||
if( !isGTLF && !src.ReadToken( &token ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -1668,11 +1669,12 @@ bool idMapFile::Parse( const char* filename, bool ignoreRegion, bool osPath )
|
|||
}
|
||||
}
|
||||
}
|
||||
else if ( isGTLF )
|
||||
else if( isGTLF )
|
||||
{
|
||||
gltfParser->Load( fullName );
|
||||
idMapEntity::GetEntities(gltfParser->currentAsset,entities,0);
|
||||
}else
|
||||
idMapEntity::GetEntities( gltfParser->currentAsset, entities, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( token == "Version" )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue