non-meaningful cleanup
[carveJwlIkooP6JGAAIwe30JlM.git] / player.c
index c115162099fb6d4b075ebcccb8f420b90eda5632..7a099f0fc16847c58d5862f22d0a97f0b5d2880f 100644 (file)
--- a/player.c
+++ b/player.c
@@ -114,7 +114,8 @@ static void player__update(void){
       player_subsystems[ localplayer.subsystem ]->update();
 }
 
-static void player__post_update(void){
+static void player__post_update(void)
+{
    struct player_subsystem_interface *sys = 
       player_subsystems[ localplayer.subsystem ];
 
@@ -128,7 +129,8 @@ static void player__post_update(void){
 /*
  * Applies gate transport to a player_interface
  */
-static void player__pass_gate( u32 id ){
+static void player__pass_gate( u32 id )
+{
    world_instance *world = world_current_instance();
    skaterift_record_frame( &skaterift.replay, 1 );
 
@@ -151,20 +153,16 @@ static void player__pass_gate( u32 id ){
 
    m4x3_mulv( gate->transport, localplayer.cam.pos, localplayer.cam.pos );
 
-   if( gate->flags & k_ent_gate_nonlocal ){
-      /* FIXME: Code dupe with world_load.c */
-      ent_spawn *rp = world_find_spawn_by_name( world, "start" );
-      if( !rp ) rp = world_find_closest_spawn( world, (v3f){0.0f,0.0f,0.0f} );
-      /* TODO: fallback to searching for a safe location using raycasts */
-      assert(rp);
-      v3_copy( rp->transform.co, world->player_co );
-
+   if( gate->flags & k_ent_gate_nonlocal )
+   {
+      world_default_spawn_pos( world, world->player_co );
       world_static.active_instance = gate->target;
       player__clean_refs();
 
       replay_clear( &skaterift.replay );
    }
-   else {
+   else 
+   {
       world_routes_activate_entry_gate( world, gate );
    }
    
@@ -178,7 +176,8 @@ static void player__pass_gate( u32 id ){
    audio_unlock();
 }
 
-static void player_apply_transport_to_cam( m4x3f transport ){
+static void player_apply_transport_to_cam( m4x3f transport )
+{
    /* Pre-emptively edit the camera matrices so that the motion vectors 
     * are correct */
    m4x3f transport_i;
@@ -194,7 +193,8 @@ static void player_apply_transport_to_cam( m4x3f transport ){
    m4x4_mul( world_gates.cam.mtx.v,  transport_4, world_gates.cam.mtx.v );
 }
 
-static void player__im_gui(void){
+static void player__im_gui(void)
+{
    if( !k_player_debug_info ) return;
 
    ui_rect box = {