mirror of
https://github.com/Kbz-8/42_vox.git
synced 2026-03-04 13:06:37 +00:00
fixing crash issue
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
std::memset(data.data(), static_cast<std::uint32_t>(BlockType::Air), data.size() * sizeof(std::uint32_t));
|
||||
|
||||
std::uint32_t height = std::abs(std::sin((float)pos.x / 20.0f) * std::cos((float)pos.y / 20.0f) * 60.0f) + 1;
|
||||
|
||||
// Must not exceed CHUNK_SIZE.y
|
||||
for(std::uint32_t y = 0; y < std::min(height, CHUNK_SIZE.y); y++)
|
||||
{
|
||||
if(y > std::min(height, CHUNK_SIZE.y) - 2)
|
||||
|
||||
Reference in New Issue
Block a user