dusting
[carveJwlIkooP6JGAAIwe30JlM.git] / player.c
index 01a0b526bed5eac40cc619d48c83235029ddb075..a73122c57c5351cf5afa929b6b3ff995490fe3be 100644 (file)
--- a/player.c
+++ b/player.c
@@ -134,8 +134,10 @@ void player__use_texture( player_instance *player, vg_tex2d *tex )
 PLAYER_API
 void player__bind( player_instance *player )
 {
-   player__skate_bind( player );
-   player__walk_bind( player );
+   for( u32 i=0; i<vg_list_size(_player_bind); i++ ){
+      if( _player_bind[i] )
+         _player_bind[i]( player );
+   }
 }
 
 /*
@@ -291,6 +293,9 @@ VG_STATIC void gate_rotate_angles( ent_gate *gate, v3f angles, v3f d )
 PLAYER_API
 void player__pass_gate( player_instance *player, ent_gate *gate )
 {
+   world_routes_fracture( get_active_world(), gate, 
+                          player->rb.co, player->rb.v );
+
    player->gate_waiting = gate;
    world_routes_activate_entry_gate( get_active_world(), gate );
 
@@ -362,8 +367,9 @@ VG_STATIC void player__pre_render( player_instance *player )
    v3f vp0 = {0.0f,0.1f, 0.55f},
        vp1 = {0.0f,0.1f,-0.55f};
 
-   m4x3_mulv( av->sk.final_mtx[ av->id_board ], vp0, TEMP_BOARD_0 );
-   m4x3_mulv( av->sk.final_mtx[ av->id_board ], vp1, TEMP_BOARD_1 );
+   struct ub_world_lighting *ubo = &get_active_world()->ub_lighting;
+   m4x3_mulv( av->sk.final_mtx[ av->id_board ], vp0, ubo->g_board_0 );
+   m4x3_mulv( av->sk.final_mtx[ av->id_board ], vp1, ubo->g_board_1 );
 
    if( player->rewinding ){
       if( player->rewind_time <= 0.0f ){