Index: /branches/ai/src/world_entities/npcs/npc_test.cc
===================================================================
--- /branches/ai/src/world_entities/npcs/npc_test.cc	(revision 9946)
+++ /branches/ai/src/world_entities/npcs/npc_test.cc	(revision 9947)
@@ -19,7 +19,6 @@
 
 #include "npc_test.h"
-#include "obb_tree.h"
 
-#include "shader.h"
+
 #include "state.h"
 #include "debug.h"
@@ -28,9 +27,12 @@
 #include "loading/load_param.h"
 
-#include "effects/explosion.h"
+#include "md2/md2Model.h"
+#include "player.h"
+#include "playable.h"
 
 #include "class_id_DEPRECATED.h"
 ObjectListDefinitionID(NPC2, CL_NPC_TEST2);
 CREATE_FACTORY(NPC2);
+
 
 NPC2::NPC2(const TiXmlElement* root)
@@ -39,17 +41,4 @@
   this->registerObject(this, NPC2::_objectList);
 
-  if ((float)rand()/RAND_MAX > .5f)
-    this->loadModel("models/ships/bolido.obj", 6);
-  else
-    this->loadModel("models/ships/gobblin.obj", 6);
-
-
-
-
-  this->shader = NULL;
-//  if (likely(Shader::checkShaderAbility()))
-    //this->shader = Shader::getShader("shaders/toon.vert", "shaders/toon.frag");
-
-  this->randomRotAxis = VECTOR_RAND(1);
 
   if (root != NULL)
@@ -69,8 +58,40 @@
 
 
-void NPC2::destroy(WorldEntity* killer)
+
+
+
+void NPC2::tick(float dt)
 {
-  Explosion::explode(this, Vector(10,10,10));
-  this->toList(OM_DEAD);
+  // animating the md2 model (uninteressant)
+  if( likely(this->getModel(0) != NULL))
+    ((MD2Model*)this->getModel(0))->tick(dt);
+
+
+
+  PRINTF(0)("====================\n");
+  PRINTF(0)("NPC2::tick(%f)\n", dt);
+
+  // information gathering
+
+  Vector absPosition = this->getAbsCoor();
+
+  PRINTF(0)(" npc abs coor: %f, %f, %f\n", absPosition.x, absPosition.y, absPosition.z);
+
+  Player* pl = State::getPlayer();
+  Vector playerAbsPos = pl->getPlayable()->getAbsCoor();
+
+  PRINTF(0)(" player abs coor: %f, %f, %f\n", playerAbsPos.x, playerAbsPos.y, playerAbsPos.z);
+
+
+  // intelligent reaction
+
+  Vector distanceVector = playerAbsPos - absPosition;
+  distanceVector.normalize();
+
+  float speed = 10.0f;
+
+  this->shiftCoor( distanceVector * speed * dt);
+
+
 
 }
@@ -78,47 +99,2 @@
 
 
-/**
- *  the entity is drawn onto the screen with this function
- *
- * This is a central function of an entity: call it to let the entity painted to the screen.
- * Just override this function with whatever you want to be drawn.
- */
-void NPC2::draw() const
-{
-  glMatrixMode(GL_MODELVIEW);
-  glPushMatrix();
-  float matrix[4][4];
-
-  /* translate */
-  glTranslatef (this->getAbsCoor ().x,
-                this->getAbsCoor ().y,
-                this->getAbsCoor ().z);
-  /* rotate */
-  this->getAbsDir ().matrix (matrix);
-  glMultMatrixf((float*)matrix);
-
-//   if (this->shader != NULL && this->shader != Shader::getActiveShader())
-//     shader->activateShader();
-
-  this->getModel()->draw();
-//   shader->deactivateShader();
-
-
-/*  if (this->model)
-    this->model->draw();*/
-  glPopMatrix();
-}
-
-
-void NPC2::tick(float dt)
-{
-//  Vector direction = (State::getCameraTarget()->getAbsCoor() - this->getAbsCoor());
-
-  //if (directin.len() < 100)
-//  this->shiftCoor(direction *dt * 5 * exp(-direction.len() / 30.0));
-//  this->shiftDir(Quaternion(dt, this->randomRotAxis));
-
-}
-
-
-
Index: /branches/ai/src/world_entities/npcs/npc_test.h
===================================================================
--- /branches/ai/src/world_entities/npcs/npc_test.h	(revision 9946)
+++ /branches/ai/src/world_entities/npcs/npc_test.h	(revision 9947)
@@ -17,14 +17,9 @@
   virtual void loadParams(const TiXmlElement* root);
 
-  void addAI(AI* ai);
-
-  virtual void destroy(WorldEntity* killer);
 
   virtual void tick(float dt);
-  virtual void draw() const;
 
  private:
-   Vector   randomRotAxis;
-   Shader*  shader;
+
 };
 
Index: /branches/ai/src/world_entities/space_ships/spacecraft_2d.cc
===================================================================
--- /branches/ai/src/world_entities/space_ships/spacecraft_2d.cc	(revision 9946)
+++ /branches/ai/src/world_entities/space_ships/spacecraft_2d.cc	(revision 9947)
@@ -272,5 +272,8 @@
 {
   dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( true);
-  this->setPlaymode(this->getPlaymode());
+//  this->setPlaymode(this->getPlaymode());
+  this->setPlaymode( Playable::Horizontal);
+  this->setTravelSpeed( 10.0);
+
 }
 
