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/mapfile.cc')
-rw-r--r--src/model/mapfile.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/model/mapfile.cc b/src/model/mapfile.cc
index 3df2659..e06de58 100644
--- a/src/model/mapfile.cc
+++ b/src/model/mapfile.cc
@@ -1834,7 +1834,7 @@ Model * MapFile::load(std::string const &name)
} else if (mapfile.got_classname("location_cannon")) {
// new cannon slot
- tag_weapon = new Weapon();
+ tag_weapon = new Weapon(Weapon::Cannon);
model->add_weapon(tag_weapon);
continue;
@@ -1848,8 +1848,8 @@ Model * MapFile::load(std::string const &name)
tag_weapon->get_location().assign(location * SCALE);
continue;
- } else if (mapfile.got_key_float("radius", r)) {
- tag_weapon->set_radius(r * SCALE);
+ } else if (mapfile.got_key_float("cone", r)) {
+ tag_weapon->set_cone(r);
continue;
} else if (mapfile.got_key()) {
@@ -1858,10 +1858,10 @@ Model * MapFile::load(std::string const &name)
}
continue;
- } else if (mapfile.got_classname("location_turret")) {
+ } else if (mapfile.got_classname("location_turret")) {
// new turret slot
- tag_weapon = new Weapon();
+ tag_weapon = new Weapon(Weapon::Turret);
model->add_weapon(tag_weapon);
continue;
@@ -1875,8 +1875,8 @@ Model * MapFile::load(std::string const &name)
tag_weapon->get_location().assign(location * SCALE);
continue;
- } else if (mapfile.got_key_float("radius", r)) {
- tag_weapon->set_radius(r * SCALE);
+ } else if (mapfile.got_key_float("cone", r)) {
+ tag_weapon->set_cone(r);
continue;
} else if (mapfile.got_key()) {
@@ -2039,7 +2039,6 @@ Model * MapFile::load(std::string const &name)
for (Model::Weapons::const_iterator wit = submodel_model->weapons().begin(); wit != submodel_model->weapons().end(); wit++) {
tag_weapon = new Weapon(*(*wit));
tag_weapon->get_location().assign(tag_submodel->location() + tag_submodel->axis() * (tag_weapon->location() - submodel_model->origin()) * tag_submodel->scale());
- tag_weapon->set_radius(tag_weapon->radius() * tag_submodel->scale());
model->add_weapon(tag_weapon);
}