X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_common.c;h=f807e3a580f2213b41700d96fc85b9c7e15d73ef;hb=02e5027d274fc66fecca0572d0998e2c562da7a7;hp=110ee1640e33d0fd85816c44ee6d05a67a5b629d;hpb=223e75026f958029f9664380ed20a5daa3ee2ae7;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_common.c b/player_common.c index 110ee16..f807e3a 100644 --- a/player_common.c +++ b/player_common.c @@ -1,6 +1,7 @@ #ifndef PLAYER_COMMON_C #define PLAYER_COMMON_C +#include "ent_skateshop.h" #include "player.h" #include "conf.h" #include "input.h" @@ -236,6 +237,8 @@ VG_STATIC void player__cam_iterate( player_instance *player ) VG_STATIC void player_look( player_instance *player, v3f angles ) { + if( vg_ui.wants_mouse ) return; + angles[2] = 0.0f; v2f mouse_input; @@ -253,8 +256,21 @@ VG_STATIC void player_look( player_instance *player, v3f angles ) input_y *= -1.0f; angles[1] += input_y; - angles[1] = vg_clampf( angles[1], -VG_PIf*0.5f, VG_PIf*0.5f ); } +struct player_board *player_get_player_board( struct player_instance *player ) +{ + struct player_board *board = NULL; + + if( localplayer.board_view_slot ){ + struct cache_board *cache_view = localplayer.board_view_slot; + if( cache_view->state == k_cache_board_state_loaded ){ + board = &cache_view->board; + } + } + + return board; +} + #endif /* PLAYER_COMMON_C */