X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;ds=inline;f=player.c;h=23cb5fcaf4ceeaae7f8d09c020be987e08d5fba0;hb=874c9d7e6ee2d826f9eb34518e8163283439c38e;hp=b1788c626e8a410d148849144afa4bed296592ed;hpb=2c91a71533b4ce86b9e7fd708420ae05c74d8f52;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player.c b/player.c index b1788c6..23cb5fc 100644 --- a/player.c +++ b/player.c @@ -11,6 +11,7 @@ #include "network.h" #include "network_common.h" #include "world_routes.h" +#include "ent_miniworld.h" static int localplayer_cmd_respawn( int argc, const char *argv[] ){ ent_spawn *rp = NULL, *r; @@ -131,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 ); @@ -208,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(); @@ -234,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();