Open DragonWizard23 opened 2 days ago
/Confirmed
The cause seems to be that the JSON for f_small_satellite_dish doesn't set a min/max bash strength, so those seem to default to -1. That is then used by map.cpp operation map::bash_ter_furn to eventually set smin and smax to those -1 values, and then, since sound_vol is -1 (I haven't bothered to try to found out where it comes from), it sets the sound volume to the min of -1 *1.5 and -1, which truncates to -1.
At a guess there should be a further sanity check to set the sound to a non negative number immediately after that. This should probably be some default volume for when none exists (0?, 1?, something else?).
The alternative to require JSON data to either specify a positive min/max STR is probably a bad one.
I leave it to those who know what sound level values mean to figure out how to deal with this.
Describe the bug
When smashing a satellite dish, I get an error for a negative sound: DEBUG : negative sound volume -1 FUNCTION : sound FILE : D:\a\Cataclysm-DDA\Cataclysm-DDA\src\sounds.cpp LINE : 328 VERSION : daebd7d
Attach save file
Nov132024-trimmed.tar.gz
Steps to reproduce
Expected behavior
I expected a positive sound value for smashing a satellite dish.
Screenshots
No response
Versions and configuration
Additional context
No response