Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/model.cc')
-rw-r--r--src/model/model.cc19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/model/model.cc b/src/model/model.cc
index 3fa0cc0..813515b 100644
--- a/src/model/model.cc
+++ b/src/model/model.cc
@@ -31,12 +31,14 @@ Model::Model(std::string const & name) :
Model::~Model()
{
- // delete all fragments
- for (Fragments::iterator fragit = model_fragments.begin(); fragit != model_fragments.end(); fragit++) {
- delete(*fragit);
- }
- model_fragments.clear();
+ // delete worldspawn
+ model_worldspawn.clear();
+ // delete all docks
+ for (Docks::iterator dit = model_docks.begin(); dit != model_docks.end(); dit++) {
+ delete (*dit);
+ }
+
// delete all engines
for (Engines::iterator eit = model_engines.begin(); eit != model_engines.end(); eit++) {
delete(*eit);
@@ -71,6 +73,11 @@ void Model::add_flare(Flare *flare)
model_flares.push_back(flare);
}
+void Model::add_dock(Dock *dock)
+{
+ model_docks.push_back(dock);
+}
+
Model *Model::find(std::string const & name)
{
Registry::iterator it = model_registry.find(name);
@@ -108,7 +115,7 @@ void Model::clear()
void Model::list_model(Model *model)
{
- con_print << " " << model->name() << " " << model->fragments().size() << " frags " <<
+ con_print << " " << model->name() << " " << model->worldspawn().size() << " frags " <<
model->model_tris_count << "/" << model->model_tris_detail_count << " tris/detail " <<
model->model_quad_count << "/" << model->model_quad_detail_count << " quads/detail" << std::endl;
}