summaryrefslogtreecommitdiff
path: root/src/clientobject.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-12-01 18:23:58 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-12-01 18:23:58 +0200
commitee0d3bacbce612c1abc6016cb7b0d684df25b820 (patch)
treec11c0960cd3a70a795d089c0d2cf3592d4c68fb7 /src/clientobject.cpp
parent9dcfa882b13cdbe38b66fc1b61643da74f112342 (diff)
downloadminetest-ee0d3bacbce612c1abc6016cb7b0d684df25b820.tar.gz
minetest-ee0d3bacbce612c1abc6016cb7b0d684df25b820.tar.bz2
minetest-ee0d3bacbce612c1abc6016cb7b0d684df25b820.zip
Player-is-SAO WIP
Diffstat (limited to 'src/clientobject.cpp')
-rw-r--r--src/clientobject.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/clientobject.cpp b/src/clientobject.cpp
index 7dec1903e..93f3b1cca 100644
--- a/src/clientobject.cpp
+++ b/src/clientobject.cpp
@@ -26,9 +26,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
ClientActiveObject
*/
-ClientActiveObject::ClientActiveObject(u16 id, IGameDef *gamedef):
+ClientActiveObject::ClientActiveObject(u16 id, IGameDef *gamedef,
+ ClientEnvironment *env):
ActiveObject(id),
- m_gamedef(gamedef)
+ m_gamedef(gamedef),
+ m_env(env)
{
}
@@ -37,7 +39,8 @@ ClientActiveObject::~ClientActiveObject()
removeFromScene();
}
-ClientActiveObject* ClientActiveObject::create(u8 type, IGameDef *gamedef)
+ClientActiveObject* ClientActiveObject::create(u8 type, IGameDef *gamedef,
+ ClientEnvironment *env)
{
// Find factory function
core::map<u16, Factory>::Node *n;
@@ -51,7 +54,7 @@ ClientActiveObject* ClientActiveObject::create(u8 type, IGameDef *gamedef)
}
Factory f = n->getValue();
- ClientActiveObject *object = (*f)(gamedef);
+ ClientActiveObject *object = (*f)(gamedef, env);
return object;
}