mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 22:50:45 +00:00
[+] Inline support for gltf maps; add "inline" 0 property to an idStaticEntity or func_static to not inlude it in the map bsp. Defaults to 1
This commit is contained in:
parent
98ed96adf4
commit
9589ea300d
1 changed files with 7 additions and 3 deletions
|
@ -370,10 +370,11 @@ int idMapEntity::GetEntities( gltfData* data, EntityListRef entities, int sceneI
|
|||
}
|
||||
else
|
||||
{
|
||||
idStr classname = node->extras.strPairs.GetString( "classname" );
|
||||
idStr classnameStr = node->extras.strPairs.GetString( "classname" );
|
||||
bool skipInline = !node->extras.strPairs.GetBool("inline",true);
|
||||
|
||||
// skip everything that is not an entity
|
||||
if( !classname.IsEmpty() )
|
||||
if( !classnameStr.IsEmpty())
|
||||
{
|
||||
idMapEntity* newEntity = new( TAG_IDLIB_GLTF ) idMapEntity();
|
||||
entities.Append( newEntity );
|
||||
|
@ -418,7 +419,10 @@ int idMapEntity::GetEntities( gltfData* data, EntityListRef entities, int sceneI
|
|||
#endif
|
||||
|
||||
// add meshes from all subnodes
|
||||
ProcessSceneNode_r( newEntity, node, mat4_identity, worldToEntityTransform, data );
|
||||
if (!skipInline)
|
||||
{
|
||||
ProcessSceneNode_r(newEntity, node, mat4_identity, worldToEntityTransform, data);
|
||||
}
|
||||
|
||||
entityCount++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue