X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_walk.c;h=cd5e52c7a3f9ddd9d1950820e039c8127cbfb4fa;hb=859178c6d4b2a9b9a95f8b01b113f589ce0f197f;hp=6b0def6c9133831e174c3dbea412bb7067cc25ab;hpb=171b279a489f1b906265759b33249f61d48d3d5f;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_walk.c b/player_walk.c index 6b0def6..cd5e52c 100644 --- a/player_walk.c +++ b/player_walk.c @@ -1,5 +1,7 @@ -#ifndef PLAYER_WALK_C -#define PLAYER_WALK_C +#pragma once + +#include "vg/vg_rigidbody_collision.h" +#include "scene_rigidbody.h" #include "player.h" #include "input.h" @@ -489,7 +491,7 @@ static void player_walk_update_generic(void){ w->surface = k_surface_prop_concrete; for( int i=0; in ) ){ @@ -562,7 +564,7 @@ static void player_walk_update_generic(void){ */ for( int j=0; j<5; j++ ){ for( int i=0; in ); @@ -892,6 +894,13 @@ static void player__walk_animate(void){ } else localplayer.cam_velocity_influence = 0.0f; + + if( w->state.activity == k_walk_activity_sit ){ + localplayer.cam_dist = 3.8f; + } + else { + localplayer.cam_dist = 1.8f; + } } static void player_walk_pose_sit( struct player_walk_animator *animator, @@ -1181,4 +1190,3 @@ static void player__walk_sfx_oneshot( u8 id, v3f pos, f32 volume ){ audio_unlock(); } -#endif /* PLAYER_DEVICE_WALK_H */