mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Allow nil
puncher in object:punch
(#14319)
This commit is contained in:
parent
fc0ac64277
commit
72cb4e9bea
11 changed files with 89 additions and 36 deletions
|
@ -482,7 +482,7 @@ PunchDamageResult getPunchDamage(
|
|||
{
|
||||
HitParams hitparams = getHitParams(armor_groups, toolcap,
|
||||
time_from_last_punch,
|
||||
punchitem->wear);
|
||||
punchitem ? punchitem->wear : 0);
|
||||
result.did_punch = true;
|
||||
result.wear = hitparams.wear;
|
||||
result.damage = hitparams.hp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue