Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Cleanup of particle & particlespawner structures and code (#9893)
  • Loading branch information
sfan5 committed May 22, 2020
1 parent 1bcdc2d commit 1357ea1
Show file tree
Hide file tree
Showing 11 changed files with 502 additions and 680 deletions.
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Expand Up @@ -427,6 +427,7 @@ set(common_SRCS
noise.cpp
objdef.cpp
object_properties.cpp
particles.cpp
pathfinder.cpp
player.cpp
porting.cpp
Expand Down
45 changes: 9 additions & 36 deletions src/client/clientevent.h
Expand Up @@ -21,8 +21,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,

#include <string>
#include "irrlichttypes_bloated.h"
#include "hud.h"
#include "skyparams.h"

struct ParticleParameters;
struct ParticleSpawnerParameters;
struct SkyboxParams;
struct SunParams;
struct MoonParams;
struct StarParams;

enum ClientEventType : u8
{
Expand Down Expand Up @@ -77,44 +82,12 @@ struct ClientEvent
} show_formspec;
// struct{
//} textures_updated;
ParticleParameters *spawn_particle;
struct
{
v3f *pos;
v3f *vel;
v3f *acc;
f32 expirationtime;
f32 size;
bool collisiondetection;
bool collision_removal;
bool object_collision;
bool vertical;
std::string *texture;
struct TileAnimationParams animation;
u8 glow;
} spawn_particle;
struct
{
u16 amount;
f32 spawntime;
v3f *minpos;
v3f *maxpos;
v3f *minvel;
v3f *maxvel;
v3f *minacc;
v3f *maxacc;
f32 minexptime;
f32 maxexptime;
f32 minsize;
f32 maxsize;
bool collisiondetection;
bool collision_removal;
bool object_collision;
ParticleSpawnerParameters *p;
u16 attached_id;
bool vertical;
std::string *texture;
u64 id;
struct TileAnimationParams animation;
u8 glow;
} add_particlespawner;
struct
{
Expand Down

0 comments on commit 1357ea1

Please sign in to comment.