diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2017-02-13 16:57:19 -0500 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2017-02-13 16:57:19 -0500 |
commit | 183331ccf1aa3f4142697e9e37528f084fae7466 (patch) | |
tree | c3c2f2a26b4b85df9ec809f40443dce0d115b0b8 /include/components.hpp | |
parent | 3eccd38e989012ff35ee5376670aabc338c52008 (diff) |
rip skirl
Diffstat (limited to 'include/components.hpp')
-rw-r--r-- | include/components.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/components.hpp b/include/components.hpp index ebc256d..3169a6d 100644 --- a/include/components.hpp +++ b/include/components.hpp @@ -88,10 +88,11 @@ struct Health { /** * Constructor that sets the variables, with 0 health as default. */ - Health(int h = 0, int m = 0) : health(h), maxHealth(m) {} + Health(int m = 1, int h = 0) + : health(h != 0 ? h : m), maxHealth(m) {} - int health; - int maxHealth; + int health; /**< The current amount of health */ + int maxHealth; /**< The maximum amount of health */ }; struct Portal { |