Small Weapon Sounds Fix (#22912)

This logic error turns into a runtime error when compiled in OpenDream,
in addition to just not working at all.
This commit is contained in:
VMSolidus
2026-07-25 12:59:59 +00:00
committed by GitHub
parent 38fce47f3e
commit ff393fa51c
2 changed files with 5 additions and 1 deletions
@@ -66,7 +66,7 @@
if(use_material_name)
name = "[material.display_name] [initial(name)]"
if(use_material_sound)
if(sharp && !material.weapon_hitsound == 'sound/weapons/metalhit.ogg' || !sharp)
if(!sharp || material.weapon_hitsound == 'sound/weapons/metalhit.ogg')
// wooden swords don't sound like metal swords.
// metalhit check is so swords when metal use their regular slice sfx.
hitsound = material.weapon_hitsound
@@ -0,0 +1,4 @@
author: Hellfirejag
delete-after: True
changes:
- bugfix: "Fixed a small logic error in melee weapon sound effects."