diff main.d @ 12:2ecd16840900

added tracker
author Mason Green <mason.green@gmail.com>
date Sun, 22 Mar 2009 12:10:16 -0400
parents d998bf1b0654
children e1004697cae1
line wrap: on
line diff
--- a/main.d	Sun Mar 22 09:35:24 2009 -0400
+++ b/main.d	Sun Mar 22 12:10:16 2009 -0400
@@ -30,6 +30,8 @@
  */
 module openmelee.main;
 
+import tango.io.Stdout : Stdout;
+
 version(distrib) import tango.io.vfs.ZipFolder;
 import tango.time.StopWatch;
 import fc = tango.text.convert.Float : toString;
@@ -75,22 +77,24 @@
     StopWatch timer;
 
     jobHub.addRepeatableJob( {
+        // Update AI
+        ai.move(whut.ship1);
         // Update physics
         whut.world.step(timeStep, settings.velocityIterations,
                         settings.positionIterations);
-        // Update AI
-                
     }, ITERS_PER_SECOND);
 
     bool running = true;
 
     jobHub.addPreFrameJob( {
-        bzVec2 velocity = whut.ship1.rBody.linearVelocity;
+        whut.ship1.updateState();
+        whut.ship2.updateState();
         whut.ship1.limitVelocity();
         whut.ship2.limitVelocity();
     });
 
     jobHub.addPostFrameJob( {
+        whut.ship2.rBody.angularVelocity = 0.0f;
         gui.begin(cfg);
         gui.push(`main`);
         if (gui().getProperty!(bool)("frame.closeClicked")) {