VG_STATIC void world_routes_activate_entry_gate( world_instance *world,
ent_gate *rg )
{
- ent_gate *dest = mdl_arritm( &world->ent_gate, rg->target );
-
world_global.last_use = world_global.time;
+ /* disable all routes and leave the world */
+ if( rg->type == k_gate_type_nonlocel ){
+ for( u32 i=0; i<mdl_arrcount(&world->ent_route); i++ ){
+ ent_route *route = mdl_arritm( &world->ent_route, i );
+ route->active_checkpoint = 0xffff;
+ }
+ return;
+ }
+
+ ent_gate *dest = mdl_arritm( &world->ent_gate, rg->target );
+
for( u32 i=0; i<mdl_arrcount(&world->ent_route); i++ ){
ent_route *route = mdl_arritm( &world->ent_route, i );
VG_STATIC void world_routes_generate( world_instance *world )
{
vg_info( "Generating route meshes\n" );
- world->scene_lines = scene_init( world_global.generic_heap, 200000, 300000 );
+ world->scene_lines = scene_init( world->heap, 200000, 300000 );
for( u32 i=0; i<mdl_arrcount(&world->ent_gate); i++ ){
ent_gate *gate = mdl_arritm( &world->ent_gate, i );
scene_upload( world->scene_lines, &world->mesh_route_lines );
}
vg_release_thread_sync();
- vg_linear_del( world_global.generic_heap, world->scene_lines );
+ vg_linear_del( world->heap, world->scene_lines );
world_routes_clear( world );
}