diff options
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 - - |