grid based
[carveJwlIkooP6JGAAIwe30JlM.git] / skaterift.c
index 9e162b2c322af6695a7857e08275c1c726910744..a410301d171e836ae82697678606ce19a4941ef2 100644 (file)
@@ -257,13 +257,15 @@ VG_STATIC void vg_load(void)
    world_audio_init();
 
    /* 'systems' are completely loaded now */
-#if 0
-   strcpy( world.world_name, "maps/mp_mtzero.mdl" );
-   strcpy( world.world_name, "maps/mp_gridmap.mdl" );
-#endif
 
    /* load home world */
    world_load( &world_global.worlds[0], "maps/mp_home.mdl" );
+
+   world_load( &world_global.worlds[1], "maps/mp_gridmap.mdl" );
+   world_load( &world_global.worlds[2], "maps/mp_mtzero.mdl" );
+   world_link_nonlocal_gates( 0, 1 );
+   world_link_nonlocal_gates( 0, 2 );
+
    vg_console_load_autos();
 }
 
@@ -411,8 +413,8 @@ VG_STATIC void render_scene(void)
    /* Draw world */
    glEnable( GL_DEPTH_TEST );
 
-   world_instance *world = get_active_world();
-   render_world( world, &main_camera );
+   world_instance *view_world = localplayer.viewable_world;
+   render_world( view_world, &main_camera );
 
    int player_transparent = 1,
        player_draw        = 1;
@@ -427,10 +429,10 @@ VG_STATIC void render_scene(void)
       player__render( &main_camera, &localplayer );
 
 
-   render_water_texture( world, &main_camera );
+   render_water_texture( view_world, &main_camera );
    render_fb_bind( gpipeline.fb_main );
-   render_water_surface( world, &main_camera );
-   render_world_gates( world, &main_camera );
+   render_water_surface( view_world, &main_camera );
+   render_world_gates( view_world, &main_camera );
 
    if( player_transparent && player_draw )
       render_player_transparent();