X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_physics.h;h=6a744e877a4e8107fb6aa16645e04e5e03353de2;hb=2a238d32da833812e837cf38e16a7685c98db5c3;hp=a2aabff741f946f4ddd37d1471bde817f60e78a3;hpb=02e138a27fd43ed09bc1869691a8a3a4224d0132;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_physics.h b/player_physics.h index a2aabff..6a744e8 100644 --- a/player_physics.h +++ b/player_physics.h @@ -1366,6 +1366,12 @@ VG_STATIC void player_freecam(void) v3_add( move_vel, player.camera_pos, player.camera_pos ); } +VG_STATIC int kill_player( int argc, char const *argv[] ) +{ + player_kill(); + return 0; +} + VG_STATIC int reset_player( int argc, char const *argv[] ) { struct player_phys *phys = &player.phys; @@ -1428,10 +1434,12 @@ VG_STATIC int reset_player( int argc, char const *argv[] ) v3f delta = {1.0f,0.0f,0.0f}; m3x3_mulv( the_long_way, delta, delta ); - - player.angles[0] = atan2f( delta[0], -delta[2] ); - player.angles[1] = -asinf( delta[1] ); - + + if( !freecam ) + { + player.angles[0] = atan2f( delta[0], -delta[2] ); + player.angles[1] = -asinf( delta[1] ); + } v4_copy( rp->q, phys->rb.q ); v3_copy( rp->co, phys->rb.co );