X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_animation.h;h=594f282c3be7e8917bcb111a98d84080dbc17c1d;hb=47941822dae18a018c985847b052e70214a3ccc6;hp=9f0c0d536e832c7d39c8927d4589ec12c3685b6d;hpb=4f96bd0040e35ecb21d353ee2b895129682d22c1;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_animation.h b/player_animation.h index 9f0c0d5..594f282 100644 --- a/player_animation.h +++ b/player_animation.h @@ -7,7 +7,7 @@ #include "player.h" -static void player_animate_offboard(void) +VG_STATIC void player_animate_offboard(void) { { float fly = player.phys.in_air, @@ -83,7 +83,7 @@ static void player_animate_offboard(void) skeleton_debug( &player.mdl.sk ); } -static void player_animate(void) +VG_STATIC void player_animate(void) { struct player_phys *phys = &player.phys; rb_extrapolate_transform( &player.phys.rb, player.visual_transform ); @@ -274,7 +274,7 @@ static void player_animate(void) skeleton_debug( &player.mdl.sk ); } -static void player_animate_death_cam(void) +VG_STATIC void player_animate_death_cam(void) { v3f delta; v3f head_pos; @@ -300,14 +300,17 @@ static void player_animate_death_cam(void) if( ray_world( sample, (v3f){0.0f,-1.0f,0.0f}, &hit )) v3_add( hit.pos, min_height, player.camera_pos ); - player.camera_pos[1] = - vg_maxf( wrender.height + 2.0f, player.camera_pos[1] ); + if( world.water.enabled ) + { + player.camera_pos[1] = + vg_maxf( world.water.height + 2.0f, player.camera_pos[1] ); + } player.angles[0] = atan2f( delta[0], -delta[2] ); player.angles[1] = -asinf( delta[1] ); } -static void player_animate_camera(void) +VG_STATIC void player_animate_camera(void) { struct player_phys *phys = &player.phys;