From 11229dcfef77baab5a7a3893a7c6281fbc5f7211 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 7 Dec 2008 14:48:54 +0000 Subject: flame particle systems --- src/model/classes.cc | 2 ++ src/model/classes.h | 14 ++++++++++---- src/model/map.cc | 6 +++++- 3 files changed, 17 insertions(+), 5 deletions(-) (limited to 'src/model') diff --git a/src/model/classes.cc b/src/model/classes.cc index 4042c38..06ebda3 100644 --- a/src/model/classes.cc +++ b/src/model/classes.cc @@ -43,6 +43,8 @@ Flare::~Flare() Particles::Particles() : particles_location() { + particles_entity = false; + particles_engine = false; } Particles::Particles(math::Vector3f const & location) : diff --git a/src/model/classes.h b/src/model/classes.h index 175070a..a0e9d1f 100644 --- a/src/model/classes.h +++ b/src/model/classes.h @@ -147,15 +147,21 @@ public: return particles_script; } - inline const float radius() const + inline bool entity() const + { + return particles_entity; + } + + inline bool engine() const { - return particles_radius; + return particles_engine; } - std::string particles_script; math::Vector3f particles_location; math::Axis particles_axis; - float particles_radius; + + bool particles_entity; + bool particles_engine; }; /* ---- class Dock ------------------------------------------------- */ diff --git a/src/model/map.cc b/src/model/map.cc index 618fd51..f2c519f 100644 --- a/src/model/map.cc +++ b/src/model/map.cc @@ -989,7 +989,11 @@ Model * Map::load(std::string const &name) } else if (mapfile.got_key_float("roll", angle)) { particles->particles_axis.change_roll(angle); -/* + + } else if (mapfile.got_key_int("spawnflags", u)) { + particles->particles_entity = spawnflag_isset(u, 2); + particles->particles_engine = spawnflag_isset(u, 4); +/* } else if (mapfile.got_key_float("radius", particles->particles_radius)) { particles->particles_radius *= LIGHTSCALE; */ -- cgit v1.2.3