X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=skaterift.c;h=e639d05eb0deade48ee1cab867f830fe6d903967;hb=5bfb36032928ba9f8d12e72961af68bfab9ea648;hp=40be41ef0c7b9d4732b35509f37239987c79d1e4;hpb=14b3d5c13faab36bd37ae27aa8c1501ba7146f89;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/skaterift.c b/skaterift.c index 40be41e..e639d05 100644 --- a/skaterift.c +++ b/skaterift.c @@ -146,12 +146,14 @@ static void skaterift_restore_state(void){ world_static.active_instance = vg_msg_seekkvu32( &world, "index", 0 ); world_static.active_trigger_volume_count = 0; localplayer.viewable_world = world_current_instance(); + } + + vg_msg_cmd position = vg_msg_seekkv( &world, "position", 0 ); + v3f pos; + vg_msg_convert_num( &position, k_vg_msg_float|k_vg_msg_32b, 3, pos ); - vg_msg_cmd position = vg_msg_seekkv( &world, "position", 0 ); - v3f pos; - vg_msg_convert_num( &position, k_vg_msg_float|k_vg_msg_32b, 3, pos ); + if( v3_length2(pos) > 1.0f ) player__setpos( &localplayer, pos ); - } } } @@ -507,10 +509,17 @@ VG_STATIC void render_main_game(void){ /* --------------------------------------------------------------------- */ - /* cubemaps TODO: Need a cubemap mark dirty thing for pordals */ world_instance *view_world = localplayer.viewable_world; if( view_world != NULL ){ render_world_cubemaps( view_world ); + + ent_gate *gate = view_world->rendering_gate; + if( gate ){ + if( gate->flags & k_ent_gate_nonlocal ){ + world_instance *dest = &world_static.instances[ gate->target ]; + render_world_cubemaps( dest ); + } + } } /* variable res target */