Index: code/branches/cpp11_v2/src/orxonox/graphics/Light.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/graphics/Light.cc	(revision 10994)
+++ code/branches/cpp11_v2/src/orxonox/graphics/Light.cc	(revision 10996)
@@ -44,7 +44,7 @@
 
     // Be sure we don't do bad conversions
-    static_assert((int)Ogre::Light::LT_POINT       == (int)Light::Point,       "check enum");
-    static_assert((int)Ogre::Light::LT_DIRECTIONAL == (int)Light::Directional, "check enum");
-    static_assert((int)Ogre::Light::LT_SPOTLIGHT   == (int)Light::Spotlight,   "check enum");
+    static_assert((int)Ogre::Light::LT_POINT       == (int)Light::Type::Point,       "check enum");
+    static_assert((int)Ogre::Light::LT_DIRECTIONAL == (int)Light::Type::Directional, "check enum");
+    static_assert((int)Ogre::Light::LT_SPOTLIGHT   == (int)Light::Type::Spotlight,   "check enum");
 
     Light::Light(Context* context) : StaticEntity(context)
@@ -55,5 +55,5 @@
         this->diffuse_ = ColourValue::White;
         this->specular_ = ColourValue::White;
-        this->type_ = Light::Point;
+        this->type_ = Type::Point;
         this->attenuation_ = Vector4(100000, 1, 0, 0);
         this->spotlightRange_ = Vector3(40.0f, 30.0f, 1.0f);
@@ -105,5 +105,5 @@
     void Light::registerVariables()
     {
-        registerVariable((int&)this->type_,     VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateType));
+        registerVariable(this->type_,           VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateType));
         registerVariable(this->diffuse_,        VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateDiffuseColour));
         registerVariable(this->specular_,       VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateSpecularColour));
@@ -126,5 +126,5 @@
     void Light::updateAttenuation()
     {
-        if (this->light_ && this->type_ != Light::Directional)
+        if (this->light_ && this->type_ != Type::Directional)
             this->light_->setAttenuation(this->attenuation_.x, this->attenuation_.y, this->attenuation_.z, this->attenuation_.w);
     }
@@ -132,5 +132,5 @@
     void Light::updateSpotlightRange()
     {
-        if (this->light_ && this->type_ == Light::Spotlight)
+        if (this->light_ && this->type_ == Type::Spotlight)
             this->light_->setSpotlightRange(Degree(this->spotlightRange_.x), Degree(this->spotlightRange_.y), this->spotlightRange_.z);
     }
@@ -139,11 +139,11 @@
     {
         if (type == "point")
-            this->setType(Light::Point);
+            this->setType(Type::Point);
         else if (type == "directional")
-            this->setType(Light::Directional);
+            this->setType(Type::Directional);
         else if (type == "spotlight")
-            this->setType(Light::Spotlight);
+            this->setType(Type::Spotlight);
         else
-            this->setType(Light::Point);
+            this->setType(Type::Point);
     }
 
@@ -152,9 +152,9 @@
         switch (this->type_)
         {
-            case Light::Directional:
+            case Type::Directional:
                 return "directional";
-            case Light::Spotlight:
+            case Type::Spotlight:
                 return "spotlight";
-            case Light::Point:
+            case Type::Point:
             default:
                 return "point";
@@ -168,7 +168,7 @@
             this->light_->setType(static_cast<Ogre::Light::LightTypes>(this->type_));
 
-            if (this->type_ != Light::Directional)
+            if (this->type_ != Type::Directional)
                 this->updateAttenuation();
-            if (this->type_ == Light::Spotlight)
+            if (this->type_ == Type::Spotlight)
                 this->updateSpotlightRange();
         }
Index: code/branches/cpp11_v2/src/orxonox/graphics/Light.h
===================================================================
--- code/branches/cpp11_v2/src/orxonox/graphics/Light.h	(revision 10994)
+++ code/branches/cpp11_v2/src/orxonox/graphics/Light.h	(revision 10996)
@@ -42,5 +42,5 @@
     {
         public:
-            enum LightTypes // Copy from the Ogre enum
+            enum class Type // Copy from the Ogre enum
             {
                 /// Point light sources give off light equally in all directions, so require only position not direction
@@ -63,7 +63,7 @@
                 { return this->light_; }
 
-            inline void setType(Light::LightTypes type)
+            inline void setType(Light::Type type)
                 { this->type_ = type; this->updateType(); }
-            inline Light::LightTypes getType() const
+            inline Light::Type getType() const
                 { return this->type_; }
 
@@ -144,5 +144,5 @@
 
             Ogre::Light* light_;
-            LightTypes type_;
+            Light::Type type_;
             ColourValue diffuse_;
             ColourValue specular_;
