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/tags.cc')
-rw-r--r--src/model/tags.cc52
1 files changed, 20 insertions, 32 deletions
diff --git a/src/model/tags.cc b/src/model/tags.cc
index 7e5a393..f755373 100644
--- a/src/model/tags.cc
+++ b/src/model/tags.cc
@@ -121,23 +121,6 @@ Particles::~Particles()
{
}
-/* ---- class Dock ------------------------------------------------- */
-
-Dock::Dock() : Tag()
-{
- dock_radius = 0.01f;
-}
-
-Dock::Dock(const Dock& other) : Tag(other)
-{
- dock_radius = other.radius();
- dock_axis.assign(other.axis());
-}
-
-Dock::~Dock()
-{
-}
-
/* ---- class Sound ------------------------------------------------- */
Sound::Sound() : Tag()
@@ -153,36 +136,41 @@ Sound::~Sound()
{
}
-/* ---- class Dock ------------------------------------------------- */
+/* ---- class Slot ------------------------------------------------- */
-Weapon::Weapon(const Type type) : Tag()
-{
+Slot::Slot(const Type type) : Tag()
+{
+ slot_radius = 0.0f;
set_type(type);
+
}
-Weapon::Weapon(const Weapon& other) : Tag(other)
+Slot::Slot(const Slot& other) : Tag(other)
{
- weapon_type = other.type();
- weapon_cone = other.cone();
- weapon_axis.assign(other.axis());
+ slot_type = other.type();
+ slot_axis.assign(other.axis());
+ slot_radius = other.radius();
+ slot_cone = other.cone();
+
}
-Weapon::~Weapon()
+Slot::~Slot()
{
}
-void Weapon::set_type(const Type type)
+void Slot::set_type(const Type type)
{
- weapon_type = type;
- switch (weapon_type) {
- case Unmountable:
- weapon_cone = 0.0f;
+ slot_type = type;
+ switch (slot_type) {
+ case None:
+ case Dock:
+ slot_cone = 0.0f;
break;
case Cannon:
- weapon_cone = 60.0f; // 60 degrees
+ slot_cone = 60.0f; // 60 degrees
break;
case Turret:
- weapon_cone = 180.0f; // 180 degrees
+ slot_cone = 180.0f; // 180 degrees
break;
}
}