Minor fixes

This commit is contained in:
DarkPhoenix
2024-11-12 14:45:41 +01:00
parent 5721beacf5
commit 7664b00b59
3 changed files with 12 additions and 6 deletions

View File

@@ -69,7 +69,7 @@ class Ammo:
falloff = (mod.item.getAttribute('falloff') or 0) * \
(charge.getAttribute('fallofMultiplier') or 1)
for type_ in DmgTypes.names():
d = charge.getAttribute('%sDamage' % type_)
d = charge.getAttribute('%sDamage' % type_, default=0)
if d > 0:
damage += d
# Take optimal and falloff as range factor