Typo fixes.

This commit is contained in:
Relintai 2019-10-16 00:50:30 +02:00
parent 472b077d3f
commit 8e4e65371d
4 changed files with 12 additions and 10 deletions

View File

@ -328,15 +328,15 @@ void VoxelBuffer::add_light(int local_x, int local_y, int local_z, int size, Col
//float bf = (color.b / sizef); //float bf = (color.b / sizef);
for (int y = local_y - size; y <= local_y + size; ++y) { for (int y = local_y - size; y <= local_y + size; ++y) {
if (y < 0 || y > size_y) if (y < 0 || y >= size_y)
continue; continue;
for (int z = local_z - size; z <= local_z + size; ++z) { for (int z = local_z - size; z <= local_z + size; ++z) {
if (z < 0 || z > size_z) if (z < 0 || z >= size_z)
continue; continue;
for (int x = local_x - size; x <= local_x + size; ++x) { for (int x = local_x - size; x <= local_x + size; ++x) {
if (x < 0 || x > size_x) if (x < 0 || x >= size_x)
continue; continue;
int lx = x - local_x; int lx = x - local_x;

View File

@ -879,6 +879,7 @@ void VoxelChunk::_bind_methods() {
BIND_CONSTANT(BUILD_PHASE_DONE); BIND_CONSTANT(BUILD_PHASE_DONE);
BIND_CONSTANT(BUILD_PHASE_SETUP); BIND_CONSTANT(BUILD_PHASE_SETUP);
BIND_CONSTANT(BUILD_PHASE_LIGHTS);
BIND_CONSTANT(BUILD_PHASE_TERRARIN_MESH); BIND_CONSTANT(BUILD_PHASE_TERRARIN_MESH);
BIND_CONSTANT(BUILD_PHASE_TERRARIN_MESH_COLLIDER); BIND_CONSTANT(BUILD_PHASE_TERRARIN_MESH_COLLIDER);
BIND_CONSTANT(BUILD_PHASE_PROP_MESH); BIND_CONSTANT(BUILD_PHASE_PROP_MESH);

View File

@ -172,11 +172,12 @@ public:
enum { enum {
BUILD_PHASE_DONE = 0, BUILD_PHASE_DONE = 0,
BUILD_PHASE_SETUP = 1, BUILD_PHASE_SETUP = 1,
BUILD_PHASE_TERRARIN_MESH = 2, BUILD_PHASE_LIGHTS = 2,
BUILD_PHASE_TERRARIN_MESH_COLLIDER = 3, BUILD_PHASE_TERRARIN_MESH = 3,
BUILD_PHASE_PROP_MESH = 4, BUILD_PHASE_TERRARIN_MESH_COLLIDER = 4,
BUILD_PHASE_PROP_COLLIDER = 5, BUILD_PHASE_PROP_MESH = 5,
BUILD_PHASE_MAX = 6 BUILD_PHASE_PROP_COLLIDER = 6,
BUILD_PHASE_MAX = 7
}; };
protected: protected:

View File

@ -121,11 +121,11 @@ void VoxelChunkPropData::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "snap_axis"), "set_snap_axis", "get_snap_axis"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "snap_axis"), "set_snap_axis", "get_snap_axis");
ClassDB::bind_method(D_METHOD("get_mesh"), &VoxelChunkPropData::get_mesh); ClassDB::bind_method(D_METHOD("get_mesh"), &VoxelChunkPropData::get_mesh);
ClassDB::bind_method(D_METHOD("set_mesh", "value"), &VoxelChunkPropData::set_scene); ClassDB::bind_method(D_METHOD("set_mesh", "value"), &VoxelChunkPropData::set_mesh);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "mesh", PROPERTY_HINT_RESOURCE_TYPE, "MeshDataResource"), "set_mesh", "get_mesh"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "mesh", PROPERTY_HINT_RESOURCE_TYPE, "MeshDataResource"), "set_mesh", "get_mesh");
ClassDB::bind_method(D_METHOD("get_light"), &VoxelChunkPropData::get_light); ClassDB::bind_method(D_METHOD("get_light"), &VoxelChunkPropData::get_light);
ClassDB::bind_method(D_METHOD("set_light", "value"), &VoxelChunkPropData::set_scene); ClassDB::bind_method(D_METHOD("set_light", "value"), &VoxelChunkPropData::set_light);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "light", PROPERTY_HINT_RESOURCE_TYPE, "VoxelmanPropLight"), "set_light", "get_light"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "light", PROPERTY_HINT_RESOURCE_TYPE, "VoxelmanPropLight"), "set_light", "get_light");
ClassDB::bind_method(D_METHOD("get_prop"), &VoxelChunkPropData::get_prop); ClassDB::bind_method(D_METHOD("get_prop"), &VoxelChunkPropData::get_prop);