diff --git a/api.lua b/api.lua index 0c2a531..3df7341 100644 --- a/api.lua +++ b/api.lua @@ -115,7 +115,7 @@ local function fire(stack, player) if pointed and pointed.type == "object" then local target = pointed.ref local point = pointed.intersection_point - local dmg = base_dmg * def.dmg_mult + local dmg = def.base_dmg * def.dmg_mult -- Add 50% damage if headshot if point.y > target:get_pos().y + 1.5 then @@ -308,7 +308,9 @@ function gunslinger.register_gun(name, def) return entity:on_rightclick(player) or on_rclick(stack, player) end end - + if not def.dmg_mult then + def.dmg_mult = 1 + end if not def.fire_sound then def.fire_sound = (def.mode ~= "splash") and "gunslinger_fire1" or "gunslinger_fire2"