fix username bug, fix animator spin bug
authorhgn <hgodden00@gmail.com>
Tue, 18 Jul 2023 18:51:02 +0000 (19:51 +0100)
committerhgn <hgodden00@gmail.com>
Tue, 18 Jul 2023 18:51:02 +0000 (19:51 +0100)
player_skate.c
skaterift.c
steam.h

index d56fc982787b323111af1849b44ce185362ccb6a..f971b18037da760d075f57342cb73ffb152df6f3 100644 (file)
@@ -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 );
 
index 9781920b88c596e41265a37b633c4b6651db38b8..357c59375710d67a9285b9e2c8ef250884935f99 100644 (file)
@@ -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 09e3935aecff37421f81fd31058136961a3bf3e6..251c51e85c00b36bc6a3e9019b953f7fbc595d38 100644 (file)
--- 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" );