Fix: map random y-placement used its width instead of height

Not sure how long this has existed without triggering any issues, but
when I was testing out a themed room wider than it was tall, I ran into
rn2-of-a-negative-number impossibles. Traced it to here, where it was
trying to subtract the width of the mapfrag from ROWNO to figure out
which y-value it should place the map on. The correct behavior is to
subtract the height of the mapfrag.
This commit is contained in:
copperwater
2025-02-27 17:08:31 -05:00
committed by Pasi Kallinen
parent 55c3a7c6c5
commit 50d80b5183

View File

@@ -6133,7 +6133,7 @@ TODO: gc.coder->croom needs to be updated
if (y < 1)
y = 1;
} else {
y = rn2(ROWNO - mf->wid);
y = rn2(ROWNO - mf->hei);
}
}
}