X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_load.c;h=5ab2dfb0793e80ce9e5670bd0b4e055fbba5ac83;hb=6e6c7f31b8f17af3814727109e48fc6f85ef04b1;hp=379a7de3ee60049999f69401b65af7819a44df5b;hpb=810a45773a2ade051c5ffb50321dab89bd2a45e9;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_load.c b/world_load.c index 379a7de..5ab2dfb 100644 --- a/world_load.c +++ b/world_load.c @@ -45,6 +45,8 @@ static void world_instance_load_mdl( u32 instance_id, const char *path ){ mdl_load_animation_block( meta, world->heap ); mdl_load_mesh_block( meta, world->heap ); + vg_info( "%u\n", sizeof(ent_cubemap) ); + MDL_LOAD_ARRAY( meta, &world->ent_gate, ent_gate, heap ); MDL_LOAD_ARRAY( meta, &world->ent_camera, ent_camera, heap ); MDL_LOAD_ARRAY( meta, &world->ent_spawn, ent_spawn, heap ); @@ -68,6 +70,7 @@ static void world_instance_load_mdl( u32 instance_id, const char *path ){ MDL_LOAD_ARRAY( meta, &world->ent_cubemap, ent_cubemap, heap ); MDL_LOAD_ARRAY( meta, &world->ent_miniworld, ent_miniworld, heap ); MDL_LOAD_ARRAY( meta, &world->ent_prop, ent_prop, heap ); + MDL_LOAD_ARRAY( meta, &world->ent_region, ent_region, heap ); mdl_array_ptr infos; MDL_LOAD_ARRAY( meta, &infos, ent_worldinfo, vg_mem.scratch ); @@ -87,6 +90,7 @@ static void world_instance_load_mdl( u32 instance_id, const char *path ){ world->info.pstr_desc = 0; world->info.pstr_name = 0; world->info.timezone = 0.0f; + world->info.flags = 0; } time_t seconds = time(NULL) % ((u32)vg_maxf(1.0f,k_day_length)*60); @@ -408,7 +412,7 @@ static void world_free( world_instance *world ){ glDeleteTextures( 1, &world->tex_light_cubes ); /* delete textures and meshes */ - glDeleteTextures( world->texture_count, world->textures ); + glDeleteTextures( world->texture_count-1, world->textures+1 ); u32 world_index = world - world_static.instances; if( world_index ){