[Orxonox-commit 5911] r10570 - in code/branches/core7/src: libraries/core orxonox

landauf at orxonox.net landauf at orxonox.net
Tue Sep 8 22:47:37 CEST 2015


Author: landauf
Date: 2015-09-08 22:47:36 +0200 (Tue, 08 Sep 2015)
New Revision: 10570

Modified:
   code/branches/core7/src/libraries/core/BaseObject.h
   code/branches/core7/src/orxonox/Scene.cc
Log:
not sure why Level was synchronized in Scene, but it doesn't seem to be necessary anymore

Modified: code/branches/core7/src/libraries/core/BaseObject.h
===================================================================
--- code/branches/core7/src/libraries/core/BaseObject.h	2015-09-08 20:18:05 UTC (rev 10569)
+++ code/branches/core7/src/libraries/core/BaseObject.h	2015-09-08 20:47:36 UTC (rev 10570)
@@ -160,16 +160,8 @@
             inline Gametype* getOldGametype() const { return this->oldGametype_; }
             virtual void changedGametype() {}
 
-            inline void setLevel(const StrongPtr<Level>& level)
-            {
-                if (level != this->level_)
-                {
-                    this->level_ = level;
-                    this->changedLevel();
-                }
-            }
+            inline void setLevel(const StrongPtr<Level>& level) { this->level_ = level; }
             inline const StrongPtr<Level>& getLevel() const { return this->level_; }
-            virtual void changedLevel() {}
 
             void addEventSource(BaseObject* source, const std::string& state);
             void removeEventSource(BaseObject* source);

Modified: code/branches/core7/src/orxonox/Scene.cc
===================================================================
--- code/branches/core7/src/orxonox/Scene.cc	2015-09-08 20:18:05 UTC (rev 10569)
+++ code/branches/core7/src/orxonox/Scene.cc	2015-09-08 20:47:36 UTC (rev 10570)
@@ -141,7 +141,6 @@
         registerVariable(this->gravity_,            VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_gravity));
         registerVariable(this->bHasPhysics_,        VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_hasPhysics));
         registerVariable(this->bShadows_,           VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyShadows));
-        registerVariable(this->getLevel(),          VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::changedLevel));
     }
 
     void Scene::setNegativeWorldRange(const Vector3& range)




More information about the Orxonox-commit mailing list