From 315a8c2dff9b76ac5e1ebbef265f13ac19d65e3d Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 16 Nov 2008 13:53:44 +0000 Subject: engine trails --- src/model/map.cc | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) (limited to 'src/model/map.cc') 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; } + } } -- cgit v1.2.3