X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=character.h;h=df05295611492ecb41cbafafd266bf9623830c50;hb=89032d64e2867adb66e4598a0c66d3e853a22bb0;hp=daa2e991bae10f6a6884ffedc58174de55459182;hpb=be0f28b651e5c39943e476c0cd68c146e9952857;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/character.h b/character.h index daa2e99..df05295 100644 --- a/character.h +++ b/character.h @@ -434,6 +434,7 @@ void character_pose_blend( struct character *ch, character_pose *pose, float q ) v3_muladds( ch->cam_pos, pose->cam, q, ch->cam_pos ); } +#if 1 static void character_final_pose( struct character *ch, v3f cog, character_pose *pose, float q ) @@ -466,6 +467,34 @@ void character_final_pose( struct character *ch, v3f cog, character_pose_blend( ch, &npose, q ); } +#else +static +void character_final_pose( struct character *ch, v4f rot, + character_pose *pose, float q ) +{ + character_pose npose; + + m4x3f tr; + q_m3x3( rot, tr ); + v3_zero( tr[3] ); + + m4x3_mulv( tr, pose->b0, npose.b0 ); + m4x3_mulv( tr, pose->b1, npose.b1 ); + m4x3_mulv( tr, pose->p, npose.p ); + m4x3_mulv( tr, pose->pl, npose.pl ); + m4x3_mulv( tr, pose->pr, npose.pr ); + m4x3_mulv( tr, pose->hl, npose.hl ); + m4x3_mulv( tr, pose->hr, npose.hr ); + m4x3_mulv( tr, pose->apl, npose.apl ); + m4x3_mulv( tr, pose->apr, npose.apr ); + + v3_copy( pose->fr, npose.fr ); + v3_copy( pose->fl, npose.fl ); + v3_copy( pose->cam, npose.cam ); + + character_pose_blend( ch, &npose, q ); +} +#endif static void character_yaw_upper( struct character *ch, float yaw ) { @@ -884,9 +913,6 @@ static void character_debug_ragdoll( struct character *ch ) static void character_ragdoll_iter( struct character *ch ) { - /* TODO: Lots of the RB functions unimplemented here currently */ - - return; rb_solver_reset(); for( int i=0; iragdoll[i].v ); /* This used to be 20 iterations */ - for( int i=0; i<5; i++ ) + for( int i=0; i<10; i++ ) { float const k_springfactor = 1.0f/20.0f;