Fix water-glass and water-lava surfaces
[oweals/minetest.git] / src / clientobject.h
index 50fae67c287bb7f20f194256ec08d9e06e0f3d4a..60d293ff41049ff2f2aed0e5c34683609c4fff14 100644 (file)
@@ -51,6 +51,7 @@ public:
        virtual core::aabbox3d<f32>* getSelectionBox(){return NULL;}
        virtual core::aabbox3d<f32>* getCollisionBox(){return NULL;}
        virtual v3f getPosition(){return v3f(0,0,0);}
+       virtual bool doShowSelectionBox(){return true;}
        
        // Step object in time
        virtual void step(float dtime, ClientEnvironment *env){}
@@ -59,7 +60,7 @@ public:
        virtual void processMessage(const std::string &data){}
 
        virtual std::string infoText() {return "";}
-
+       
        /*
                This takes the return value of
                ServerActiveObject::getClientInitializationData
@@ -69,6 +70,10 @@ public:
        // Create a certain type of ClientActiveObject
        static ClientActiveObject* create(u8 type);
 
+       // If returns true, punch will not be sent to the server
+       virtual bool directReportPunch(const std::string &toolname, v3f dir)
+       { return false; }
+
 protected:
        // Used for creating objects based on type
        typedef ClientActiveObject* (*Factory)();
@@ -95,78 +100,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, ClientEnvironment *env);
-
-       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, ClientEnvironment *env);
-
-       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