+VG_STATIC void player_walk_transport( player_interface *player,
+ player_attachment *at,
+ teleport_gate *gate )
+{
+ struct player_device_walk *w = at->storage;
+
+ m4x3_mulv( gate->transport, player->rb.co, player->rb.co );
+ m3x3_mulv( gate->transport, player->rb.v, player->rb.v );
+
+ /* analytical rotation of yaw */
+ v3f fwd_dir = { cosf(w->state.angles[0]),
+ 0.0f,
+ sinf(w->state.angles[0])};
+ m3x3_mulv( gate->transport, fwd_dir, fwd_dir );
+ w->state.angles[0] = atan2f( fwd_dir[2], fwd_dir[0] );
+
+ w->state_gate_storage = w->state;
+ player_apply_transport_to_cam( gate->transport );
+}
+