gui_helper_action( joystick_display_string(k_srjoystick_steer,2), "move" );
if( world_static.instances[0].status == k_world_status_loaded )
- gui_helper_action( axis_display_string(k_sraxis_mbrowse_h), "world" );
+ gui_helper_action( axis_display_string(k_sraxis_mworld_h), "world" );
gui_helper_action( button_display_string(k_srbind_maccept), "spawn" );
- gui_helper_action( axis_display_string(k_sraxis_mbrowse_v), "home" );
+ gui_helper_action( button_display_string(k_srbind_home), "home" );
if( button_down( k_srbind_mback ) ){
srinput.enabled = 0;
return;
}
- if( button_down( k_srbind_mleft ) ){
+ if( button_down( k_srbind_world_left ) ){
if( respawn_chooser.world_id > 0 )
respawn_chooser_setworld( respawn_chooser.world_id-1 );
}
- if( button_down( k_srbind_mright ) ){
+ if( button_down( k_srbind_world_right ) ){
u32 next = respawn_chooser.world_id+1;
if( next < vg_list_size(world_static.instances) )
respawn_chooser_setworld( next );
}
- if( button_down(k_srbind_mup) ){
+ if( button_down(k_srbind_home) ){
respawn_chooser.home_select ++;
if( respawn_chooser.home_select >= vg_list_size(respawn_homes) )
respawn_chooser.home_select = 0;
respawn_chooser_gohome();
}
- else if( button_down(k_srbind_mdown) ){
- if( respawn_chooser.home_select == 0 )
- respawn_chooser.home_select = vg_list_size(respawn_homes)-1;
- else
- respawn_chooser.home_select --;
- respawn_chooser_gohome();
- }
world_instance *world = &world_static.instances[ respawn_chooser.world_id ];
v3f *bbx = world->scene_geo.bbx;
if( respawn_chooser.spawn )
v3_copy( respawn_chooser.spawn->transform.co, uSpawnPos );
+ uPlayerPos[3] = v3_dist(uPlayerPos,uSpawnPos);
+ uSpawnPos[3] = 1.0f/uPlayerPos[3];
+
shader_scene_override_uPlayerPos( uPlayerPos );
shader_scene_override_uSpawnPos( uSpawnPos );
}