fix some problems with world loader
[carveJwlIkooP6JGAAIwe30JlM.git] / world_load.c
index 18f405e03735e2cd3ac5caf7fe010c0a26488c08..586b804bdab166092747c428bbfd0c78ac3e331f 100644 (file)
@@ -68,6 +68,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 );
@@ -128,6 +129,9 @@ static void world_instance_load_mdl( u32 instance_id, const char *path ){
       board->data_len = 0;
    }
 
+   world->routes_ui = vg_linear_alloc( heap, 
+         sizeof(struct route_ui)*mdl_arrcount(&world->ent_route) );
+
    vg_async_call( async_world_postprocess, world, 0 );
    vg_async_stall();
 }