Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/slot.h')
-rw-r--r--src/core/slot.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/core/slot.h b/src/core/slot.h
index eef640a..596244b 100644
--- a/src/core/slot.h
+++ b/src/core/slot.h
@@ -11,6 +11,7 @@
#include "math/axis.h"
#include "core/item.h"
+#include "model/tags.h"
#include <string>
@@ -83,6 +84,22 @@ public:
{
return slot_last_fired;
}
+
+ /**
+ * @brief slot fire cone, in degrees
+ * */
+ inline float cone() const
+ {
+ return slot_cone;
+ }
+
+ /**
+ * @brief weapon slot type
+ * */
+ inline const model::Weapon::Type type() const
+ {
+ return slot_type;
+ }
/* --- mutators -------------------------------------------- */
@@ -134,7 +151,29 @@ public:
* @brief set the item this slot is holding
* */
void set_item(Item *item);
+
+ /**
+ * @brief set slot fire cone, in degrees
+ * */
+ inline void set_cone(const float cone)
+ {
+ slot_cone = cone;
+ }
+
+ /**
+ * @brief set slot type
+ * */
+ void set_type(const model::Weapon::Type type)
+ {
+ slot_type = type;
+ }
+ /**
+ * @brief load slot parameters from a model weapon tag
+ * */
+ void load(const model::Weapon *weapon_tag);
+
+
private:
math::Vector3f slot_location;
@@ -152,6 +191,10 @@ private:
// item mounted in this slot
Item *slot_item;
+
+ model::Weapon::Type slot_type;
+
+ float slot_cone;
};
} // namespace core