summaryrefslogtreecommitdiff
path: root/src/mapblockobject.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2010-12-13 03:19:12 +0200
committerPerttu Ahola <celeron55@gmail.com>2010-12-13 03:19:12 +0200
commit571fb14f9480a0fd70d7cfeb0484c9513153c33a (patch)
tree64601662d351d986fbadaef2c410c90a38241634 /src/mapblockobject.h
parent47a593b5197393d8f8cdfe18b1aa46b8bc1f3fb6 (diff)
downloadminetest-571fb14f9480a0fd70d7cfeb0484c9513153c33a.tar.gz
minetest-571fb14f9480a0fd70d7cfeb0484c9513153c33a.tar.bz2
minetest-571fb14f9480a0fd70d7cfeb0484c9513153c33a.zip
working nicely
Diffstat (limited to 'src/mapblockobject.h')
-rw-r--r--src/mapblockobject.h64
1 files changed, 57 insertions, 7 deletions
diff --git a/src/mapblockobject.h b/src/mapblockobject.h
index 2a5f9c933..61bd6610d 100644
--- a/src/mapblockobject.h
+++ b/src/mapblockobject.h
@@ -28,13 +28,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "constants.h"
#include "debug.h"
-enum
-{
- MAPBLOCKOBJECT_TYPE_TEST=0,
- MAPBLOCKOBJECT_TYPE_TEST2=1,
- MAPBLOCKOBJECT_TYPE_SIGN=2,
- MAPBLOCKOBJECT_TYPE_RAT=3,
-};
+#define MAPBLOCKOBJECT_TYPE_TEST 0
+#define MAPBLOCKOBJECT_TYPE_TEST2 1
+#define MAPBLOCKOBJECT_TYPE_SIGN 2
+#define MAPBLOCKOBJECT_TYPE_RAT 3
+// Used for handling selecting special stuff
+//#define MAPBLOCKOBJECT_TYPE_PSEUDO 4
class MapBlock;
@@ -170,6 +169,57 @@ protected:
friend class MapBlockObjectList;
};
+#if 0
+/*
+ Used for handling selections of special stuff
+*/
+class PseudoMBObject : public MapBlockObject
+{
+public:
+ // The constructor of every MapBlockObject should be like this
+ PseudoMBObject(MapBlock *block, s16 id, v3f pos):
+ MapBlockObject(block, id, pos)
+ {
+ }
+ virtual ~PseudoMBObject()
+ {
+ if(m_selection_box)
+ delete m_selection_box;
+ }
+
+ /*
+ Implementation interface
+ */
+ virtual u16 getTypeId() const
+ {
+ return MAPBLOCKOBJECT_TYPE_PSEUDO;
+ }
+ virtual void serialize(std::ostream &os, u8 version)
+ {
+ assert(0);
+ }
+ virtual void update(std::istream &is, u8 version)
+ {
+ assert(0);
+ }
+ virtual bool serverStep(float dtime)
+ {
+ assert(0);
+ }
+
+ /*
+ Special methods
+ */
+
+ void setSelectionBox(core::aabbox3d<f32> box)
+ {
+ m_selection_box = new core::aabbox3d<f32>(box);
+ }
+
+protected:
+};
+#endif
+
class TestObject : public MapBlockObject
{
public: