X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_gen.c;h=4e01de338cfbd70e5e9b4c4319535702825be504;hb=c0e4a67ba2f001179df6e2cde97370a946669c22;hp=7d3cc81dc30be79cdfd4c68df8d13e2b5d1e9e05;hpb=2c91a71533b4ce86b9e7fd708420ae05c74d8f52;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_gen.c b/world_gen.c index 7d3cc81..4e01de3 100644 --- a/world_gen.c +++ b/world_gen.c @@ -287,6 +287,17 @@ static void world_gen_generate_meshes( world_instance *world ){ } } + /* unpack region models */ + for( u32 i=0; ient_region ); i++ ){ + ent_region *region = mdl_arritm( &world->ent_region, i ); + + for( u32 j=0; jsubmesh_count; j ++ ){ + mdl_submesh *sm = mdl_arritm( &world->meta.submeshs, + region->submesh_start+j ); + world_unpack_submesh_dynamic( world, &world->scene_no_collide, sm ); + } + } + /* unpack gate models */ for( u32 i=0; ient_gate ); i++ ){ ent_gate *gate = mdl_arritm( &world->ent_gate, i ); @@ -300,6 +311,17 @@ static void world_gen_generate_meshes( world_instance *world ){ } } + /* unpack prop models */ + for( u32 i=0; ient_prop ); i++ ){ + ent_prop *prop = mdl_arritm( &world->ent_prop, i ); + + for( u32 j=0; jsubmesh_count; j ++ ){ + mdl_submesh *sm = mdl_arritm( &world->meta.submeshs, + prop->submesh_start+j ); + world_unpack_submesh_dynamic( world, &world->scene_no_collide, sm ); + } + } + vg_async_dispatch( call, async_scene_upload ); }