Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-05-05 17:45:30 +0000
committerStijn Buys <ingar@osirion.org>2008-05-05 17:45:30 +0000
commitc11c0174ece92b4502648ad33653975bfdfc39a0 (patch)
tree88860bfcbb7206834e61533af79f7631b5638cb2 /src/model/map.cc
parent7218e3bd4616d4706090ec47d72845a2bb89c6a3 (diff)
lights with entity color, sunlight, network stats
Diffstat (limited to 'src/model/map.cc')
-rw-r--r--src/model/map.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/model/map.cc b/src/model/map.cc
index 8b70b95..618db79 100644
--- a/src/model/map.cc
+++ b/src/model/map.cc
@@ -14,6 +14,11 @@
namespace model {
+// function to test spawnflags
+inline bool spawnflag_isset(unsigned int spawnflags, unsigned int flag) {
+ return ((spawnflags & flag) == flag);
+}
+
Model * Map::load(std::string const &name)
{
// open the .map file
@@ -49,7 +54,8 @@ Model * Map::load(std::string const &name)
continue;
} else if (mapfile.got_key_int("spawnflags", u)) {
- light->light_strobe = ((u & 1) == 1);
+ light->light_strobe = spawnflag_isset(u, 1);
+ light->light_entity = spawnflag_isset(u, 2);
} else if (mapfile.got_key_float("light", light->light_radius)) {
light->light_radius /= 100.0f;