From 7de62efc14d0e0f037051bd887c96f28fd9a3215 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 7 Dec 2008 09:03:10 +0000 Subject: add system map, prepare source tree for dataset reorganization --- src/model/classes.h | 6 ++++++ src/model/map.cc | 26 +++++++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) (limited to 'src/model') diff --git a/src/model/classes.h b/src/model/classes.h index f51a391..175070a 100644 --- a/src/model/classes.h +++ b/src/model/classes.h @@ -146,10 +146,16 @@ public: { return particles_script; } + + inline const float radius() const + { + return particles_radius; + } std::string particles_script; math::Vector3f particles_location; math::Axis particles_axis; + float particles_radius; }; /* ---- class Dock ------------------------------------------------- */ diff --git a/src/model/map.cc b/src/model/map.cc index 29332ee..618fd51 100644 --- a/src/model/map.cc +++ b/src/model/map.cc @@ -795,7 +795,7 @@ Model * Map::load(std::string const &name) unsigned int u; float angle; - + while (mapfile.getline()) { if (mapfile.got_classname("worldspawn")) { @@ -812,14 +812,19 @@ Model * Map::load(std::string const &name) if (mapfile.got_key_int("enginesound", u)) { model->model_enginesound = u; continue; + } else if (mapfile.got_key_int("impulsesound", u)) { model->model_impulsesound = u; continue; - } else if (mapfile.got_key_color("enginecolor", model->model_enginecolor) ==0) { + + } else if (mapfile.got_key_color("enginecolor", model->model_enginecolor)) { continue; - +/* + } else if (mapfile.got_key("name")) { + continue; +*/ } else if (mapfile.got_key()) { - con_warn "unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl; + con_warn "Unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl; } @@ -871,7 +876,7 @@ Model * Map::load(std::string const &name) continue; } else if (mapfile.got_key()) { - con_warn "unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl; + con_warn "Unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl; } @@ -896,7 +901,7 @@ Model * Map::load(std::string const &name) continue; } else if (mapfile.got_key()) { - con_warn "unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl; + con_warn "Unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl; } @@ -956,7 +961,7 @@ Model * Map::load(std::string const &name) continue; } else if (mapfile.got_key()) { - con_warn "unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl; + con_warn "Unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl; } } else if (mapfile.got_classname("fx_particles")) { @@ -984,14 +989,17 @@ Model * Map::load(std::string const &name) } else if (mapfile.got_key_float("roll", angle)) { particles->particles_axis.change_roll(angle); - +/* + } else if (mapfile.got_key_float("radius", particles->particles_radius)) { + particles->particles_radius *= LIGHTSCALE; +*/ } else if (mapfile.got_key()) { con_warn << "Unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl; } } else if (mapfile.got_classname()) { - con_warn << "Unkown class '" << mapfile.classname() << "'" << std::endl; + con_warn << "Unkown class " << mapfile.classname() << std::endl; } } -- cgit v1.2.3