fixed bug invalid memory write
[carveJwlIkooP6JGAAIwe30JlM.git] / player.c
index 3ba64eb0f38881808be33c5c0311665423bce99d..bf1a5801da4415454e141c7d542326fd2414720e 100644 (file)
--- a/player.c
+++ b/player.c
@@ -128,7 +128,6 @@ static void player__pass_gate( u32 id ){
    world_routes_fracture( world, gate, localplayer.rb.co, localplayer.rb.v );
 
    localplayer.gate_waiting = gate;
-   world_routes_activate_entry_gate( world_current_instance(), gate );
 
    struct player_cam_controller *cc = &localplayer.cam_control;
    m4x3_mulv( gate->transport, cc->tpv_lpf, cc->tpv_lpf );
@@ -148,6 +147,8 @@ static void player__pass_gate( u32 id ){
       world_static.active_instance = gate->target;
       player__clean_refs();
    }
+   else 
+      world_routes_activate_entry_gate( world, gate );
    
    v3f v0;
    v3_angles_vector( localplayer.angles, v0 );