Index: /trunk/src/defs/class_id.h
===================================================================
--- /trunk/src/defs/class_id.h	(revision 6003)
+++ /trunk/src/defs/class_id.h	(revision 6004)
@@ -162,4 +162,8 @@
   CL_GUIDED_MISSILE             =    0x00000245,
 
+  CL_NPC_TEST1                  =    0x00000301,
+  CL_NPC_TEST2                  =    0x00000302,
+
+
   // gamePlay (range from 0x00000500 0x000005ff)
   CL_EVENT                      =    0x00000501,
Index: /trunk/src/lib/coord/p_node.cc
===================================================================
--- /trunk/src/lib/coord/p_node.cc	(revision 6003)
+++ /trunk/src/lib/coord/p_node.cc	(revision 6004)
@@ -679,5 +679,5 @@
     }
 
-    if(this->children.size() > 0)
+    if(!this->children.empty())
     {
       list<PNode*>::iterator child;
Index: /trunk/src/lib/sound/sound_engine.cc
===================================================================
--- /trunk/src/lib/sound/sound_engine.cc	(revision 6003)
+++ /trunk/src/lib/sound/sound_engine.cc	(revision 6004)
@@ -290,5 +290,5 @@
   // INITIALIZING THE DEVICE:
 
-#ifdef AL_VERSION_1_1
+#ifndef AL_VERSION_1_1
   ALubyte deviceName[] =
 #else
Index: /trunk/src/world_entities/npcs/npc.cc
===================================================================
--- /trunk/src/world_entities/npcs/npc.cc	(revision 6003)
+++ /trunk/src/world_entities/npcs/npc.cc	(revision 6004)
@@ -70,11 +70,2 @@
   }
 }
-
-
-void NPC::tick(float dt)
-{
-
-}
-
-
-
Index: /trunk/src/world_entities/npcs/npc.h
===================================================================
--- /trunk/src/world_entities/npcs/npc.h	(revision 6003)
+++ /trunk/src/world_entities/npcs/npc.h	(revision 6004)
@@ -17,6 +17,4 @@
   void addAI(AI* ai);
 
-  virtual void tick(float dt);
-
   virtual void collidesWith (WorldEntity* entity, const Vector& location);
 
Index: /trunk/src/world_entities/npcs/npc_test.cc
===================================================================
--- /trunk/src/world_entities/npcs/npc_test.cc	(revision 6003)
+++ /trunk/src/world_entities/npcs/npc_test.cc	(revision 6004)
@@ -33,5 +33,5 @@
 NPC2::NPC2()
 {
-  this->setClassID(CL_NPC, "NPC");
+  this->setClassID(CL_NPC_TEST2, "NPC2");
 
   if ((float)rand()/RAND_MAX > .5f)
@@ -83,25 +83,25 @@
 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();
-  gluSphere(this->obj, 3, 10, 10);
-  shader->deactivateShader();
-
-
-/*  if (this->model)
-    this->model->draw();*/
-  glPopMatrix();
+//   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();
+//   gluSphere(this->obj, 3, 10, 10);
+//   shader->deactivateShader();
+//
+//
+// /*  if (this->model)
+//     this->model->draw();*/
+//   glPopMatrix();
 }
 
Index: /trunk/src/world_entities/npcs/npc_test.h
===================================================================
--- /trunk/src/world_entities/npcs/npc_test.h	(revision 6003)
+++ /trunk/src/world_entities/npcs/npc_test.h	(revision 6004)
@@ -3,13 +3,10 @@
 #define _NPC2_H
 
-#include "world_entity.h"
-#include "physics_interface.h"
-
-#include "glincl.h"
+#include "npc.h"
 
 class AI;
 class Shader;
 
-class NPC2 : public WorldEntity, public PhysicsInterface {
+class NPC2 : public NPC {
 
  public:
Index: /trunk/src/world_entities/npcs/npc_test1.cc
===================================================================
--- /trunk/src/world_entities/npcs/npc_test1.cc	(revision 6003)
+++ /trunk/src/world_entities/npcs/npc_test1.cc	(revision 6004)
@@ -32,5 +32,5 @@
 NPCTest1::NPCTest1()
 {
-  this->setClassID(CL_NPC, "NPCTest1");
+  this->setClassID(CL_NPC_TEST1, "NPCTest1");
 
   if ((float)rand()/RAND_MAX > .5f)
@@ -39,5 +39,5 @@
     this->loadModel("models/ships/gobblin.obj", 2);
 
-  this->randomRotAxis =  VECTOR_RAND(1);
+  this->randomRotAxis =  VECTOR_RAND(1).getNormalized();
 }
 
@@ -80,10 +80,5 @@
 void NPCTest1::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: /trunk/src/world_entities/npcs/npc_test1.h
===================================================================
--- /trunk/src/world_entities/npcs/npc_test1.h	(revision 6003)
+++ /trunk/src/world_entities/npcs/npc_test1.h	(revision 6004)
@@ -3,10 +3,9 @@
 #define _NPC_Test1_H
 
-#include "world_entity.h"
-#include "physics_interface.h"
+#include "npc.h"
 
 class AI;
 
-class NPCTest1 : public WorldEntity, public PhysicsInterface {
+class NPCTest1 : public NPC {
 
  public:
Index: /trunk/src/world_entities/world_entity.cc
===================================================================
--- /trunk/src/world_entities/world_entity.cc	(revision 6003)
+++ /trunk/src/world_entities/world_entity.cc	(revision 6004)
@@ -118,5 +118,5 @@
 
   if (this->models[modelNumber] != NULL)
-  { 
+  {
     Resource* resource = ResourceManager::getInstance()->locateResourceByPointer(this->models[modelNumber]);
     if (resource != NULL)
@@ -127,5 +127,5 @@
   this->models[modelNumber] = model;
 
-//   if (this->model != NULL)  
+//   if (this->model != NULL)
 //     this->buildObbTree(4);
 }
@@ -233,5 +233,4 @@
     glMatrixMode(GL_MODELVIEW);
     glPushMatrix();
-    float matrix[4][4];
 
     /* translate */
@@ -239,24 +238,20 @@
                   this->getAbsCoor ().y,
                   this->getAbsCoor ().z);
-   /* rotate */ // FIXME: devise a new Way to rotate this
-    this->getAbsDir ().matrix (matrix);
-    glMultMatrixf((float*)matrix);
-
+    Vector tmpRot = this->getAbsDir().getSpacialAxis();
+    glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
+
+
+    // This Draws the LOD's
     float cameraDistance = (State::getCamera()->getAbsCoor() - this->getAbsCoor()).len();
-    if (this->isA(CL_HELICOPTER))
-	printf("Test %f %d\n", cameraDistance, this->models.size());
-    if (cameraDistance > 100 && this->models.size() >= 3 && this->models[2] != NULL)
+    if (cameraDistance > 30 && this->models.size() >= 3 && this->models[2] != NULL)
     {
-      if (this->isA(CL_HELICOPTER))printf("====== 2 ===\n");
        this->models[2]->draw();
-    } 
-    else if (cameraDistance > 50 && this->models.size() >= 2 && this->models[1] != NULL)
+    }
+    else if (cameraDistance > 10 && this->models.size() >= 2 && this->models[1] != NULL)
     {
-      if (this->isA(CL_HELICOPTER))printf("====== 1 ===\n");
       this->models[1]->draw();
-    } 
-    else if (this->models.size() >= 1 && this->models[0] != NULL) 
+    }
+    else if (this->models.size() >= 1 && this->models[0] != NULL)
     {
-      if (this->isA(CL_HELICOPTER))printf("====== 0 ===\n");
       this->models[0]->draw();
     }
