mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Allow vertical axis particle rotation constraint
Use tables for adding particles, deprecate former way. separate particles(pawner) definition, add default values, work with no arguments
This commit is contained in:
parent
a4c5f10ecf
commit
2b1eff7725
10 changed files with 266 additions and 93 deletions
|
@ -42,6 +42,7 @@ class Particle : public scene::ISceneNode
|
|||
float expirationtime,
|
||||
float size,
|
||||
bool collisiondetection,
|
||||
bool vertical,
|
||||
video::ITexture *texture,
|
||||
v2f texpos,
|
||||
v2f texsize
|
||||
|
@ -92,6 +93,7 @@ private:
|
|||
float m_size;
|
||||
u8 m_light;
|
||||
bool m_collisiondetection;
|
||||
bool m_vertical;
|
||||
};
|
||||
|
||||
class ParticleSpawner
|
||||
|
@ -108,6 +110,7 @@ class ParticleSpawner
|
|||
float minexptime, float maxexptime,
|
||||
float minsize, float maxsize,
|
||||
bool collisiondetection,
|
||||
bool vertical,
|
||||
video::ITexture *texture,
|
||||
u32 id);
|
||||
|
||||
|
@ -138,6 +141,7 @@ class ParticleSpawner
|
|||
video::ITexture *m_texture;
|
||||
std::vector<float> m_spawntimes;
|
||||
bool m_collisiondetection;
|
||||
bool m_vertical;
|
||||
};
|
||||
|
||||
void allparticles_step (float dtime, ClientEnvironment &env);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue