fixed BBBZZZT
[carveJwlIkooP6JGAAIwe30JlM.git] / player_walk.c
index 00ee7fb4807cf27d197331f941c4018ce4278c57..fbae15d4e1dc12b1c18bb21094d0dcdf645c89b6 100644 (file)
@@ -580,9 +580,10 @@ VG_STATIC void player__walk_update( player_instance *player )
       }
    }
 
-   teleport_gate *gate;
-   if( (gate = world_intersect_gates(world, player->rb.co, w->state.prev_pos)) )
+   struct gate_hit hit;
+   if( world_intersect_gates(world, player->rb.co, w->state.prev_pos, &hit) )
    {
+      teleport_gate *gate = hit.gate;
       m4x3_mulv( gate->transport, player->rb.co, player->rb.co );
       m3x3_mulv( gate->transport, player->rb.v,  player->rb.v );
 
@@ -593,7 +594,7 @@ VG_STATIC void player__walk_update( player_instance *player )
       rb_update_transform( &player->rb );
 
       w->state_gate_storage = w->state;
-      player__pass_gate( player, gate );
+      player__pass_gate( player, &hit );
    }
 }