rail targeting
[carveJwlIkooP6JGAAIwe30JlM.git] / world_routes.h
index 5a7c07b36df0b154c921a3970fd050eaafb19d63..795f57b9f3eae6143abb3eb520c589b1c05943e8 100644 (file)
@@ -5,6 +5,7 @@
 #ifndef ROUTES_H
 #define ROUTES_H
 
+#include <time.h>
 #include "world.h"
 #include "world_gate.h"
 
@@ -530,6 +531,17 @@ VG_STATIC void world_routes_verify_run( u32 route )
    world.routes[route].latest_pass = world.time;
 }
 
+VG_STATIC void world_routes_clear(void)
+{
+   for( u32 i=0; i<world.route_count; i++ )
+   {
+      struct route *route = &world.routes[i];
+      route->active = 0;
+   }
+   world.current_run_version += 4;
+   world.last_use = 0.0;
+}
+
 /*
  * When going through a gate this is called for bookkeeping purposes
  */