X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;ds=sidebyside;f=player.c;h=23cb5fcaf4ceeaae7f8d09c020be987e08d5fba0;hb=874c9d7e6ee2d826f9eb34518e8163283439c38e;hp=fce9c488aaabf58f4e341881d497de9ede7c296e;hpb=7f4c71033c06954f3094c9d51219628438b80ac8;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player.c b/player.c index fce9c48..23cb5fc 100644 --- a/player.c +++ b/player.c @@ -132,16 +132,13 @@ static void player__pass_gate( u32 id ){ m4x3_mulv( gate->transport, cc->tpv_lpf, cc->tpv_lpf ); m3x3_mulv( gate->transport, cc->cam_velocity_smooth, cc->cam_velocity_smooth ); - m3x3_copy( localplayer.basis, localplayer.basis_gate ); - - v4f q; - m3x3_q( gate->transport, q ); - q_mul( q, localplayer.qbasis, localplayer.qbasis ); - q_normalize( localplayer.qbasis ); - q_m3x3( localplayer.qbasis, localplayer.basis ); - m3x3_transpose( localplayer.basis, localplayer.invbasis ); m4x3_mulv( gate->transport, localplayer.cam.pos, localplayer.cam.pos ); + + v3f v0; + v3_angles_vector( localplayer.angles, v0 ); + m3x3_mulv( gate->transport, v0, v0 ); + v3_angles( v0, localplayer.angles ); audio_lock(); audio_oneshot( &audio_gate_pass, 1.0f, 0.0f ); @@ -209,7 +206,6 @@ static void player__im_gui(void){ player__debugtext( 2, "player" ); player__debugtext( 1, "angles: " PRINTF_v3f( localplayer.cam.angles ) ); - player__debugtext( 1, "basis: " PRINTF_v4f( localplayer.qbasis ) ); if( player_subsystems[ localplayer.subsystem ]->im_gui ) player_subsystems[ localplayer.subsystem ]->im_gui(); @@ -235,10 +231,6 @@ static void player__reset(void){ rb_update_transform( &localplayer.rb ); - q_identity( localplayer.qbasis ); - m3x3_identity( localplayer.basis ); - m3x3_identity( localplayer.invbasis ); - localplayer.subsystem = k_player_subsystem_walk; player__walk_reset();