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.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/model/model.cc b/src/model/model.cc
index 776eba7..f29350f 100644
--- a/src/model/model.cc
+++ b/src/model/model.cc
@@ -71,6 +71,12 @@ Model::~Model()
delete (*sit);
}
model_sounds.clear();
+
+ // delete all weapon tags
+ for (Weapons::iterator wit = model_weapons.begin(); wit != model_weapons.end(); wit++) {
+ delete (*wit);
+ }
+ model_weapons.clear();
}
void Model::set_collisionmodel(CollisionModel *collisionmodel)
@@ -118,6 +124,11 @@ void Model::add_dock(Dock *dock)
model_docks.push_back(dock);
}
+void Model::add_weapon(Weapon *weapon)
+{
+ model_weapons.push_back(weapon);
+}
+
Model *Model::find(const std::string & name)
{
Registry::iterator it = model_registry.find(name);