#include "player.h"
-static void player_animate_offboard(void)
+VG_STATIC void player_animate_offboard(void)
{
{
float fly = player.phys.in_air,
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 );
offset[1] *= -0.3f;
offset[2] *= 0.01f;
- offset[0] = vg_clampf( offset[0], -0.8f, 0.8f );
- offset[1] = vg_clampf( offset[1], -0.5f, 0.0f );
+ offset[0]=vg_clampf(offset[0],-0.8f,0.8f)*(1.0f-fabsf(player.fslide)*0.9f);
+ offset[1]=vg_clampf(offset[1],-0.5f,0.0f);
/*
* Animation blending
skeleton_lerp_pose( sk, ground_pose, air_pose, player.ffly, apose );
- float add_grab_mod = 1.0f - player.ffly*phys->grab;
+ float add_grab_mod = 1.0f - player.ffly;//*phys->grab;
/* additive effects */
{
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;
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;