mirror of
https://github.com/Relintai/terraman.git
synced 2025-04-23 21:43:23 +02:00
Fix typos.
This commit is contained in:
parent
01721b9488
commit
d3e5bb84cc
@ -516,18 +516,18 @@ int TerraWorld::generation_get_size() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if PROPS_PRESENT
|
#if PROPS_PRESENT
|
||||||
void TerraWorld::prop_add(Transform tarnsform, const Ref<PropData> &prop, const bool apply_voxel_scael) {
|
void TerraWorld::prop_add(Transform transform, const Ref<PropData> &prop, const bool apply_voxel_scale) {
|
||||||
ERR_FAIL_COND(!prop.is_valid());
|
ERR_FAIL_COND(!prop.is_valid());
|
||||||
|
|
||||||
if (apply_voxel_scael) {
|
if (apply_voxel_scale) {
|
||||||
tarnsform = tarnsform.scaled(Vector3(get_voxel_scale(), get_voxel_scale(), get_voxel_scale()));
|
transform = transform.scaled(Vector3(get_voxel_scale(), get_voxel_scale(), get_voxel_scale()));
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector3 wp;
|
Vector3 wp;
|
||||||
wp = tarnsform.xform(wp);
|
wp = transform.xform(wp);
|
||||||
Ref<TerraChunk> chunk = get_or_create_chunk_at_world_position(wp);
|
Ref<TerraChunk> chunk = get_or_create_chunk_at_world_position(wp);
|
||||||
|
|
||||||
chunk->prop_add(tarnsform, prop);
|
chunk->prop_add(transform, prop);
|
||||||
|
|
||||||
int count = prop->get_prop_count();
|
int count = prop->get_prop_count();
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
@ -536,7 +536,7 @@ void TerraWorld::prop_add(Transform tarnsform, const Ref<PropData> &prop, const
|
|||||||
if (!entry.is_valid())
|
if (!entry.is_valid())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Transform t = tarnsform * entry->get_transform();
|
Transform t = transform * entry->get_transform();
|
||||||
|
|
||||||
wp = t.xform(Vector3());
|
wp = t.xform(Vector3());
|
||||||
chunk = get_or_create_chunk_at_world_position(wp);
|
chunk = get_or_create_chunk_at_world_position(wp);
|
||||||
@ -1091,7 +1091,7 @@ void TerraWorld::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("on_chunk_mesh_generation_finished", "chunk"), &TerraWorld::on_chunk_mesh_generation_finished);
|
ClassDB::bind_method(D_METHOD("on_chunk_mesh_generation_finished", "chunk"), &TerraWorld::on_chunk_mesh_generation_finished);
|
||||||
|
|
||||||
#if PROPS_PRESENT
|
#if PROPS_PRESENT
|
||||||
ClassDB::bind_method(D_METHOD("prop_add", "transform", "prop", "apply_voxel_scael"), &TerraWorld::prop_add, DEFVAL(true));
|
ClassDB::bind_method(D_METHOD("prop_add", "transform", "prop", "apply_voxel_scale"), &TerraWorld::prop_add, DEFVAL(true));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Lights
|
//Lights
|
||||||
|
@ -163,7 +163,7 @@ public:
|
|||||||
int generation_get_size() const;
|
int generation_get_size() const;
|
||||||
|
|
||||||
#if PROPS_PRESENT
|
#if PROPS_PRESENT
|
||||||
void prop_add(Transform tarnsform, const Ref<PropData> &prop, const bool apply_voxel_scael = true);
|
void prop_add(Transform transform, const Ref<PropData> &prop, const bool apply_voxel_scale = true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Lights
|
//Lights
|
||||||
|
Loading…
Reference in New Issue
Block a user