+
+ mdl_context mgate;
+ mdl_open( &mgate, "models/rs_gate.mdl", vg_mem.scratch );
+ mdl_load_metadata_block( &mgate, vg_mem.scratch );
+ mdl_load_mesh_block( &mgate, vg_mem.scratch );
+
+ mdl_mesh *surface = mdl_find_mesh( &mgate, "rs_gate" );
+ mdl_submesh *sm = mdl_arritm(&mgate.submeshs,surface->submesh_start);
+ world_global.sm_gate_surface = *sm;
+
+ const char *names[] = { "rs_gate_marker", "rs_gate_marker.001",
+ "rs_gate_marker.002", "rs_gate_marker.003" };
+
+ for( int i=0; i<4; i++ ){
+ mdl_mesh *marker = mdl_find_mesh( &mgate, names[i] );
+ sm = mdl_arritm( &mgate.submeshs, marker->submesh_start );
+ world_global.sm_gate_marker[i] = *sm;
+ }
+
+ mdl_close( &mgate );