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/engine.cc7
-rw-r--r--src/model/engine.h29
-rw-r--r--src/model/flare.cc1
-rw-r--r--src/model/flare.h6
-rw-r--r--src/model/map.cc36
5 files changed, 36 insertions, 43 deletions
diff --git a/src/model/engine.cc b/src/model/engine.cc
index 97011d9..959f2ce 100644
--- a/src/model/engine.cc
+++ b/src/model/engine.cc
@@ -11,17 +11,12 @@ namespace model
{
-/* ---------- core::Engine ------------------------------------------ */
+/* ---- class Engine ----------------------------------------------- */
Engine::Engine() :
engine_location()
{
engine_radius = 1.0f;
- engine_flare = 0;
- render_texture = 0;
-
- engine_notrail = false;
- engine_noflare = false;
}
Engine::Engine(math::Vector3f const & location) :
diff --git a/src/model/engine.h b/src/model/engine.h
index 724c060..68f16e5 100644
--- a/src/model/engine.h
+++ b/src/model/engine.h
@@ -31,36 +31,9 @@ public:
{
return engine_radius;
}
-
- inline unsigned int flare() const
- {
- return engine_flare;
- }
-
- inline unsigned int texture() const
- {
- return render_texture;
- }
-
- inline bool noflare() const
- {
- return engine_noflare;
- }
-
- inline bool notrail() const
- {
- return engine_notrail;
- }
-
+
math::Vector3f engine_location;
float engine_radius;
- unsigned int engine_flare;
-
-
- bool engine_noflare;
- bool engine_notrail;
-
- unsigned int render_texture;
};
}
diff --git a/src/model/flare.cc b/src/model/flare.cc
index 0669a49..5491dd2 100644
--- a/src/model/flare.cc
+++ b/src/model/flare.cc
@@ -12,6 +12,7 @@ namespace model
Flare::Flare() : Light()
{
flare_angle = 0;
+ flare_engine = false;
}
Flare::~Flare()
diff --git a/src/model/flare.h b/src/model/flare.h
index 6f96d8c..6affe55 100644
--- a/src/model/flare.h
+++ b/src/model/flare.h
@@ -24,7 +24,13 @@ public:
return flare_angle;
}
+ inline bool engine() const
+ {
+ return flare_engine;
+ }
+
float flare_angle;
+ bool flare_engine;
};
}
diff --git a/src/model/map.cc b/src/model/map.cc
index 6f3ff9e..1767743 100644
--- a/src/model/map.cc
+++ b/src/model/map.cc
@@ -822,6 +822,10 @@ Model * Map::load(std::string const &name)
continue;
} else if (mapfile.got_key_color("enginecolor", model->model_enginecolor) ==0) {
continue;
+
+ } else if (mapfile.got_key()) {
+ con_warn "unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl;
+
}
} else if (mapfile.got_classend("func_group")) {
@@ -856,6 +860,9 @@ Model * Map::load(std::string const &name)
} else if (mapfile.got_key_float("light", light->light_radius)) {
light->light_radius /= 100.0f;
+ } else if (mapfile.got_key_float("radius", light->light_radius)) {
+ light->light_radius /= 100.0f;
+
} else if (mapfile.got_key_float("frequency", light->light_frequency)) {
continue;
@@ -868,6 +875,9 @@ Model * Map::load(std::string const &name)
} else if (mapfile.got_key_int("flare", light->light_flare)) {
continue;
+ } else if (mapfile.got_key()) {
+ con_warn "unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl;
+
}
} else if (mapfile.got_classname("trigger_dock")) {
@@ -886,7 +896,13 @@ Model * Map::load(std::string const &name)
} else if (mapfile.got_key_float("radius", dock->dock_radius)) {
dock->dock_radius /= 100.0f;
continue;
-
+
+ } else if (mapfile.got_key("angle")) {
+ continue;
+
+ } else if (mapfile.got_key()) {
+ con_warn "unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl;
+
}
} else if (mapfile.got_classname("target_flare")) {
@@ -908,6 +924,7 @@ Model * Map::load(std::string const &name)
} else if (mapfile.got_key_int("spawnflags", u)) {
flare->light_strobe = spawnflag_isset(u, 1);
flare->light_entity = spawnflag_isset(u, 2);
+ flare->flare_engine = spawnflag_isset(u, 4);
} else if (mapfile.got_key_float("radius", flare->light_radius)) {
flare->light_radius /= 100.0f;
@@ -923,11 +940,13 @@ Model * Map::load(std::string const &name)
} else if (mapfile.got_key_int("flare", flare->light_flare)) {
continue;
-
+
} else if (mapfile.got_key_float("angle", flare->flare_angle)) {
flare->flare_angle = math::degrees360f(flare->flare_angle);
continue;
+ } else if (mapfile.got_key()) {
+ con_warn "unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl;
}
} else if (mapfile.got_classname("target_engine")) {
@@ -945,15 +964,14 @@ Model * Map::load(std::string const &name)
} else if (mapfile.got_key_float("radius", engine->engine_radius)) {
engine->engine_radius /= 100.0f;
continue;
-
- } else if (mapfile.got_key_int("flare", engine->engine_flare)) {
- continue;
-
- } else if (mapfile.got_key_int("spawnflags", u)) {
- engine->engine_noflare = spawnflag_isset(u, 1);
- engine->engine_notrail = spawnflag_isset(u, 2);
+
+ } else if (mapfile.got_key("angle")) {
continue;
+
+ } else if (mapfile.got_key()) {
+ con_warn "unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl;
}
+
}
}