mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Merge pull request #943 from MihailRis/block-fields-conversion-fix
fixes
This commit is contained in:
commit
04c367b476
3 changed files with 6 additions and 6 deletions
|
|
@ -46,7 +46,7 @@ void Texture::resize(uint width, uint height) {
|
|||
}
|
||||
|
||||
void Texture::reload(const ImageData& image) {
|
||||
reload(image.getData(), width, height);
|
||||
reload(image.getData(), image.getWidth(), image.getHeight());
|
||||
}
|
||||
|
||||
void Texture::reload(const ubyte* data, uint width, uint height) {
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ static void calc_collision(
|
|||
|
||||
auto aabb = AABB(pos - half, pos + half);
|
||||
glm::vec3 scale(1.0f);
|
||||
scale[nz] = 1.0f - E * 8.0f;
|
||||
scale[nz] = 1.0f - E * 2.0f;
|
||||
aabb.scale(scale);
|
||||
aabb = aabb + offset;
|
||||
aabb.b.y -= stepHeight + E * 2;
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ void WorldConverter::createBlockFieldsConvertTasks() {
|
|||
REGION_LAYER_BLOCKS_DATA,
|
||||
ConvertTaskType::CONVERT_BLOCKS_DATA
|
||||
);
|
||||
break;
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -189,7 +189,7 @@ void WorldConverter::upgradeRegion(
|
|||
}
|
||||
|
||||
void WorldConverter::convertVoxels(const io::path& file, int x, int z) const {
|
||||
logger.info() << "converting voxels region " << x << "_" << z;
|
||||
logger.info() << "converting voxels in region " << x << "_" << z;
|
||||
wfile->getRegions().processRegion(x, z, REGION_LAYER_VOXELS,
|
||||
[=](std::unique_ptr<ubyte[]> data, uint32_t*) {
|
||||
Chunk::convert(data.get(), report.get());
|
||||
|
|
@ -198,7 +198,7 @@ void WorldConverter::convertVoxels(const io::path& file, int x, int z) const {
|
|||
}
|
||||
|
||||
void WorldConverter::convertInventories(const io::path& file, int x, int z) const {
|
||||
logger.info() << "converting inventories region " << x << "_" << z;
|
||||
logger.info() << "converting inventories in region " << x << "_" << z;
|
||||
wfile->getRegions().processInventories(x, z, [=](Inventory* inventory) {
|
||||
inventory->convert(report.get());
|
||||
});
|
||||
|
|
@ -212,7 +212,7 @@ void WorldConverter::convertPlayer(const io::path& file) const {
|
|||
}
|
||||
|
||||
void WorldConverter::convertBlocksData(int x, int z, const ContentReport& report) const {
|
||||
logger.info() << "converting blocks data";
|
||||
logger.info() << "converting blocks data in region " << x << "_" << z;
|
||||
wfile->getRegions().processBlocksData(x, z,
|
||||
[=](BlocksMetadata* heap, std::unique_ptr<ubyte[]> voxelsData) {
|
||||
Chunk chunk(0, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue