mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Damage groups WIP
This commit is contained in:
parent
e9cdb938fe
commit
501b8fe743
6 changed files with 136 additions and 29 deletions
22
src/tool.h
22
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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue