X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_common.c;h=e0343a07aee2fca7ef644f73af9dcfabb7768882;hb=9d5997f1e611b66c7220f7eb388f427032d8da79;hp=29ae05068a284d85a2c5fd013571232ae6d6878a;hpb=6e9b9e12e1f9da0419cd4d89707c7d599512d3b8;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_common.c b/player_common.c index 29ae050..e0343a0 100644 --- a/player_common.c +++ b/player_common.c @@ -57,21 +57,22 @@ VG_STATIC void player_camera_portal_correction( player_instance *player ) } } +static v3f TEMP_TPV_EXTRA; + VG_STATIC void player__cam_iterate( player_instance *player ) { struct player_avatar *av = player->playeravatar; - if( player->subsystem == k_player_subsystem_walk ) - { + if( player->subsystem == k_player_subsystem_walk ){ v3_copy( (v3f){-0.1f,1.8f,0.0f}, player->fpv_viewpoint ); v3_copy( (v3f){0.0f,0.0f,0.0f}, player->fpv_offset ); v3_copy( (v3f){0.0f,1.4f,0.0f}, player->tpv_offset ); } - else - { + else{ v3_copy( (v3f){0.0f,1.8f,0.0f}, player->fpv_viewpoint ); v3_copy( (v3f){-0.35f,0.0f,0.0f}, player->fpv_offset ); v3_copy( (v3f){0.0f,1.4f,0.0f}, player->tpv_offset ); + v3_add( TEMP_TPV_EXTRA, player->tpv_offset, player->tpv_offset ); } player->cam_velocity_constant = 0.25f;