From 933fb1873e61061648d0ee183df915c76f47a9cc Mon Sep 17 00:00:00 2001 From: hgn Date: Wed, 4 Oct 2023 07:03:36 +0100 Subject: [PATCH] quantized positions --- player_skate.c | 2 +- player_walk.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/player_skate.c b/player_skate.c index 6ddb4ae..4bad1de 100644 --- a/player_skate.c +++ b/player_skate.c @@ -3190,7 +3190,7 @@ static void player__skate_reset( ent_spawn *rp ){ static void player__skate_animator_exchange( bitpack_ctx *ctx, void *data ){ struct player_skate_animator *animator = data; - bitpack_bytes( ctx, sizeof(animator->root_co), animator->root_co ); + bitpack_qv3f( ctx, 16, -1024.0f, 1024.0f, animator->root_co ); bitpack_qquat( ctx, animator->root_q ); bitpack_qv3f( ctx, 8, -1.0f, 1.0f, animator->offset ); diff --git a/player_walk.c b/player_walk.c index 6400d30..4619c2e 100644 --- a/player_walk.c +++ b/player_walk.c @@ -964,8 +964,8 @@ static void player__walk_reset( ent_spawn *rp ){ 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_qv3f( ctx, 16, -1024.0f, 1024.0f, 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 ); -- 2.25.1