Index: /branches/scripting/src/lib/script_engine/script.cc
===================================================================
--- /branches/scripting/src/lib/script_engine/script.cc	(revision 9242)
+++ /branches/scripting/src/lib/script_engine/script.cc	(revision 9243)
@@ -59,5 +59,5 @@
 void Script::loadParams(const TiXmlElement* root)
 {
-  //printf("Loading params for %p \n",this);
+  //printf(("Loading params for %p \n",this);
   BaseObject::loadParams(root);
 
@@ -87,5 +87,5 @@
    if(currentFile.length() != 0)
    {
-     PRINT(1)("SCRIPT %s : ERROR: Could not load %s because an other file is already loaded: %s\n",currentFile.c_str(),filename.c_str(), currentFile.c_str());
+     printf("SCRIPT %s : ERROR: Could not load %s because an other file is already loaded: %s\n",currentFile.c_str(),filename.c_str(), currentFile.c_str());
      return false;
     }
@@ -104,5 +104,5 @@
      else
      {
-       PRINT(1)("SCRIPT %s : ERROR: while loading file %s: \n",currentFile.c_str(),filename.c_str());
+       printf("SCRIPT %s : ERROR: while loading file %s: \n",currentFile.c_str(),filename.c_str());
        reportError(error);
      }
@@ -111,5 +111,5 @@
    else
    {
-     PRINT(1)("SCRIPT %s : ERROR: while loading file %s: \n",currentFile.c_str(),filename.c_str());
+     printf("SCRIPT %s : ERROR: while loading file %s: \n",currentFile.c_str(),filename.c_str());
      reportError(error);
    }
@@ -121,8 +121,8 @@
  void Script::addObject(const std::string& className, const std::string& objectName)
  {
-   //printf("Script %s: I am about to add %s of class %s\n",this->getName(),objectName.c_str(),className.c_str());
+   //printf(("Script %s: I am about to add %s of class %s\n",this->getName(),objectName.c_str(),className.c_str());
 
    BaseObject* scriptClass = ClassList::getObject(className, CL_SCRIPT_CLASS);
-  // printf("The script class for %s is at %p \n",className.c_str(),scriptClass);
+  // printf(("The script class for %s is at %p \n",className.c_str(),scriptClass);
    WorldObject tmpObj;
    if (scriptClass != NULL)
@@ -135,5 +135,5 @@
 
      BaseObject* object = ClassList::getObject(objectName, className);
-    // printf("%s is at %p \n",objectName.c_str(),object);
+    // printf(("%s is at %p \n",objectName.c_str(),object);
      if (object != NULL && !objectIsAdded(objectName))
      {
@@ -183,5 +183,5 @@
    }
    else
-     PRINT(1)("SCRIPT %s : ERROR: There is an other function active ( %s ) or there are unremoved return values on the stack. Please remove them first.\n",currentFile.c_str(),currentFunction.c_str());
+     printf("SCRIPT %s : ERROR: There is an other function active ( %s ) or there are unremoved return values on the stack. Please remove them first.\n",currentFile.c_str(),currentFunction.c_str());
    return false;
  }
@@ -195,5 +195,5 @@
     if(error != 0)
     {
-      PRINT(1)("SCRIPT %s : ERROR: Failed to execute function %s: \n",currentFile.c_str(),currentFunction.c_str());
+      printf("SCRIPT %s : ERROR: Failed to execute function %s: \n",currentFile.c_str(),currentFunction.c_str());
      reportError(error);
      //clean up
@@ -210,5 +210,5 @@
    }
    else
-     PRINT(1)("SCRIPT %s : ERROR: no function selected.\n",currentFile.c_str());
+     printf("SCRIPT %s : ERROR: no function selected.\n",currentFile.c_str());
 
    return false;
@@ -227,5 +227,5 @@
    else
    {
-     PRINT(1)("SCRIPT %s : ERROR: Couldn't add parameter because the wrong function is selected: %s instead of %s\n",currentFile.c_str(), currentFunction.c_str(), toFunction.c_str());
+     printf("SCRIPT %s : ERROR: Couldn't add parameter because the wrong function is selected: %s instead of %s\n",currentFile.c_str(), currentFunction.c_str(), toFunction.c_str());
     return false;
    }
@@ -244,5 +244,5 @@
    else
    {
-     PRINT(1)("SCRIPT %s : ERROR: Couldn't add parameter because the wrong function is selected: %s instead of %s\n",currentFile.c_str(), currentFunction.c_str(), toFunction.c_str());
+     printf("SCRIPT %s : ERROR: Couldn't add parameter because the wrong function is selected: %s instead of %s\n",currentFile.c_str(), currentFunction.c_str(), toFunction.c_str());
      return false;
    }
@@ -260,5 +260,5 @@
    else
    {
-     PRINT(1)("SCRIPT %s : ERROR: Couldn't add parameter because the wrong function is selected: %s instead of %s\n",currentFile.c_str(), currentFunction.c_str(), toFunction.c_str());
+     printf("SCRIPT %s : ERROR: Couldn't add parameter because the wrong function is selected: %s instead of %s\n",currentFile.c_str(), currentFunction.c_str(), toFunction.c_str());
      return false;
    }
@@ -295,5 +295,5 @@
      }
      else
-       PRINT(1)("SCRIPT %s : ERROR: Trying to retreive non bolean value\n",this->currentFile.c_str());
+       printf("SCRIPT %s : ERROR: Trying to retreive non bolean value\n",this->currentFile.c_str());
    }
    return returnValue;
@@ -347,5 +347,5 @@
   const char *msg = lua_tostring(luaState, -1);
   if (msg == NULL) msg = "(error with no message)\n";
-  PRINT(1)("ERROR: %s\n", msg);
+  printf("ERROR: %s\n", msg);
   lua_pop(luaState, 1);
  }
@@ -368,5 +368,5 @@
  {
    BaseObject* scriptClass = ClassList::getObject(className, CL_SCRIPT_CLASS);
-   //printf("The script class for %s is at %p \n",className.c_str(),scriptClass);
+   //printf(("The script class for %s is at %p \n",className.c_str(),scriptClass);
    WorldObject tmpObj;
    if (scriptClass != NULL)
Index: /branches/scripting/src/world_entities/npcs/gate.cc
===================================================================
--- /branches/scripting/src/world_entities/npcs/gate.cc	(revision 9242)
+++ /branches/scripting/src/world_entities/npcs/gate.cc	(revision 9243)
@@ -13,5 +13,5 @@
    ### File Specific
    main-programmer: Patrick Boenzli
-   co-programmer:
+   co-programmer: Silvan Nellen
 */
 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
@@ -66,4 +66,5 @@
   this->scale = 1.0f;
   this->actionRadius = 1.0;
+  this->destroyed = false;
 
   if( root != NULL)
@@ -151,5 +152,5 @@
 void Gate::open()
 {
-  if( this->bLocked)
+  if( this->bLocked || this->destroyed)
     return;
 
@@ -164,4 +165,8 @@
 void Gate::close()
 {
+  
+  if( this->destroyed)
+    return;
+  
   this->setAnimation(GATE_CLOSE, MD2_ANIM_ONCE);
   this->bOpen = false;
@@ -171,7 +176,13 @@
 void Gate::destroy()
 {
+  if( this->destroyed)
+    return;
+  
   this->setAnimation(GATE_DIE, MD2_ANIM_ONCE);
 
-  Explosion::explode(this, Vector(10,10,10));
+  Explosion::explode(this, Vector(this->getScaling()/160,this->getScaling()/160,this->getScaling()/160));
+  
+  
+  this->destroyed = true;
 }
 
Index: /branches/scripting/src/world_entities/npcs/gate.h
===================================================================
--- /branches/scripting/src/world_entities/npcs/gate.h	(revision 9242)
+++ /branches/scripting/src/world_entities/npcs/gate.h	(revision 9243)
@@ -50,4 +50,5 @@
 
   private:
+    bool           destroyed;         //!< true if the door is destroyed
     bool           bOpen;             //!< true if the door is open
     bool           bLocked;           //!< true if this door is locked
Index: /branches/scripting/src/world_entities/projectiles/guided_missile.cc
===================================================================
--- /branches/scripting/src/world_entities/projectiles/guided_missile.cc	(revision 9242)
+++ /branches/scripting/src/world_entities/projectiles/guided_missile.cc	(revision 9243)
@@ -43,5 +43,5 @@
   this->lifeSpan = 4.0;
   this->agility = 3.5;
-  this->maxVelocity = 75;
+  this->maxVelocity = 100;
 
   this->emitter = new DotEmitter(100, 5, M_2_PI);
Index: /branches/scripting/src/world_entities/space_ships/spacecraft_2d.cc
===================================================================
--- /branches/scripting/src/world_entities/space_ships/spacecraft_2d.cc	(revision 9242)
+++ /branches/scripting/src/world_entities/space_ships/spacecraft_2d.cc	(revision 9243)
@@ -498,5 +498,5 @@
     this->bForward = event.bPressed; //this->shiftCoor(0,.1,0);
   else if( event.type == KeyMapper::PEV_BACKWARD)
-    this->bBackward = event.bPressed; //this->shiftCoor(0,-.1,0);
+  {this->bBackward = event.bPressed; printf(" %f, %f, %f \n",getAbsCoorX(),getAbsCoorY(),getAbsCoorZ());} //this->shiftCoor(0,-.1,0);
   else if( event.type == EV_MOUSE_MOTION)
   {
Index: /branches/scripting/src/world_entities/weapons/aiming_system.cc
===================================================================
--- /branches/scripting/src/world_entities/weapons/aiming_system.cc	(revision 9242)
+++ /branches/scripting/src/world_entities/weapons/aiming_system.cc	(revision 9243)
@@ -115,5 +115,5 @@
   if( this->owner != killer)
   {
-    PRINTF(0)("real hit: %s\n", killer->getClassName());
+    //PRINTF(0)("real hit: %s\n", killer->getClassName());
     this->selectionList.push_back(killer);
   }
Index: /branches/scripting/src/world_entities/world_entity.h
===================================================================
--- /branches/scripting/src/world_entities/world_entity.h	(revision 9242)
+++ /branches/scripting/src/world_entities/world_entity.h	(revision 9243)
@@ -129,4 +129,6 @@
 
   /* --- Character Attribute Block --- */
+  /** @returns the scaling of the model */
+  float getScaling(){return this->scaling;}
   /** @returns the damage dealt by this world entity */
   float getDamage() const { return this->damage; }
