diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-11-26 12:35:30 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-11-29 19:13:53 +0200 |
commit | 70363847aacbf765c60a294940ba50c8bb256cc6 (patch) | |
tree | b1f5c1e5c519f578b858be98b98a522020d6515d /src/content_cao.h | |
parent | 1ce749c86a2af539549ecefab5d3de0fde8aeedf (diff) | |
download | minetest-70363847aacbf765c60a294940ba50c8bb256cc6.tar.gz minetest-70363847aacbf765c60a294940ba50c8bb256cc6.tar.bz2 minetest-70363847aacbf765c60a294940ba50c8bb256cc6.zip |
Reshape LuaEntityCAO implementation a bit and make TNT to blink
Diffstat (limited to 'src/content_cao.h')
-rw-r--r-- | src/content_cao.h | 53 |
1 files changed, 15 insertions, 38 deletions
diff --git a/src/content_cao.h b/src/content_cao.h index fa7a0cb4c..37d9c4ed6 100644 --- a/src/content_cao.h +++ b/src/content_cao.h @@ -391,48 +391,25 @@ private: LuaEntityCAO */ -struct LuaEntityProperties; - class LuaEntityCAO : public ClientActiveObject { public: - LuaEntityCAO(IGameDef *gamedef); - virtual ~LuaEntityCAO(); - - u8 getType() const - { - return ACTIVEOBJECT_TYPE_LUAENTITY; - } - - static ClientActiveObject* create(IGameDef *gamedef); - - void addToScene(scene::ISceneManager *smgr, ITextureSource *tsrc); - 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 pos_translator.vect_show;} - + LuaEntityCAO(IGameDef *gamedef): + ClientActiveObject(0, gamedef) + {} + virtual ~LuaEntityCAO(){} + virtual u8 getType() const=0; + virtual void addToScene(scene::ISceneManager *smgr, ITextureSource *tsrc)=0; + virtual void removeFromScene()=0; + virtual void updateLight(u8 light_at_pos)=0; + virtual v3s16 getLightPosition()=0; + virtual void updateNodePos()=0; + virtual void step(float dtime, ClientEnvironment *env)=0; + virtual void processMessage(const std::string &data)=0; + virtual void initialize(const std::string &data)=0; + virtual core::aabbox3d<f32>* getSelectionBox()=0; + virtual v3f getPosition()=0; private: - core::aabbox3d<f32> m_selection_box; - scene::IMeshSceneNode *m_meshnode; - scene::MyBillboardSceneNode *m_spritenode; - v3f m_position; - v3f m_velocity; - v3f m_acceleration; - float m_yaw; - struct LuaEntityProperties *m_prop; - SmoothTranslator pos_translator; }; |