diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-03-05 01:30:55 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-03-10 11:28:13 +0200 |
commit | 501b8fe743c56ad07c5fd8bdd4bfffa13fcb3c4d (patch) | |
tree | 77400d94bc48a74cb34d6934e4f3d09ef1a49881 /src/tool.h | |
parent | e9cdb938fe44282e09fb88628a6e86e5e7279c69 (diff) | |
download | minetest-501b8fe743c56ad07c5fd8bdd4bfffa13fcb3c4d.tar.gz minetest-501b8fe743c56ad07c5fd8bdd4bfffa13fcb3c4d.tar.bz2 minetest-501b8fe743c56ad07c5fd8bdd4bfffa13fcb3c4d.zip |
Damage groups WIP
Diffstat (limited to 'src/tool.h')
-rw-r--r-- | src/tool.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tool.h b/src/tool.h index d2a9c13c8..685dfb5f2 100644 --- a/src/tool.h +++ b/src/tool.h @@ -108,5 +108,27 @@ HitParams getHitParams(const ItemGroupList &groups, HitParams getHitParams(const ItemGroupList &groups, const ToolCapabilities *tp); +struct PunchDamageResult +{ + bool did_punch; + int damage; + int wear; + + PunchDamageResult(): + did_punch(false), + damage(0), + wear(0) + {} +}; + +struct ItemStack; + +PunchDamageResult getPunchDamage( + const ItemGroupList &armor_groups, + const ToolCapabilities *toolcap, + const ItemStack *punchitem, + float time_from_last_punch +); + #endif |