-
-
Notifications
You must be signed in to change notification settings - Fork 762
Fix panic on zero-dimension elevation grids during world generation #634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…rids Co-authored-by: louis-e <44675238+louis-e@users.noreply.github.com>
Co-authored-by: louis-e <44675238+louis-e@users.noreply.github.com>
|
и причем, я сейчас проверил что когда я в режим генерации выбираю только рельеф и выделяю большую или среднюю область загрузка генерации не останавливается на 3-15% а нормально генерируется и в мир можно заходить, а когда я выбираю объекты + рельеф то генерация просто тупо замирает на 3% |
|
retrigger-benchmark |
|
⏱️ Benchmark run finished in 1m 9s 📈 Compared against baseline: 69s 🟢 Generation time is unchanged. You can retrigger the benchmark by commenting |
i google translated this so i wouldnt know myself if its 100% correct but that means the building generation is off then no? |
извините я вас не понял, можeте подробнее? |
Generation crashes at 3-15% when scale factors < 1.0 cause
grid_widthorgrid_heightto truncate to zero, leading to division-by-zero and out-of-bounds array access.Changes
src/elevation_data.rs
(scale_factor_x as usize).max(1)apply_gaussian_blur(),fill_nan_values(), andfilter_elevation_outliers()against empty gridssrc/ground.rs
get_data_coordinates()against division by zerointerpolate_height()before array accessground_levelas fallback when elevation data is invalidTests
Example
Before:
After:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.