aboutsummaryrefslogtreecommitdiffstats
path: root/include/components.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/components.hpp')
-rw-r--r--include/components.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/components.hpp b/include/components.hpp
index 541f0f8..0fb8ec6 100644
--- a/include/components.hpp
+++ b/include/components.hpp
@@ -172,7 +172,9 @@ struct Health : public Component {
(void)imp;
(void)def;
// TODO
- health = maxHealth = 1;
+ if (def->QueryIntAttribute("value", &health) != XML_NO_ERROR)
+ health = 1;
+ maxHealth = health;
}
};
@@ -208,6 +210,8 @@ struct Name : public Component {
}
};
+struct Player {};
+
struct ItemDrop {
ItemDrop(InventoryEntry& ie)
: item(ie) {}