From 99df437e740aa12d6e578d15bcf14140f648a6d1 Mon Sep 17 00:00:00 2001 From: hgn Date: Tue, 18 Jul 2023 19:51:02 +0100 Subject: [PATCH] fix username bug, fix animator spin bug --- player_skate.c | 9 ++++----- skaterift.c | 2 +- steam.h | 5 ++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/player_skate.c b/player_skate.c index d56fc98..f971b18 100644 --- a/player_skate.c +++ b/player_skate.c @@ -2824,6 +2824,10 @@ VG_STATIC void player__skate_animate( player_instance *player ){ /* steer */ joystick_state( k_srjoystick_steer, animator->steer ); + animator->airdir = vg_lerpf( animator->airdir, -animator->steer[0], + 2.4f*vg.time_delta ); + + /* flip angle */ if( (s->state.activity <= k_skate_activity_air_to_grind) && (fabsf(s->state.flip_rate) > 0.01f) ){ @@ -2892,7 +2896,6 @@ VG_STATIC void player__skate_animate( player_instance *player ){ vg_line_arrow( player->rb.co, p1, 0.25f, VG__PINK ); vg_line_arrow( player->rb.co, p2, 0.25f, VG__PINK ); - } else q_identity( animator->qfixuptotal ); q_identity( animator->qfixuptotal ); @@ -2966,10 +2969,6 @@ VG_STATIC void player__skate_pose( player_instance *player, player_pose *pose ){ mdl_keyframe air_pose[32]; { - float target = -animator->steer[1]; - animator->airdir = vg_lerpf( animator->airdir, target, - 2.4f*vg.time_delta ); - float air_frame = (animator->airdir*0.5f+0.5f) * (15.0f/30.0f); skeleton_sample_anim( sk, s->anim_air, air_frame, apose ); diff --git a/skaterift.c b/skaterift.c index 9781920..357c593 100644 --- a/skaterift.c +++ b/skaterift.c @@ -13,7 +13,7 @@ #if 1 -#define SR_NETWORKED +//#define SR_NETWORKED #ifndef VG_RELEASE #define VG_DEVWINDOW diff --git a/steam.h b/steam.h index 09e3935..251c51e 100644 --- a/steam.h +++ b/steam.h @@ -212,9 +212,8 @@ VG_STATIC void str_utf8_collapse( const char *str, char *buf, u32 length ) buf[j] = 0x00; } -VG_STATIC int steam_init(void) -{ - const char *username = NULL; +VG_STATIC int steam_init(void){ + const char *username = "offline player"; #ifdef SR_NETWORKED vg_info( "Initializing steamworks\n" ); -- 2.25.1