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/mapfile.cc17
-rw-r--r--src/model/model.h3
2 files changed, 8 insertions, 12 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)) {
diff --git a/src/model/model.h b/src/model/model.h
index 9495285..d3973c9 100644
--- a/src/model/model.h
+++ b/src/model/model.h
@@ -20,9 +20,8 @@
namespace model
{
-/// scaling factor when loading .map geometry
+/// scaling factor when loading model geometry
const float SCALE = 1.0f / 1024.0f;
-const float LIGHTSCALE = 1.0f / 100.0f;
const float ANGLEUP = -1.0f;
const float ANGLEDOWN = -2.0f;