diff options
Diffstat (limited to 'src/model')
-rw-r--r-- | src/model/map.cc | 13 | ||||
-rw-r--r-- | src/model/model.cc | 1 | ||||
-rw-r--r-- | src/model/model.h | 5 |
3 files changed, 18 insertions, 1 deletions
diff --git a/src/model/map.cc b/src/model/map.cc index 39e2b9c..972ae82 100644 --- a/src/model/map.cc +++ b/src/model/map.cc @@ -39,14 +39,25 @@ Model * Map::load(std::string const &name) if (mapfile.got_classname("worldspawn")) { + // new wordspawn + + } else if (mapfile.classname().compare("worldspawn") == 0 ) { + + // worldspawn attributes + if (mapfile.got_key_int("enginesound", u)) { + model->model_enginesound = u; + continue; + } + } else if (mapfile.got_classname("light")) { + // new light light = new Light(); model->add_light(light); } else if (mapfile.classname().compare("light") == 0 ) { - // light attributes + // light attributes if (mapfile.got_key_vector3f("origin", light->light_location)) { light->light_location *= SCALE; continue; diff --git a/src/model/model.cc b/src/model/model.cc index 6508fdf..2e9f0ba 100644 --- a/src/model/model.cc +++ b/src/model/model.cc @@ -29,6 +29,7 @@ Model::Model(std::string const & name) : model_lvertex_countdetail = 0; model_radius = 0.5f; + model_enginesound = 0; } Model::~Model() diff --git a/src/model/model.h b/src/model/model.h index cb1352f..d2b7d65 100644 --- a/src/model/model.h +++ b/src/model/model.h @@ -70,6 +70,9 @@ public: /// number of detail evertices in this model inline size_t lvertex_detail() const { return model_lvertex_countdetail; } + /// engine sound loop for this model + inline unsigned int enginesound() const { return model_enginesound; } + /// total number of triangles in this model size_t tris() const; @@ -115,6 +118,8 @@ public: size_t model_lvertex_count; size_t model_lvertex_countdetail; + unsigned int model_enginesound; + /* ---- static functions for the Model registry -------------------- */ /// the Model registry |