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:
parent
da80e8af8a
commit
5dab742645
10 changed files with 341 additions and 13 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue