mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix damage wraparound if very high damage (#11872)
This commit is contained in:
parent
85da2e284b
commit
b81948a14c
7 changed files with 10 additions and 8 deletions
|
@ -106,11 +106,11 @@ DigParams getDigParams(const ItemGroupList &groups,
|
|||
|
||||
struct HitParams
|
||||
{
|
||||
s16 hp;
|
||||
s32 hp;
|
||||
// Caused wear
|
||||
u32 wear; // u32 because wear could be 65536 (single-use weapon)
|
||||
|
||||
HitParams(s16 hp_ = 0, u32 wear_ = 0):
|
||||
HitParams(s32 hp_ = 0, u32 wear_ = 0):
|
||||
hp(hp_),
|
||||
wear(wear_)
|
||||
{}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue