Skip to content

Commit

Permalink
Adjust PR
Browse files Browse the repository at this point in the history
  • Loading branch information
TokisanGames committed Feb 14, 2020
1 parent 24841e9 commit 40e3fdc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion generators/voxel_generator_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,13 @@ void VoxelGeneratorTest::generate_block(VoxelBlockRequest &input) {
generate_block_flat(**input.voxel_buffer, input.origin_in_voxels, input.lod);
break;

default:
case MODE_WAVES:
generate_block_waves(**input.voxel_buffer, input.origin_in_voxels, input.lod);
break;

default:
CRASH_NOW_MSG("Mode is unrecognized.");
break;
}
}

Expand Down
4 changes: 2 additions & 2 deletions meshers/transvoxel/voxel_mesher_transvoxel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ void VoxelMesherTransvoxel::reset_reuse_cells(Vector3i block_size) {
for (unsigned int i = 0; i < _cache.size(); ++i) {
std::vector<ReuseCell> &deck = _cache[i];
deck.resize(deck_area);
for (long unsigned int j = 0; j < deck.size(); ++j) {
for (size_t j = 0; j < deck.size(); ++j) {
deck[j].vertices.fill(-1);
}
}
Expand All @@ -921,7 +921,7 @@ void VoxelMesherTransvoxel::reset_reuse_cells_2d(Vector3i block_size) {
for (unsigned int i = 0; i < _cache_2d.size(); ++i) {
std::vector<ReuseTransitionCell> &row = _cache_2d[i];
row.resize(block_size.x);
for (long unsigned int j = 0; j < row.size(); ++j) {
for (size_t j = 0; j < row.size(); ++j) {
row[j].vertices.fill(-1);
}
}
Expand Down
2 changes: 1 addition & 1 deletion streams/voxel_stream_region_files.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ void VoxelStreamRegionFiles::_convert_files(Meta new_meta) {
int lod;
};

ERR_FAIL_COND(old_stream->load_meta() != (int)OK);
ERR_FAIL_COND(old_stream->load_meta() != VOXEL_FILE_OK);

std::vector<PositionAndLod> old_region_list;
Meta old_meta = old_stream->_meta;
Expand Down
4 changes: 2 additions & 2 deletions terrain/voxel_terrain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,11 +901,11 @@ void VoxelTerrain::_process() {
} else {
CRASH_COND(block->voxels.is_null());

int air_type = 0;
uint64_t air_type = 0;
if (
block->voxels->is_uniform(VoxelBuffer::CHANNEL_TYPE) &&
block->voxels->is_uniform(VoxelBuffer::CHANNEL_SDF) &&
block->voxels->get_voxel(0, 0, 0, VoxelBuffer::CHANNEL_TYPE) == (uint64_t)air_type) {
block->voxels->get_voxel(0, 0, 0, VoxelBuffer::CHANNEL_TYPE) == air_type) {

// If we got here, it must have been because of scheduling an update
CRASH_COND(block->get_mesh_state() != VoxelBlock::MESH_UPDATE_NOT_SENT);
Expand Down

0 comments on commit 40e3fdc

Please sign in to comment.