From ab7477c4c3e2a3647dc4fb65c71567946d33b0e3 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 19 Dec 2010 19:11:05 +0200 Subject: added dedicated server build without irrlicht --- src/mapblockobject.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'src/mapblockobject.h') diff --git a/src/mapblockobject.h b/src/mapblockobject.h index 8518d6b11..1a403bfe1 100644 --- a/src/mapblockobject.h +++ b/src/mapblockobject.h @@ -135,6 +135,12 @@ public: // A return value of true requests deletion of the object by the caller. // NOTE: Only server calls this. virtual bool serverStep(float dtime) { return false; }; + +#ifdef SERVER + void clientStep(float dtime) {}; + void addToScene(void *smgr) {}; + void removeFromScene() {}; +#else // This should do slight animations only or so virtual void clientStep(float dtime) {}; @@ -147,6 +153,7 @@ public: // Should return silently if there is nothing to remove // NOTE: This has to be called before calling destructor virtual void removeFromScene() {}; +#endif virtual std::string infoText() { return ""; } @@ -270,8 +277,8 @@ public: virtual bool serverStep(float dtime) { return false; }; virtual void clientStep(float dtime) {}; - virtual void addToScene(scene::ISceneManager *smgr) = 0; - virtual void removeFromScene() = 0; + /*virtual void addToScene(scene::ISceneManager *smgr) = 0; + virtual void removeFromScene() = 0;*/ /* Special methods @@ -375,7 +382,7 @@ public: return false; } - +#ifndef SERVER virtual void clientStep(float dtime) { m_pos += m_speed * dtime; @@ -424,6 +431,7 @@ public: m_node = NULL; } } +#endif virtual std::string getInventoryString() { @@ -520,6 +528,7 @@ public: { return false; } +#ifndef SERVER virtual void addToScene(scene::ISceneManager *smgr) { if(m_node != NULL) @@ -587,6 +596,7 @@ public: m_node = NULL; } } +#endif virtual std::string infoText() { @@ -601,14 +611,15 @@ public: /* Special methods */ - void updateSceneNode() { +#ifndef SERVER if(m_node != NULL) { m_node->setPosition(getAbsolutePos()); m_node->setRotation(v3f(0, m_yaw, 0)); } +#endif } void setText(std::string text) -- cgit v1.2.3