+/*
+ * Intersect all gates in the world
+ */
+VG_STATIC teleport_gate *world_intersect_gates( v3f pos, v3f last )
+{
+ for( int i=0; i<world.gate_count; i++ )
+ {
+ struct route_gate *rg = &world.gates[i];
+ teleport_gate *gate = &rg->gate;
+
+ if( gate_intersect( gate, pos, last ) )
+ return gate;
+ }
+
+ return NULL;
+}
+