fix some problems with world loader
[carveJwlIkooP6JGAAIwe30JlM.git] / skaterift.c
index c23d022fec2911716c2d79bc3cb4b8efb888f5e0..d8aae1bde47d3b99950d19b32a394b98ffb5fc77 100644 (file)
@@ -55,6 +55,7 @@
 #include "network.c"
 #include "player_remote.c"
 #include "vg/vg_audio_dsp.h"
+#include "world_routes_ui.c"
 
 static int k_tools_mode = 0;
 
@@ -194,10 +195,11 @@ static void vg_load(void){
    replay_clear( &skaterift.replay );
 
    player_load_animation_reference( "models/ch_none.mdl" );
-
    player_model_load( &localplayer.fallback_model, "models/ch_none.mdl" );
    player__bind();
 
+   player_board_load( &localplayer.fallback_board, "models/board_none.mdl" );
+
    /* --------------------- */
 
    vg_bake_shaders();
@@ -286,6 +288,7 @@ static void vg_pre_update(void){
    world_entity_focus_preupdate();
    skaterift_replay_pre_update();
    remote_sfx_pre_update();
+   skateshop_world_preupdate( world_current_instance() );
 
    world_update( world_current_instance(), localplayer.rb.co );
    audio_ambient_sprites_update( world_current_instance(), localplayer.rb.co );
@@ -464,7 +467,8 @@ static void render_scene(void){
       m4x3f identity;
       m4x3_identity( identity );
       render_world_override( world, world, identity, &skaterift.cam, 
-                             respawn_chooser.spawn, 1.0f );
+                             respawn_chooser.spawn, 
+                             (v4f){world->tar_min, world->tar_max, 1.0f, 0.0f});
       render_world_routes( world, world, identity, &skaterift.cam, 0, 1 );
       return;
    }
@@ -644,6 +648,7 @@ static void vg_gui(void){
    player__im_gui();
    world_instance *world = world_current_instance();
 
+   world_routes_imgui( world );
    skaterift_replay_imgui();
    workshop_form_gui();
    render_view_framebuffer_ui();