fix submerge item issue

fix https://github.com/wesnoth/wesnoth/issues/9305 issue.

et_suv was not include in if loop condition and submerge calculation made a multiply by zero.
This commit is contained in:
newfrenchy83 2024-09-06 20:27:36 +02:00 committed by Charles Dang
parent 704ab36e24
commit 02c599e59a

View file

@ -2848,7 +2848,7 @@ void display::draw_overlays_at(const map_location& loc)
drawing_buffer_add(
drawing_layer::terrain_bg, loc, [this, tex, ter_sub, ovr_sub = ov.submerge](const rect& dest) mutable {
if(ovr_sub > 0.0) {
if(ovr_sub > 0.0 && ter_sub > 0.0) {
// Adjust submerge appropriately
double submerge = ter_sub * ovr_sub;