Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2010-10-09 20:23:01 +0000
committerStijn Buys <ingar@osirion.org>2010-10-09 20:23:01 +0000
commit0ecdd8bc98ba583bbee801b838d785c6f881d7df (patch)
tree0ae456cb1254544e43de8abf8fa4dbb6afc91e79 /src/core
parente5be0871b6fed09eed40ff17201d1c7a4a990744 (diff)
removed physics references, transfer inventory on ship aquisition
Diffstat (limited to 'src/core')
-rw-r--r--src/core/item.cc9
-rw-r--r--src/core/item.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/src/core/item.cc b/src/core/item.cc
index 8ab4784..df12885 100644
--- a/src/core/item.cc
+++ b/src/core/item.cc
@@ -27,10 +27,19 @@ Item::Item(const Info *info)
set_timestamp(game() ? game()->timestamp() : 1);
}
+Item::Item(const Item &other)
+{
+ item_info = other.info();
+ item_amount = other.amount();
+ item_price = other.price();
+ set_timestamp(game() ? game()->timestamp() : 1);
+}
+
Item::~Item()
{
item_info = 0;
item_amount = 0;
+ item_amount = 0;
}
void Item::set_amount(const long amount)
diff --git a/src/core/item.h b/src/core/item.h
index e4e8507..0e9e167 100644
--- a/src/core/item.h
+++ b/src/core/item.h
@@ -21,6 +21,9 @@ class Item
public:
Item(const Info *info);
+ /// copy constructor
+ Item(const Item &other);
+
~Item();
/* ---- inspectors --------------------------------------------- */