From b81948a14c138517f6a227dac5b71f0b2facb33c Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 6 Jan 2022 20:16:35 +0000 Subject: Fix damage wraparound if very high damage (#11872) --- src/tool.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tool.h') diff --git a/src/tool.h b/src/tool.h index 0e3388485..8409f59af 100644 --- a/src/tool.h +++ b/src/tool.h @@ -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_) {} -- cgit v1.2.3