Index: code/branches/gui/src/core/ConfigFileManager.cc
===================================================================
--- code/branches/gui/src/core/ConfigFileManager.cc	(revision 2814)
+++ code/branches/gui/src/core/ConfigFileManager.cc	(revision 2815)
@@ -190,5 +190,5 @@
         this->bUpdated_ = true;
 
-        return this->entries_.insert(this->entries_.end(), (ConfigFileEntry*)(new ConfigFileEntryValue(name, fallback, bString)));
+        return this->entries_.insert(this->entries_.end(), static_cast<ConfigFileEntry*>(new ConfigFileEntryValue(name, fallback, bString)));
     }
 
@@ -207,7 +207,7 @@
 
         if (index == 0)
-            return this->entries_.insert(this->entries_.end(), (ConfigFileEntry*)(new ConfigFileEntryVectorValue(name, index, fallback, bString)));
-        else
-            return this->entries_.insert(++this->getEntryIterator(name, index - 1, "", bString), (ConfigFileEntry*)(new ConfigFileEntryVectorValue(name, index, fallback, bString)));
+            return this->entries_.insert(this->entries_.end(), static_cast<ConfigFileEntry*>(new ConfigFileEntryVectorValue(name, index, fallback, bString)));
+        else
+            return this->entries_.insert(++this->getEntryIterator(name, index - 1, "", bString), static_cast<ConfigFileEntry*>(new ConfigFileEntryVectorValue(name, index, fallback, bString)));
     }
 
Index: code/branches/gui/src/core/Core.cc
===================================================================
--- code/branches/gui/src/core/Core.cc	(revision 2814)
+++ code/branches/gui/src/core/Core.cc	(revision 2815)
@@ -401,6 +401,6 @@
             return;
 
+#ifdef ORXONOX_PLATFORM_WINDOWS
         unsigned int coreNr = limitToCPU - 1;
-#ifdef ORXONOX_PLATFORM_WINDOWS
         // Get the current process core mask
         DWORD procMask;
Index: code/branches/gui/src/core/GameState.cc
===================================================================
--- code/branches/gui/src/core/GameState.cc	(revision 2814)
+++ code/branches/gui/src/core/GameState.cc	(revision 2815)
@@ -178,6 +178,6 @@
         this->allChildren_[grandchild->getName()] = grandchild;
         this->grandchildrenToChildren_[grandchild] = child;
-        if (this->getParent())
-            this->getParent()->grandchildAdded(this, grandchild);
+        if (this->getParentAsBase())
+            this->getParentAsBase()->grandchildAdded(this, grandchild);
     }
 
@@ -196,6 +196,6 @@
         this->allChildren_.erase(grandchild->getName());
         this->grandchildrenToChildren_.erase(grandchild);
-        if (this->getParent())
-            this->getParent()->grandchildRemoved(grandchild);
+        if (this->getParentAsBase())
+            this->getParentAsBase()->grandchildRemoved(grandchild);
     }
 
@@ -208,6 +208,6 @@
     GameStateBase* GameStateBase::getState(const std::string& name)
     {
-        if (this->getParent())
-            return this->getParent()->getState(name);
+        if (this->getParentAsBase())
+            return this->getParentAsBase()->getState(name);
         else
         {
@@ -227,6 +227,6 @@
     GameStateBase* GameStateBase::getRoot()
     {
-        if (this->getParent())
-            return this->getParent()->getRoot();
+        if (this->getParentAsBase())
+            return this->getParentAsBase()->getRoot();
         else
             return this;
@@ -251,6 +251,6 @@
         else
         {
-            if (this->getParent())
-                return this->getParent()->getCurrentState();
+            if (this->getParentAsBase())
+                return this->getParentAsBase()->getCurrentState();
             else
                 return 0;
@@ -288,5 +288,5 @@
     void GameStateBase::makeTransition(GameStateBase* source, GameStateBase* destination)
     {
-        if (source == this->getParent())
+        if (source == this->getParentAsBase())
         {
             // call is from the parent
@@ -319,8 +319,8 @@
         {
             // parent. We can be sure of this.
-            assert(this->getParent() != 0);
+            assert(this->getParentAsBase() != 0);
 
             this->deactivate();
-            this->getParent()->makeTransition(this, destination);
+            this->getParentAsBase()->makeTransition(this, destination);
         }
     }
Index: code/branches/gui/src/core/GameState.h
===================================================================
--- code/branches/gui/src/core/GameState.h	(revision 2814)
+++ code/branches/gui/src/core/GameState.h	(revision 2815)
@@ -109,5 +109,5 @@
         void tickChild(const Clock& time) { if (this->getActiveChild()) this->getActiveChild()->tick(time); }
 
-        virtual GameStateBase* getParent() const = 0;
+        virtual GameStateBase* getParentAsBase() const = 0;
         virtual void setParent(GameStateBase* state) = 0;
 
@@ -146,4 +146,7 @@
         virtual ~GameState() { }
 
+        GameStateBase* getParentAsBase() const
+            { return parent_; }
+
         ParentType* getParent() const
             { return parent_; }
Index: code/branches/gui/src/core/Iterator.h
===================================================================
--- code/branches/gui/src/core/Iterator.h	(revision 2814)
+++ code/branches/gui/src/core/Iterator.h	(revision 2815)
@@ -181,5 +181,5 @@
                     this->list_->unregisterIterator(this);
 
-                this->element_ = (other.element_) ? (ObjectListBaseElement*)other.element_ : 0;
+                this->element_ = (other.element_) ? static_cast<ObjectListBaseElement*>(other.element_) : 0;
                 this->list_ = ClassIdentifier<O>::getIdentifier()->getObjects();
                 this->list_->registerIterator(this);
Index: code/branches/gui/src/core/ObjectListBase.h
===================================================================
--- code/branches/gui/src/core/ObjectListBase.h	(revision 2814)
+++ code/branches/gui/src/core/ObjectListBase.h	(revision 2815)
@@ -71,5 +71,5 @@
     {
         public:
-            ObjectListElement(T* object) : ObjectListBaseElement((OrxonoxClass*)object), object_(object) {}
+            ObjectListElement(T* object) : ObjectListBaseElement(static_cast<OrxonoxClass*>(object)), object_(object) {}
             T* object_;              //!< The object
     };
Index: code/branches/gui/src/core/RootGameState.cc
===================================================================
--- code/branches/gui/src/core/RootGameState.cc	(revision 2814)
+++ code/branches/gui/src/core/RootGameState.cc	(revision 2815)
@@ -69,5 +69,5 @@
         if (it != this->grandchildrenToChildren_.end())
         {
-            OrxAssert(dynamic_cast<GameStateBase*>(it->second) != 0,
+            OrxAssert(static_cast<GameStateBase*>(it->second) != 0,
                 "There was a mix with RootGameState and GameState, could not cast.");
             GameStateBase* child = static_cast<GameStateBase*>(it->second);
Index: code/branches/gui/src/core/Template.cc
===================================================================
--- code/branches/gui/src/core/Template.cc	(revision 2814)
+++ code/branches/gui/src/core/Template.cc	(revision 2815)
@@ -65,5 +65,5 @@
         if (element)
         {
-            TiXmlElement* tixmlelement = dynamic_cast<TiXmlElement*>(element->GetTiXmlPointer());
+            TiXmlElement* tixmlelement = static_cast<TiXmlElement*>(element->GetTiXmlPointer());
             if (tixmlelement)
                 this->setXMLElement(*tixmlelement);
@@ -138,5 +138,5 @@
         COUT(4) << object->getLoaderIndentation() << " aplying Template \"" << this->getName() << "\"..." << std::endl;
 
-        Element temp = ((TiXmlElement*)&this->getXMLElement());
+        Element temp = &const_cast<TiXmlElement&>(this->getXMLElement());
 
         if (this->bLoadDefaults_)
Index: code/branches/gui/src/core/XMLPort.h
===================================================================
--- code/branches/gui/src/core/XMLPort.h	(revision 2814)
+++ code/branches/gui/src/core/XMLPort.h	(revision 2815)
@@ -556,9 +556,9 @@
                                                 try
                                                 {
-                                                    COUT(4) << ((BaseObject*)object)->getLoaderIndentation() << "fabricating " << child->Value() << "..." << std::endl;
+                                                    COUT(4) << object->getLoaderIndentation() << "fabricating " << child->Value() << "..." << std::endl;
 
                                                     BaseObject* newObject = identifier->fabricate((BaseObject*)object);
                                                     assert(newObject);
-                                                    newObject->setLoaderIndentation(((BaseObject*)object)->getLoaderIndentation() + "  ");
+                                                    newObject->setLoaderIndentation(object->getLoaderIndentation() + "  ");
 
                                                     O* castedObject = dynamic_cast<O*>(newObject);
@@ -568,12 +568,12 @@
                                                     {
                                                         newObject->XMLPort(*child, XMLPort::LoadObject);
-                                                        COUT(4) << ((BaseObject*)object)->getLoaderIndentation() << "assigning " << child->Value() << " (objectname " << newObject->getName() << ") to " << this->identifier_->getName() << " (objectname " << ((BaseObject*)object)->getName() << ")" << std::endl;
+                                                        COUT(4) << object->getLoaderIndentation() << "assigning " << child->Value() << " (objectname " << newObject->getName() << ") to " << this->identifier_->getName() << " (objectname " << ((BaseObject*)object)->getName() << ")" << std::endl;
                                                     }
                                                     else
                                                     {
-                                                        COUT(4) << ((BaseObject*)object)->getLoaderIndentation() << "assigning " << child->Value() << " (object not yet loaded) to " << this->identifier_->getName() << " (objectname " << ((BaseObject*)object)->getName() << ")" << std::endl;
+                                                        COUT(4) << object->getLoaderIndentation() << "assigning " << child->Value() << " (object not yet loaded) to " << this->identifier_->getName() << " (objectname " << ((BaseObject*)object)->getName() << ")" << std::endl;
                                                     }
 
-                                                    COUT(5) << ((BaseObject*)object)->getLoaderIndentation();
+                                                    COUT(5) << object->getLoaderIndentation();
                                                     (*this->loadexecutor_)(object, castedObject);
 
@@ -581,5 +581,5 @@
                                                         newObject->XMLPort(*child, XMLPort::LoadObject);
 
-                                                    COUT(5) << ((BaseObject*)object)->getLoaderIndentation() << "...fabricated " << child->Value() << " (objectname " << newObject->getName() << ")." << std::endl;
+                                                    COUT(5) << object->getLoaderIndentation() << "...fabricated " << child->Value() << " (objectname " << newObject->getName() << ")." << std::endl;
                                                 }
                                                 catch (AbortLoadingException& ex)
@@ -601,10 +601,10 @@
                                         else
                                         {
-                                            COUT(2) << ((BaseObject*)object)->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not loadable." << std::endl;
+                                            COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not loadable." << std::endl;
                                         }
                                     }
                                     else
                                     {
-                                        COUT(2) << ((BaseObject*)object)->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a '" << Class(O)->getName() << "'." << std::endl;
+                                        COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a '" << Class(O)->getName() << "'." << std::endl;
                                     }
                                 }
@@ -626,5 +626,5 @@
                     {
                         COUT(1) << std::endl;
-                        COUT(1) << "An error occurred in XMLPort.h while loading a '" << Class(O)->getName() << "' in '" << this->sectionname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << ((BaseObject*)object)->getName() << ") in " << object->getFilename() << ":" << std::endl;
+                        COUT(1) << "An error occurred in XMLPort.h while loading a '" << Class(O)->getName() << "' in '" << this->sectionname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << object->getName() << ") in " << object->getFilename() << ":" << std::endl;
                         COUT(1) << ex.what() << std::endl;
                     }
Index: code/branches/gui/src/core/input/InputBuffer.h
===================================================================
--- code/branches/gui/src/core/input/InputBuffer.h	(revision 2814)
+++ code/branches/gui/src/core/input/InputBuffer.h	(revision 2815)
@@ -127,5 +127,5 @@
                 for (std::list<BaseInputBufferListenerTuple*>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); )
                 {
-                    InputBufferListenerTuple<T>* refListener = dynamic_cast<InputBufferListenerTuple<T>*>(*it);
+                    InputBufferListenerTuple<T>* refListener = static_cast<InputBufferListenerTuple<T>*>(*it);
                     if (refListener && refListener->listener_ == listener)
                         this->listeners_.erase(it++);
Index: code/branches/gui/src/orxonox/objects/EventTarget.cc
===================================================================
--- code/branches/gui/src/orxonox/objects/EventTarget.cc	(revision 2814)
+++ code/branches/gui/src/orxonox/objects/EventTarget.cc	(revision 2815)
@@ -66,5 +66,5 @@
     void EventTarget::addAsEvent(BaseObject* object)
     {
-        if (object != (BaseObject*)this)
+        if (object != static_cast<BaseObject*>(this))
             object->addEvent(this, "");
     }
Index: code/branches/gui/src/orxonox/objects/Radar.cc
===================================================================
--- code/branches/gui/src/orxonox/objects/Radar.cc	(revision 2814)
+++ code/branches/gui/src/orxonox/objects/Radar.cc	(revision 2815)
@@ -144,5 +144,5 @@
             for (ObjectList<RadarViewable>::iterator it = ObjectList<RadarViewable>::begin(); it; ++it)
             {
-                if (*it == (RadarViewable*)this->owner_)
+                if (*it == static_cast<RadarViewable*>(this)->owner_)
                     continue;
 
Index: code/branches/gui/src/orxonox/objects/pickup/PickupSpawner.cc
===================================================================
--- code/branches/gui/src/orxonox/objects/pickup/PickupSpawner.cc	(revision 2814)
+++ code/branches/gui/src/orxonox/objects/pickup/PickupSpawner.cc	(revision 2815)
@@ -89,5 +89,5 @@
 		ExecutorMember<BaseObject>* executor = createExecutor(createFunctor(&BaseObject::setActive));
 		executor->setDefaultValues(true);
-		RespawnTimer_.setTimer(this->respawntimer_, false, (BaseObject*)this, executor);
+		RespawnTimer_.setTimer(this->respawntimer_, false, this, executor);
 		COUT(0) << "TIMER SET" << std::endl;
 	}
Index: code/branches/gui/src/orxonox/overlays/hud/HUDRadar.cc
===================================================================
--- code/branches/gui/src/orxonox/overlays/hud/HUDRadar.cc	(revision 2814)
+++ code/branches/gui/src/orxonox/overlays/hud/HUDRadar.cc	(revision 2815)
@@ -94,5 +94,5 @@
     void HUDRadar::displayObject(RadarViewable* object, bool bIsMarked)
     {
-        if (object == (RadarViewable*)this->owner_)
+        if (object == static_cast<RadarViewable*>(this->owner_))
             return;
 
