Merge branch 'master' of https://github.com/Zylann/godot_voxel
commit
3c9e63b633
|
@ -9,7 +9,7 @@ VoxelGeneratorTest::VoxelGeneratorTest() {
|
|||
}
|
||||
|
||||
void VoxelGeneratorTest::set_mode(Mode mode) {
|
||||
ERR_FAIL_INDEX(mode, MODE_COUNT)
|
||||
ERR_FAIL_INDEX(mode, MODE_COUNT);
|
||||
_mode = mode;
|
||||
}
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@ int VoxelTerrain::get_view_distance() const {
|
|||
}
|
||||
|
||||
void VoxelTerrain::set_view_distance(int distance_in_voxels) {
|
||||
ERR_FAIL_COND(distance_in_voxels < 0)
|
||||
ERR_FAIL_COND(distance_in_voxels < 0);
|
||||
int d = distance_in_voxels / _map->get_block_size();
|
||||
if (d != _view_distance_blocks) {
|
||||
print_line(String("View distance changed from ") + String::num(_view_distance_blocks) + String(" blocks to ") + String::num(d));
|
||||
|
|
|
@ -46,14 +46,14 @@ public:
|
|||
|
||||
inline T &operator[](size_t i) {
|
||||
#ifdef TOOLS_ENABLED
|
||||
CRASH_COND(i >= _size)
|
||||
CRASH_COND(i >= _size);
|
||||
#endif
|
||||
return _ptr[i];
|
||||
}
|
||||
|
||||
inline const T &operator[](size_t i) const {
|
||||
#ifdef TOOLS_ENABLED
|
||||
CRASH_COND(i >= _size)
|
||||
CRASH_COND(i >= _size);
|
||||
#endif
|
||||
return _ptr[i];
|
||||
}
|
||||
|
|
|
@ -40,12 +40,12 @@ uint64_t g_depth_max_values[] = {
|
|||
};
|
||||
|
||||
inline uint32_t get_depth_bit_count(VoxelBuffer::Depth d) {
|
||||
CRASH_COND(d < 0 || d >= VoxelBuffer::DEPTH_COUNT)
|
||||
CRASH_COND(d < 0 || d >= VoxelBuffer::DEPTH_COUNT);
|
||||
return g_depth_bit_counts[d];
|
||||
}
|
||||
|
||||
inline uint64_t get_max_value_for_depth(VoxelBuffer::Depth d) {
|
||||
CRASH_COND(d < 0 || d >= VoxelBuffer::DEPTH_COUNT)
|
||||
CRASH_COND(d < 0 || d >= VoxelBuffer::DEPTH_COUNT);
|
||||
return g_depth_max_values[d];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue