update vg
[carveJwlIkooP6JGAAIwe30JlM.git] / world_routes.h
index 00dee4ea0c79d742a78ad3c023cce8d3f1ed7f65..f5add0bb6ba162d336509e66935debc6b2dd288d 100644 (file)
@@ -103,7 +103,7 @@ VG_STATIC void world_routes_time_lap( world_instance *world, ent_route *route )
       }
 
       last_version = rg->timing_version;
-      vg_info( "%u %f\n", rg, rg->timing_version, rg->timing_time );
+      vg_info( "%u %f\n", rg->timing_version, rg->timing_time );
    }
 
    if( world_global.current_run_version == last_version+1 ){
@@ -134,10 +134,19 @@ VG_STATIC void world_routes_time_lap( world_instance *world, ent_route *route )
 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 );