]> git.lizzy.rs Git - minetest.git/blobdiff - src/particles.h
Lua_api.txt: Improve and complete ABM documentation
[minetest.git] / src / particles.h
index b3c02f4c463ffff3dbd1251b2746988c2100ec56..72e48911ac27b6d7e29bf4405e9565796bc669e0 100644 (file)
@@ -23,7 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "irrlichttypes_extrabloated.h"
 #include "client/tile.h"
 #include "localplayer.h"
-#include "environment.h"
 #include "tileanimation.h"
 
 struct ClientEvent;
@@ -54,7 +53,7 @@ class Particle : public scene::ISceneNode
                u8 glow,
                video::SColor color = video::SColor(0xFFFFFFFF)
        );
-       ~Particle();
+       ~Particle() = default;
 
        virtual const aabb3f &getBoundingBox() const
        {
@@ -115,7 +114,7 @@ class Particle : public scene::ISceneNode
 
 class ParticleSpawner
 {
-       public:
+public:
        ParticleSpawner(IGameDef* gamedef,
                LocalPlayer *player,
                u16 amount,
@@ -134,15 +133,19 @@ class ParticleSpawner
                const struct TileAnimationParams &anim, u8 glow,
                ParticleManager* p_manager);
 
-       ~ParticleSpawner();
+       ~ParticleSpawner() = default;
 
        void step(float dtime, ClientEnvironment *env);
 
        bool get_expired ()
        { return (m_amount <= 0) && m_spawntime != 0; }
 
-       private:
-       ParticleManager* m_particlemanager;
+private:
+       void spawnParticle(ClientEnvironment *env, float radius,
+                       bool is_attached, const v3f &attached_pos,
+                       float attached_yaw);
+
+       ParticleManager *m_particlemanager;
        float m_time;
        IGameDef *m_gamedef;
        LocalPlayer *m_player;
@@ -186,9 +189,6 @@ friend class ParticleSpawner;
        void addDiggingParticles(IGameDef *gamedef, LocalPlayer *player, v3s16 pos,
                const MapNode &n, const ContentFeatures &f);
 
-       void addPunchingParticles(IGameDef *gamedef, LocalPlayer *player, v3s16 pos,
-               const MapNode &n, const ContentFeatures &f);
-
        void addNodeParticle(IGameDef *gamedef, LocalPlayer *player, v3s16 pos,
                const MapNode &n, const ContentFeatures &f);