Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-04-22 19:48:03 +0000
committerStijn Buys <ingar@osirion.org>2012-04-22 19:48:03 +0000
commitd1931b1ebbe79cbd0f41290acbf9cb6d4c462878 (patch)
treeedc63a618e7493c6d7ed68401f0e83cc9f2894b5 /src/model/model.cc
parentcef2128c1ed1fc3c1ed86b332da7ea8cfbf7757e (diff)
Load model weapon tags.
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);