Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/model')
-rw-r--r--src/model/asefile.h5
-rw-r--r--src/model/mapfile.cc1
-rw-r--r--src/model/parts.cc1
-rw-r--r--src/model/parts.h9
4 files changed, 14 insertions, 2 deletions
diff --git a/src/model/asefile.h b/src/model/asefile.h
index dc1516b..c792a9d 100644
--- a/src/model/asefile.h
+++ b/src/model/asefile.h
@@ -86,7 +86,10 @@ private:
inline const std::string &name() const { return asefile_name; }
- inline const bool is_open() const { return asefile_ifs.is_open(); }
+ inline bool is_open()
+ {
+ return asefile_ifs.is_open();
+ }
std::string asefile_name;
diff --git a/src/model/mapfile.cc b/src/model/mapfile.cc
index 385f986..271af06 100644
--- a/src/model/mapfile.cc
+++ b/src/model/mapfile.cc
@@ -1031,6 +1031,7 @@ Model * MapFile::load(std::string const &name)
} else if (mapfile.got_key_int("spawnflags", u)) {
light->light_strobe = spawnflag_isset(u, 1);
light->light_entity = spawnflag_isset(u, 2);
+ light->light_engine = spawnflag_isset(u, 4);
} else if (mapfile.got_key_float("light", light->light_radius)) {
light->light_radius *= LIGHTSCALE;
diff --git a/src/model/parts.cc b/src/model/parts.cc
index a4a2d1e..d4ff20b 100644
--- a/src/model/parts.cc
+++ b/src/model/parts.cc
@@ -21,6 +21,7 @@ Light::Light() :
light_offset = 0.0f;
light_time = 0.5f;
light_flare = 0;
+ light_engine = 0;
render_texture = 0;
}
diff --git a/src/model/parts.h b/src/model/parts.h
index 8593147..3e5e74f 100644
--- a/src/model/parts.h
+++ b/src/model/parts.h
@@ -31,7 +31,7 @@ class Light
public:
Light();
- Light(const math::Vector3f & location, const math::Color & color, bool strobe=false);
+ Light(const math::Vector3f & location, const math::Color & color, bool strobe=false, bool engine=false);
~Light();
@@ -86,6 +86,12 @@ public:
{
return light_flare;
}
+
+ /// true if this light has engine activation
+ inline const bool engine() const
+ {
+ return light_engine;
+ }
/// render texture number
inline size_t texture() const
@@ -97,6 +103,7 @@ public:
math::Color light_color;
bool light_strobe;
bool light_entity;
+ bool light_engine;
float light_radius;
float light_frequency;
float light_offset;