aboutsummaryrefslogtreecommitdiff
path: root/src/content_sao.h
diff options
context:
space:
mode:
authorNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-20 22:04:24 +0200
committerNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-20 22:05:57 +0200
commit8129d16dd3f7e5575c444b4792e667a1e3df98e2 (patch)
tree1c3e56bba8c197275bc63b97d8a18620a3523560 /src/content_sao.h
parent4cbdf136fc70016f2721db311bda5ade7a3cdab8 (diff)
downloadminetest-8129d16dd3f7e5575c444b4792e667a1e3df98e2.tar.gz
minetest-8129d16dd3f7e5575c444b4792e667a1e3df98e2.tar.bz2
minetest-8129d16dd3f7e5575c444b4792e667a1e3df98e2.zip
+ fireflies
Diffstat (limited to 'src/content_sao.h')
-rw-r--r--src/content_sao.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/content_sao.h b/src/content_sao.h
index 030232a9e..e5b1223d4 100644
--- a/src/content_sao.h
+++ b/src/content_sao.h
@@ -113,6 +113,30 @@ private:
float m_after_jump_timer;
};
+class FireflySAO : public ServerActiveObject
+{
+public:
+ FireflySAO(ServerEnvironment *env, u16 id, v3f pos);
+ u8 getType() const
+ {return ACTIVEOBJECT_TYPE_FIREFLY;}
+ static ServerActiveObject* create(ServerEnvironment *env, u16 id, v3f pos,
+ const std::string &data);
+ void step(float dtime, bool send_recommended);
+ std::string getClientInitializationData();
+ std::string getStaticData();
+ InventoryItem* createPickedUpItem();
+private:
+ bool m_is_active;
+ IntervalLimiter m_inactive_interval;
+ v3f m_speed_f;
+ v3f m_oldpos;
+ v3f m_last_sent_position;
+ float m_yaw;
+ float m_counter1;
+ float m_counter2;
+ float m_age;
+ bool m_touching_ground;
+};
#endif