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>2010-11-18 13:50:47 +0000
committerStijn Buys <ingar@osirion.org>2010-11-18 13:50:47 +0000
commit847f84e1e3797277407bc34f5acc51b801b2bf29 (patch)
tree781edbf9e6663a4b6a8cfbaf173f43cfd83db62b /src/model/mapfile.cc
parent445f4a201f205763a2241d87ef81a99b5dd55d26 (diff)
Unified radiant angles conversion into a single math::Axis.assign() method, corrected transformation order.
Removed unnecessary model::LIGHTSCALE constant, light and flare sizes are rescaled according to the global model::SCALE. Added gl::depthfunc, enabled GL_LEQUAL while drawing lights and flares.
Diffstat (limited to 'src/model/mapfile.cc')
-rw-r--r--src/model/mapfile.cc17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/model/mapfile.cc b/src/model/mapfile.cc
index 560bbc1..b74cdbe 100644
--- a/src/model/mapfile.cc
+++ b/src/model/mapfile.cc
@@ -808,10 +808,7 @@ bool MapFile::got_key_axis(math::Axis &axis)
std::istringstream str(value());
if (str >> pitch >> yaw >> roll) {
- axis.clear();
- axis.change_pitch(-pitch);
- axis.change_direction(yaw);
- axis.change_roll(-roll);
+ axis.assign(yaw, pitch, roll);
} else {
unknown_value();
}
@@ -820,7 +817,7 @@ bool MapFile::got_key_axis(math::Axis &axis)
} else if (got_key_float("pitch", pitch)) {
// TODO this warning should eventually disappear
- unknown_error("'" + classname() + ":" + key() + "' has changed polarity");
+ unknown_error("'" + classname() + ":" + key() + "' has switched sign");
axis.change_pitch(-pitch);
return true;
@@ -832,7 +829,7 @@ bool MapFile::got_key_axis(math::Axis &axis)
} else if (got_key_float("roll", roll)) {
// TODO this warning should eventually disappear
- unknown_error("'" + classname() + ":" + key() + "' has changed polarity");
+ unknown_error("'" + classname() + ":" + key() + "' has switched sign");
axis.change_roll(-roll);
return true;
@@ -1131,11 +1128,11 @@ Model * MapFile::load(std::string const &name)
continue;
} else if (mapfile.got_key_float("light", r)) {
- tag_light->set_radius(r * LIGHTSCALE);
+ tag_light->set_radius(r * SCALE);
continue;
} else if (mapfile.got_key_float("radius", r)) {
- tag_light->set_radius(r * LIGHTSCALE);
+ tag_light->set_radius(r * SCALE);
continue;
} else if (mapfile.got_key_float("frequency", r)) {
@@ -1186,11 +1183,11 @@ Model * MapFile::load(std::string const &name)
tag_flare->set_engine(spawnflag_isset(u, 4));
} else if (mapfile.got_key_float("light", r)) {
- tag_flare->set_radius(r * LIGHTSCALE);
+ tag_flare->set_radius(r * SCALE);
continue;
} else if (mapfile.got_key_float("radius", r)) {
- tag_flare->set_radius(r * LIGHTSCALE);
+ tag_flare->set_radius(r * SCALE);
continue;
} else if (mapfile.got_key_float("frequency", r)) {