Index: code/branches/objecthierarchy2/src/core/Super.h
===================================================================
--- code/branches/objecthierarchy2/src/core/Super.h	(revision 2207)
+++ code/branches/objecthierarchy2/src/core/Super.h	(revision 2212)
@@ -233,4 +233,7 @@
     #define SUPER_processEvent(classname, functionname, ...) \
         SUPER_ARGS(classname, functionname, __VA_ARGS__)
+
+    #define SUPER_changedScale(classname, functionname, ...) \
+        SUPER_NOARGS(classname, functionname)
     // (1/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
 
@@ -441,4 +444,8 @@
             (event)
         SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
+
+        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(5, changedScale, false)
+            ()
+        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
         // (2/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
 
@@ -488,4 +495,5 @@
     SUPER_INTRUSIVE_DECLARATION(changedVisibility);
     SUPER_INTRUSIVE_DECLARATION(processEvent);
+    SUPER_INTRUSIVE_DECLARATION(changedScale);
     // (3/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
 
Index: code/branches/objecthierarchy2/src/orxonox/gamestates/GSDedicated.cc
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/gamestates/GSDedicated.cc	(revision 2207)
+++ code/branches/objecthierarchy2/src/orxonox/gamestates/GSDedicated.cc	(revision 2212)
@@ -49,5 +49,5 @@
     {
         RegisterObject(GSDedicated);
-        
+
         this->setConfigValues();
     }
@@ -82,8 +82,8 @@
     {
         static int timeSinceLastTick = 0; // in microseconds
-        const int tickPeriod = 1000000. / this->tickrate_; // in microseconds
-        
+        const int tickPeriod = (int)(1000000.0f / this->tickrate_); // in microseconds
+
         GSLevel::ticked(time);
-        
+
         timeSinceLastTick += time.getDeltaTimeMicroseconds();
         if ( timeSinceLastTick >= tickPeriod )
@@ -96,22 +96,22 @@
         {
             unsigned int sleepTime;
-            
+
 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
             if ( tickPeriod-timeSinceLastTick < MIN_WIN32_SLEEP_TIME )
-                sleepTime = MIN_WIN32_SLEEP_TIME*1000000;
+                sleepTime = (unsigned int)(MIN_WIN32_SLEEP_TIME * 1000000);
             else
                 sleepTime = tickPeriod - timeSinceLastTick;
             msleep( sleepTime / 1000 );
-            
+
 #else /* unix */
             sleepTime = tickPeriod - timeSinceLastTick;
             usleep( sleepTime );
 #endif
-            
+
         }
-        
+
         this->tickChild(time);
     }
-    
+
     void GSDedicated::setConfigValues()
     {
Index: code/branches/objecthierarchy2/src/orxonox/objects/worldentities/Backlight.cc
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/objects/worldentities/Backlight.cc	(revision 2207)
+++ code/branches/objecthierarchy2/src/orxonox/objects/worldentities/Backlight.cc	(revision 2212)
@@ -66,7 +66,10 @@
 
             this->ribbonTrail_ = this->getScene()->getSceneManager()->createRibbonTrail(this->getNode()->getName());
-            this->ribbonTrail_->addNode(this->getNode());
+
             this->ribbonTrailNode_ = this->getScene()->getRootSceneNode()->createChildSceneNode();
             this->ribbonTrailNode_->attachObject(this->ribbonTrail_);
+
+            this->ribbonTrail_->setMaxChainElements(this->maxelements_);
+            this->ribbonTrail_->setTrailLength(this->length_);
             this->ribbonTrail_->setInitialWidth(0, 0);
         }
@@ -123,5 +126,5 @@
     {
         if (this->ribbonTrail_ && this->tickcount_ >= 2)
-            this->ribbonTrail_->setInitialWidth(0, this->width_);
+            this->ribbonTrail_->setInitialWidth(0, this->width_ * this->getWorldScale());
         this->update_lifetime();
     }
@@ -131,5 +134,5 @@
         if (this->ribbonTrail_ && this->tickcount_ >= 2)
         {
-            this->ribbonTrail_->setWidthChange(0, this->width_ / this->lifetime_/* * Backlight::timeFactor_s*/);
+            this->ribbonTrail_->setWidthChange(0, this->width_ * this->getWorldScale() / this->lifetime_/* * Backlight::timeFactor_s*/);
             this->ribbonTrail_->setColourChange(0, 0, 0, 0, 1.0f / this->lifetime_/* * Backlight::timeFactor_s*/);
         }
@@ -139,5 +142,5 @@
     {
         if (this->ribbonTrail_ && this->tickcount_ >= 2)
-            this->ribbonTrail_->setTrailLength(this->length_);
+            this->ribbonTrail_->setTrailLength(this->length_ * this->getWorldScale());
     }
 
@@ -176,4 +179,12 @@
             }
         }
+    }
+
+    void Backlight::changedScale()
+    {
+        SUPER(Backlight, changedScale);
+
+        this->update_width();
+        this->update_length();
     }
 
@@ -196,4 +207,6 @@
                 this->update_maxelements();
                 this->update_trailmaterial();
+                if (this->ribbonTrail_)
+                    this->ribbonTrail_->addNode(this->getNode());
             }
         }
@@ -204,119 +217,3 @@
         }
     }
-
-//------------------------------------------------------------------------------------
-/*
-    float Backlight::timeFactor_s = 1.0;
-
-    Backlight::Backlight(float maxspeed, float brakingtime, float scale)
-    {
-        RegisterObject(Backlight);
-
-        this->setConfigValues();
-        this->traillength_ = 1;
-        this->colour_ = ColourValue::White;
-
-        this->configure(maxspeed, brakingtime, scale);
-    }
-
-    bool Backlight::create(){
-      if(!WorldEntity::create())
-        return false;
-
-      this->getNode()->setInheritScale(false);
-
-      this->billboard_.setBillboardSet("Flares/backlightflare");
-      this->attachObject(this->billboard_.getBillboardSet());
-
-      this->ribbonTrail_ = GraphicsEngine::getInstance().getLevelSceneManager()->createRibbonTrail(this->getName() + "RibbonTrail");
-      this->ribbonTrailNode_ = GraphicsEngine::getInstance().getLevelSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName() + "RibbonTrailNode");
-      this->ribbonTrailNode_->attachObject(this->ribbonTrail_);
-      this->ribbonTrail_->addNode(this->getNode());
-
-
-      this->ribbonTrail_->setTrailLength(this->maxTraillength_);
-      this->ribbonTrail_->setMaterialName("Trail/backlighttrail");
-
-        //this->setTimeFactor(Orxonox::getInstance().getTimeFactor());
-      this->setTimeFactor(1.0f);
-
-      this->ribbonTrail_->setMaxChainElements(this->maxTrailsegments_);
-      this->ribbonTrail_->setTrailLength(this->traillength_ = 2 * this->maxTrailsegments_);
-      this->ribbonTrail_->setInitialWidth(0, this->width_ * this->getScale());
-      this->ribbonTrail_->setWidthChange(0, this->width_ * this->getScale() / this->maxLifeTime_ * Backlight::timeFactor_s);
-      return true;
-    }
-
-    Backlight::~Backlight()
-    {
-        if (this->isInitialized())
-        {
-            this->detachObject(this->billboard_.getBillboardSet());
-            GraphicsEngine::getInstance().getLevelSceneManager()->destroySceneNode(this->getName() + "RibbonTrailNode");
-            GraphicsEngine::getInstance().getLevelSceneManager()->destroyRibbonTrail(this->ribbonTrail_);
-        }
-    }
-
-    void Backlight::setConfigValues()
-    {
-        SetConfigValue(maxLifeTime_, 4.0).description("The maximal amount of seconds the trail behind a SpaceShip stays visible");
-        SetConfigValue(trailSegmentLength_, 50).description("The length of one segment of the trail behind a SpaceShip (lower values make it more smooth)");
-        SetConfigValue(width_, 7.0).description("The width of the trail");
-    }
-
-    void Backlight::setTimeFactor(float factor)
-    {
-        Backlight::timeFactor_s = factor;
-        float change = Backlight::timeFactor_s / this->maxLifeTime_;
-        this->ribbonTrail_->setWidthChange(0, this->width_ * change);
-        this->updateColourChange();
-    }
-
-    void Backlight::updateColourChange()
-    {
-        this->ribbonTrail_->setColourChange(0, ColourValue(0, 0, 0, this->maxTraillength_ / this->traillength_ / this->maxLifeTime_ * Backlight::timeFactor_s));
-    }
-
-    void Backlight::tick(float dt)
-    {
-        SUPER(Backlight, tick, dt);
-
-        if (this->isActive())
-        {
-            if (this->traillength_ < this->maxTraillength_)
-            {
-                this->traillength_ = min<float>(this->maxTraillength_, this->traillength_ + dt * this->maxTraillength_ / this->maxLifeTime_);
-                this->updateColourChange();
-            }
-        }
-        else
-        {
-            if (this->traillength_ > 1)
-            {
-                this->traillength_ = max<float>(1, this->traillength_ - this->brakefactor_ * dt * this->maxTraillength_ / this->maxLifeTime_);
-                this->updateColourChange();
-            }
-        }
-
-        this->ribbonTrail_->setTrailLength(this->traillength_);
-    }
-
-    void Backlight::configure(float maxspeed, float brakingtime, float scale)
-    {
-        this->maxTraillength_ = this->maxLifeTime_ * maxspeed;
-        this->maxTrailsegments_ = (size_t)(this->maxTraillength_ / this->trailSegmentLength_);
-
-        this->brakefactor_ = this->maxLifeTime_ / brakingtime;
-
-        this->scale(scale);
-    }
-
-    void Backlight::changedVisibility()
-    {
-        SUPER(Backlight, changedVisibility);
-
-        this->billboard_.setVisible(this->isVisible());
-        this->ribbonTrail_->setVisible(this->isVisible());
-    }
-*/
 }
Index: code/branches/objecthierarchy2/src/orxonox/objects/worldentities/Backlight.h
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/objects/worldentities/Backlight.h	(revision 2207)
+++ code/branches/objecthierarchy2/src/orxonox/objects/worldentities/Backlight.h	(revision 2212)
@@ -80,4 +80,6 @@
                 { return this->trailmaterial_; }
 
+            virtual void changedScale();
+
         private:
             void stopturnoff();
@@ -101,42 +103,4 @@
             Timer<Backlight> turnofftimer_;
     };
-
-
-/*
-        public:
-            Backlight(float maxspeed = 1.0, float brakingtime = 1.0, float scale = 1.0);
-            virtual ~Backlight();
-
-            void setConfigValues();
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            virtual void tick(float dt);
-            virtual void changedVisibility();
-            virtual bool create();
-
-
-            void setTimeFactor(float factor);
-
-        private:
-            void configure(float maxspeed, float brakingtime, float scale = 1);
-            void updateColourChange();
-
-            static float timeFactor_s;
-            BillboardSet billboard_;
-            Ogre::SceneNode* ribbonTrailNode_;
-            Ogre::RibbonTrail* ribbonTrail_;
-
-
-            float maxLifeTime_;
-            float trailSegmentLength_;
-            float width_;
-
-            float brakefactor_;
-
-            float maxTraillength_;
-            float traillength_;
-
-            size_t maxTrailsegments_;
-    };
-*/
 }
 
Index: code/branches/objecthierarchy2/src/orxonox/objects/worldentities/Billboard.cc
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/objects/worldentities/Billboard.cc	(revision 2207)
+++ code/branches/objecthierarchy2/src/orxonox/objects/worldentities/Billboard.cc	(revision 2212)
@@ -53,5 +53,5 @@
         {
             if (this->isInitialized() && this->billboard_.getBillboardSet())
-                this->getNode()->detachObject(this->billboard_.getName());
+                this->getNode()->detachObject(this->billboard_.getBillboardSet());
         }
     }
Index: code/branches/objecthierarchy2/src/orxonox/objects/worldentities/WorldEntity.h
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/objects/worldentities/WorldEntity.h	(revision 2207)
+++ code/branches/objecthierarchy2/src/orxonox/objects/worldentities/WorldEntity.h	(revision 2212)
@@ -107,21 +107,27 @@
 
             inline void setScale3D(const Vector3& scale)
-                { this->node_->setScale(scale); }
+                { this->node_->setScale(scale); this->changedScale(); }
             inline void setScale3D(float x, float y, float z)
-                { this->node_->setScale(x, y, z); }
-            inline const Vector3& getScale3D(void) const
+                { this->node_->setScale(x, y, z); this->changedScale(); }
+            inline const Vector3& getScale3D() const
                 { return this->node_->getScale(); }
+            inline const Vector3& getWorldScale3D() const
+                { return this->node_->_getDerivedScale(); }
 
             inline void setScale(float scale)
-                { this->node_->setScale(scale, scale, scale); }
+                { this->node_->setScale(scale, scale, scale); this->changedScale(); }
             inline float getScale() const
                 { Vector3 scale = this->getScale3D(); return (scale.x == scale.y && scale.x == scale.z) ? scale.x : 1; }
+            inline float getWorldScale() const
+                { Vector3 scale = this->getWorldScale3D(); return (scale.x == scale.y && scale.x == scale.z) ? scale.x : 1; }
 
             inline void scale3D(const Vector3& scale)
-                { this->node_->scale(scale); }
+                { this->node_->scale(scale); this->changedScale(); }
             inline void scale3D(float x, float y, float z)
-                { this->node_->scale(x, y, z); }
+                { this->node_->scale(x, y, z); this->changedScale(); }
             inline void scale(float scale)
                 { this->node_->scale(scale, scale, scale); }
+
+            virtual void changedScale() {}
 
             void attach(WorldEntity* object);
@@ -159,4 +165,6 @@
             std::set<WorldEntity*> children_;
     };
+
+    SUPER_FUNCTION(5, WorldEntity, changedScale, false);
 }
 
