diff options
author | Stijn Buys <ingar@osirion.org> | 2012-11-14 12:53:53 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-11-14 12:53:53 +0000 |
commit | 6b737ea7f6e5a31d3c6024105ee11890f1a5451f (patch) | |
tree | 9b3c0dd2d30ea0909590353eb829b1e0693dec9b /src/core/slot.cc | |
parent | 9f695f55fd8ee67e36e5607be907bd6f495fe9b4 (diff) |
Added initial core::Slot attributes.
Diffstat (limited to 'src/core/slot.cc')
-rw-r--r-- | src/core/slot.cc | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/core/slot.cc b/src/core/slot.cc index 1b3e648..89f885c 100644 --- a/src/core/slot.cc +++ b/src/core/slot.cc @@ -13,21 +13,31 @@ namespace core Slot::Slot() { slot_item = 0; + slot_active = true; + slot_timestamp = 0; } -Slot::Slot(const math::Vector3f &location) +Slot::Slot(const math::Vector3f & location) : + slot_location(location) { slot_item = 0; - slot_location.assign(location); + slot_active = true; + slot_timestamp = 0; + } - Slot::~Slot() { slot_item = 0; + slot_active = false; + slot_timestamp = 0; +} + +void Slot::set_item(Item *item) +{ + slot_item = item; + set_timestamp(game() ? game()->timestamp() : 1); } } // namespace core - - |