full walk animator compression
[carveJwlIkooP6JGAAIwe30JlM.git] / player_walk.c
index ec025a17630e4e52bf2cb77d7982802ed4abdfd1..1306e2a012258fbbb0b8169fea8df21b4ec09720 100644 (file)
@@ -962,4 +962,21 @@ static void player__walk_reset( ent_spawn *rp ){
    w->state.outro_start_time = 0.0;
 }
 
+static void player__walk_animator_exchange( bitpack_ctx *ctx, void *data ){
+   struct player_walk_animator *animator = data;
+   //bitpack_bytes( ctx, sizeof(*animator), animator );
+   bitpack_bytes( ctx, sizeof(animator->root_co), animator->root_co );
+   bitpack_qquat( ctx, animator->root_q );
+   bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->fly );
+   bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->run );
+   bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->walk );
+   bitpack_qf32( ctx, 16, 0.0f, 120.0f, &animator->walk_timer );
+
+   /* we can do variable length exchanges now? */
+
+   bitpack_bytes( ctx, sizeof(animator->foot_anchor), animator->foot_anchor );
+   bitpack_bytes( ctx, 8, &animator->outro_type );
+   bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->outro_t );
+   bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->commit_t );
+}
 #endif /* PLAYER_DEVICE_WALK_H */