Swap texture on chunk even if texture set is full
This commit is contained in:
@@ -817,6 +817,7 @@ bool TextureSet::replace_texture( float xbase
|
||||
, float radius
|
||||
, scoped_blp_texture_reference const& texture_to_replace
|
||||
, scoped_blp_texture_reference replacement_texture
|
||||
, bool entire_chunk
|
||||
)
|
||||
{
|
||||
float dist = misc::getShortestDist(x, z, xbase, zbase, CHUNKSIZE);
|
||||
@@ -826,6 +827,14 @@ bool TextureSet::replace_texture( float xbase
|
||||
return false;
|
||||
}
|
||||
|
||||
if (entire_chunk)
|
||||
{
|
||||
replace_texture(texture_to_replace, std::move (replacement_texture));
|
||||
_chunk->registerChunkUpdate(ChunkUpdateFlags::ALPHAMAP);
|
||||
_need_lod_texture_map_update = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
// if the chunk is fully inside the brush, just swap the 2 textures
|
||||
if (misc::square_is_in_circle(x, z, radius, xbase, zbase, CHUNKSIZE))
|
||||
{
|
||||
@@ -1368,4 +1377,4 @@ std::array<std::uint16_t, 8> TextureSet::lod_texture_map()
|
||||
}
|
||||
|
||||
return _doodadMapping;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user