a fairly major physics update
[carveJwlIkooP6JGAAIwe30JlM.git] / player_physics.h
index a2aabff741f946f4ddd37d1471bde817f60e78a3..6a744e877a4e8107fb6aa16645e04e5e03353de2 100644 (file)
@@ -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 );