diff options
author | Stijn Buys <ingar@osirion.org> | 2013-01-01 15:20:14 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-01-01 15:20:14 +0000 |
commit | 614ce1267772d67825a32fb7495a049cd6498fe5 (patch) | |
tree | 20374ef083b62524e831bce2a8a89fcc70a63f42 /src/core/slot.cc | |
parent | 18969b1c444597741547598d35e8f0f97acd39dc (diff) |
Initial support for turret-style weapons.
Diffstat (limited to 'src/core/slot.cc')
-rw-r--r-- | src/core/slot.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/slot.cc b/src/core/slot.cc index e842f78..58ab155 100644 --- a/src/core/slot.cc +++ b/src/core/slot.cc @@ -17,6 +17,8 @@ Slot::Slot() slot_flags = 0; slot_timestamp = 0; slot_last_fired = 0; + slot_cone = 0; + slot_type = model::Weapon::Cannon; } Slot::~Slot() @@ -41,4 +43,14 @@ void Slot::set_item(Item *item) set_timestamp(game() ? game()->timestamp() : 1); } +void Slot::load(const model::Weapon * weapon_tag) +{ + if (weapon_tag) { + set_type(weapon_tag->type()); + set_cone(weapon_tag->cone()); + set_location(weapon_tag->location()); + set_axis(weapon_tag->axis()); + } +} + } // namespace core |