]> git.lizzy.rs Git - minetest.git/blobdiff - src/clientobject.h
Get rid of unused variables
[minetest.git] / src / clientobject.h
index ebdcb948eae6f44585726596b147d07370a5372c..c90648483005105d11ccab1db507ac8008074256 100644 (file)
@@ -35,6 +35,8 @@ Some planning
 
 */
 
+class ClientEnvironment;
+
 class ClientActiveObject : public ActiveObject
 {
 public:
@@ -51,11 +53,13 @@ class ClientActiveObject : public ActiveObject
        virtual v3f getPosition(){return v3f(0,0,0);}
        
        // Step object in time
-       virtual void step(float dtime){}
+       virtual void step(float dtime, ClientEnvironment *env){}
        
        // Process a message sent by the server side object
        virtual void processMessage(const std::string &data){}
 
+       virtual std::string infoText() {return "";}
+
        /*
                This takes the return value of
                ServerActiveObject::getClientInitializationData
@@ -66,9 +70,11 @@ class ClientActiveObject : public ActiveObject
        static ClientActiveObject* create(u8 type);
 
 protected:
+       // Used for creating objects based on type
        typedef ClientActiveObject* (*Factory)();
        static void registerType(u16 type, Factory f);
 private:
+       // Used for creating objects based on type
        static core::map<u16, Factory> m_types;
 };
 
@@ -89,78 +95,5 @@ struct DistanceSortedActiveObject
        }
 };
 
-/*
-       TestCAO
-*/
-
-class TestCAO : public ClientActiveObject
-{
-public:
-       TestCAO();
-       virtual ~TestCAO();
-       
-       u8 getType() const
-       {
-               return ACTIVEOBJECT_TYPE_TEST;
-       }
-       
-       static ClientActiveObject* create();
-
-       void addToScene(scene::ISceneManager *smgr);
-       void removeFromScene();
-       void updateLight(u8 light_at_pos);
-       v3s16 getLightPosition();
-       void updateNodePos();
-
-       void step(float dtime);
-
-       void processMessage(const std::string &data);
-
-private:
-       scene::IMeshSceneNode *m_node;
-       v3f m_position;
-};
-
-/*
-       ItemCAO
-*/
-
-class ItemCAO : public ClientActiveObject
-{
-public:
-       ItemCAO();
-       virtual ~ItemCAO();
-       
-       u8 getType() const
-       {
-               return ACTIVEOBJECT_TYPE_ITEM;
-       }
-       
-       static ClientActiveObject* create();
-
-       void addToScene(scene::ISceneManager *smgr);
-       void removeFromScene();
-       void updateLight(u8 light_at_pos);
-       v3s16 getLightPosition();
-       void updateNodePos();
-
-       void step(float dtime);
-
-       void processMessage(const std::string &data);
-
-       void initialize(const std::string &data);
-       
-       core::aabbox3d<f32>* getSelectionBox()
-               {return &m_selection_box;}
-       v3f getPosition()
-               {return m_position;}
-
-private:
-       core::aabbox3d<f32> m_selection_box;
-       scene::IMeshSceneNode *m_node;
-       v3f m_position;
-       std::string m_inventorystring;
-};
-
 #endif