dusting
[carveJwlIkooP6JGAAIwe30JlM.git] / player.c
index 28adfd0df4095cd9f1c6eb383a05c69ccb46f9d1..a73122c57c5351cf5afa929b6b3ff995490fe3be 100644 (file)
--- a/player.c
+++ b/player.c
@@ -134,9 +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 );
-   player__drive_bind( player );
+   for( u32 i=0; i<vg_list_size(_player_bind); i++ ){
+      if( _player_bind[i] )
+         _player_bind[i]( player );
+   }
 }
 
 /*
@@ -366,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 ){