controls overlay
[carveJwlIkooP6JGAAIwe30JlM.git] / model.c
diff --git a/model.c b/model.c
index b8bacf280eac9863a5e5c8fcec4d240887196fde..9b704cd0df2196b4ccc556237dbd25cf1b5fa2a3 100644 (file)
--- a/model.c
+++ b/model.c
@@ -508,6 +508,16 @@ mdl_mesh *mdl_find_mesh( mdl_context *mdl, const char *name )
    return NULL;
 }
 
+mdl_submesh *mdl_find_submesh( mdl_context *mdl, const char *mesh_name )
+{
+   mdl_mesh *mesh = mdl_find_mesh( mdl, mesh_name );
+
+   if( !mesh ) return NULL;
+   if( !mesh->submesh_count ) return NULL;
+
+   return mdl_arritm( &mdl->submeshs, mesh->submesh_start );
+}
+
 struct payload_glmesh_load
 {
    mdl_vert *verts;