1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

[CSM] Add functions to create particles and particlespawners. (#6072)

This commit is contained in:
red-001 2018-01-20 22:31:53 +00:00 committed by Loïc Blot
parent da80e8af8a
commit 5dab742645
10 changed files with 341 additions and 13 deletions

View file

@ -192,6 +192,14 @@ public:
void addNodeParticle(IGameDef *gamedef, LocalPlayer *player, v3s16 pos,
const MapNode &n, const ContentFeatures &f);
u32 getSpawnerId() const
{
for (u32 id = 0;; ++id) { // look for unused particlespawner id
if (m_particle_spawners.find(id) == m_particle_spawners.end())
return id;
}
}
protected:
void addParticle(Particle* toadd);