mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 09:05:19 +02:00
Allow nil
puncher in object:punch
(#14319)
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user