[Orxonox-commit 5903] r10562 - in code/branches/core7/src: libraries/core libraries/network/synchronisable orxonox
landauf at orxonox.net
landauf at orxonox.net
Sat Aug 29 23:15:29 CEST 2015
Author: landauf
Date: 2015-08-29 23:15:28 +0200 (Sat, 29 Aug 2015)
New Revision: 10562
Modified:
code/branches/core7/src/libraries/core/Namespace.cc
code/branches/core7/src/libraries/network/synchronisable/Synchronisable.cc
code/branches/core7/src/orxonox/Level.cc
code/branches/core7/src/orxonox/Scene.cc
Log:
removed unnecessary code - this is all done by passing the context to the BaseObject's constructor
Modified: code/branches/core7/src/libraries/core/Namespace.cc
===================================================================
--- code/branches/core7/src/libraries/core/Namespace.cc 2015-08-29 20:53:30 UTC (rev 10561)
+++ code/branches/core7/src/libraries/core/Namespace.cc 2015-08-29 21:15:28 UTC (rev 10562)
@@ -104,7 +104,6 @@
void Namespace::loadObjects(BaseObject* object)
{
- object->setNamespace(this);
}
const BaseObject* Namespace::saveObjects(unsigned int index) const
Modified: code/branches/core7/src/libraries/network/synchronisable/Synchronisable.cc
===================================================================
--- code/branches/core7/src/libraries/network/synchronisable/Synchronisable.cc 2015-08-29 20:53:30 UTC (rev 10561)
+++ code/branches/core7/src/libraries/network/synchronisable/Synchronisable.cc 2015-08-29 21:15:28 UTC (rev 10562)
@@ -181,12 +181,6 @@
//no->contextID=header.getContextID(); //TODO: remove this
no->setClassID(header.getClassID());
assert(no->contextID_ == header.getContextID());
- if( context )
- {
- BaseObject* boContext = orxonox_cast<BaseObject*>(context);
- if (boContext)
- bo->setLevel(boContext->getLevel()); // Note: this ensures that the level is known on the client for child objects of the scene (and the scene itself)
- }
//assert(no->classID_ == header.getClassID());
orxout(verbose, context::network) << "fabricate objectID_: " << no->objectID_ << " classID_: " << no->classID_ << endl;
// update data and create object/entity...
Modified: code/branches/core7/src/orxonox/Level.cc
===================================================================
--- code/branches/core7/src/orxonox/Level.cc 2015-08-29 20:53:30 UTC (rev 10561)
+++ code/branches/core7/src/orxonox/Level.cc 2015-08-29 21:15:28 UTC (rev 10562)
@@ -133,7 +133,6 @@
void Level::addObject(BaseObject* object)
{
this->objects_.push_back(object);
- object->setGametype(this->getGametype());
object->setLevel(this);
}
Modified: code/branches/core7/src/orxonox/Scene.cc
===================================================================
--- code/branches/core7/src/orxonox/Scene.cc 2015-08-29 20:53:30 UTC (rev 10561)
+++ code/branches/core7/src/orxonox/Scene.cc 2015-08-29 21:15:28 UTC (rev 10562)
@@ -61,7 +61,7 @@
{
RegisterObject(Scene);
- this->setScene(StrongPtr<Scene>(this, false), OBJECTID_UNKNOWN);
+ this->setScene(StrongPtr<Scene>(this, false), this->getObjectID());
this->bShadows_ = true;
this->bDebugDrawPhysics_ = false;
this->debugDrawer_ = NULL;
@@ -315,7 +315,6 @@
void Scene::addObject(BaseObject* object)
{
this->objects_.push_back(object);
- object->setScene(this, this->getObjectID());
}
BaseObject* Scene::getObject(unsigned int index) const
More information about the Orxonox-commit
mailing list