Index: code/branches/objecthierarchy/src/core/BaseObject.cc
===================================================================
--- code/branches/objecthierarchy/src/core/BaseObject.cc	(revision 2154)
+++ code/branches/objecthierarchy/src/core/BaseObject.cc	(revision 2155)
@@ -41,4 +41,5 @@
 #include "Template.h"
 #include "util/String.h"
+#include "util/mbool.h"
 
 namespace orxonox
Index: code/branches/objecthierarchy/src/core/BaseObject.h
===================================================================
--- code/branches/objecthierarchy/src/core/BaseObject.h	(revision 2154)
+++ code/branches/objecthierarchy/src/core/BaseObject.h	(revision 2155)
@@ -45,4 +45,5 @@
 #include "XMLIncludes.h"
 #include "Event.h"
+#include "util/mbool.h"
 
 namespace orxonox
@@ -73,19 +74,27 @@
             /** @brief Sets the state of the objects activity. @param bActive True = active */
             inline void setActive(bool bActive)
-            { 
-                bool bTemp = this->bActive_;
-                this->bActive_ = bActive;
-                if ( bTemp != bActive )
+            {
+                if (this->bActive_ != bActive)
+                {
+                    this->bActive_ = bActive;
                     this->changedActivity();
+                }
             }
             /** @brief Returns the state of the objects activity. @return The state of the activity */
-            inline bool isActive() const { return this->bActive_; }
+            inline const mbool& isActive() const { return this->bActive_; }
             /** @brief This function gets called if the activity of the object changes. */
             virtual void changedActivity() {}
 
             /** @brief Sets the state of the objects visibility. @param bVisible True = visible */
-            inline void setVisible(bool bVisible) { this->bVisible_ = bVisible; this->changedVisibility(); }
+            inline void setVisible(bool bVisible)
+            {
+                if (this->bVisible_ != bVisible)
+                {
+                    this->bVisible_ = bVisible;
+                    this->changedVisibility();
+                }
+            }
             /** @brief Returns the state of the objects visibility. @return The state of the visibility */
-            inline bool isVisible() const { return this->bVisible_; }
+            inline const mbool& isVisible() const { return this->bVisible_; }
             /** @brief This function gets called if the visibility of the object changes. */
             virtual void changedVisibility() {}
@@ -144,6 +153,6 @@
             std::string name_;                          //!< The name of the object
             std::string oldName_;                       //!< The old name of the object
-            bool bActive_;                              //!< True = the object is active
-            bool bVisible_;                             //!< True = the object is visible
+            mbool bActive_;                             //!< True = the object is active
+            mbool bVisible_;                            //!< True = the object is visible
 
         private:
Index: code/branches/objecthierarchy/src/orxonox/objects/worldentities/pawns/Spectator.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/worldentities/pawns/Spectator.cc	(revision 2154)
+++ code/branches/objecthierarchy/src/orxonox/objects/worldentities/pawns/Spectator.cc	(revision 2155)
@@ -203,5 +203,5 @@
                 {
                     if (this->getGametype()->isStartCountdownRunning())
-                        this->hudmode_ = 2 + 10*ceil(this->getGametype()->getStartCountdown());
+                        this->hudmode_ = 2 + 10*(int)ceil(this->getGametype()->getStartCountdown());
                     else
                         this->hudmode_ = 3;
Index: code/branches/objecthierarchy/src/util/Math.h
===================================================================
--- code/branches/objecthierarchy/src/util/Math.h	(revision 2154)
+++ code/branches/objecthierarchy/src/util/Math.h	(revision 2155)
@@ -39,4 +39,5 @@
 #include <ostream>
 #include <string>
+#include <cmath>
 #include <boost/static_assert.hpp>
 
@@ -145,23 +146,4 @@
     {
         return x*x*x;
-    }
-
-    /**
-        @brief Rounds the value down.
-    */
-    template <typename T>
-    inline int floor(T x)
-    {
-        return (int)(x);
-    }
-
-    /**
-        @brief Rounds the value up.
-    */
-    template <typename T>
-    inline int ceil(T x)
-    {
-        int temp = floor(x);
-        return (temp != x) ? (temp + 1) : temp;
     }
 
Index: code/branches/objecthierarchy/src/util/mbool.h
===================================================================
--- code/branches/objecthierarchy/src/util/mbool.h	(revision 2155)
+++ code/branches/objecthierarchy/src/util/mbool.h	(revision 2155)
@@ -0,0 +1,79 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _mbool_H__
+#define _mbool_H__
+
+#include "UtilPrereqs.h"
+
+namespace orxonox
+{
+    struct _UtilExport mbool
+    {
+        public:
+            inline mbool(bool value = false)
+                { this->value_.memory_ = 0; this->value_.bool_ = value; }
+            inline mbool(const mbool& value)
+                { this->value_.memory_ = value.value_.memory_; }
+
+            inline const mbool& operator=(bool value)
+                { if (value != this->value_.bool_) { ++this->value_.memory_; } return (*this); }
+            inline const mbool& operator=(const mbool& value)
+                { this->value_.memory_ = value.value_.memory_; return (*this); }
+
+            inline mbool& operator++()
+                { ++this->value_.memory_; return (*this); }
+            inline mbool operator++(int i)
+                { mbool temp = (*this); ++this->value_.memory_; return temp; }
+
+            inline operator bool() const
+                { return this->value_.bool_; }
+
+            inline bool operator==(bool other) const
+                { return this->value_.bool_ == other; }
+            inline bool operator!=(bool other) const
+                { return this->value_.bool_ != other; }
+
+            inline bool operator==(const mbool& other) const
+                { return this->value_.memory_ == other.value_.memory_; }
+            inline bool operator!=(const mbool& other) const
+                { return this->value_.memory_ != other.value_.memory_; }
+
+            inline bool operator!() const
+                { return (!this->value_.bool_); }
+
+        private:
+            union
+            {
+                bool bool_ : 1;
+                unsigned char memory_;
+            } value_;
+    };
+}
+
+#endif /* _mbool_H__ */
