mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-02-02 14:25:55 +01:00
Codestyle.
This commit is contained in:
parent
ac39ffb96b
commit
c5ec0b8a33
@ -599,21 +599,24 @@ void TerrainWorld::prop_add(Transform transform, const Ref<PropData> &prop, cons
|
|||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
Ref<PropDataEntry> entry = prop->get_prop(i);
|
Ref<PropDataEntry> entry = prop->get_prop(i);
|
||||||
|
|
||||||
if (!entry.is_valid())
|
if (!entry.is_valid()) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Transform t = transform * 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);
|
||||||
|
|
||||||
|
|
||||||
Ref<PropDataProp> prop_entry_data = entry;
|
Ref<PropDataProp> prop_entry_data = entry;
|
||||||
|
|
||||||
if (prop_entry_data.is_valid()) {
|
if (prop_entry_data.is_valid()) {
|
||||||
Ref<PropData> p = prop_entry_data->get_prop();
|
Ref<PropData> p = prop_entry_data->get_prop();
|
||||||
|
|
||||||
if (!p.is_valid())
|
if (!p.is_valid()) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
prop_add(t, p, false);
|
prop_add(t, p, false);
|
||||||
|
|
||||||
@ -625,8 +628,9 @@ void TerrainWorld::prop_add(Transform transform, const Ref<PropData> &prop, cons
|
|||||||
if (scene_data.is_valid()) {
|
if (scene_data.is_valid()) {
|
||||||
Ref<PackedScene> sc = scene_data->get_scene();
|
Ref<PackedScene> sc = scene_data->get_scene();
|
||||||
|
|
||||||
if (!sc.is_valid())
|
if (!sc.is_valid()) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Node *n = sc->instance();
|
Node *n = sc->instance();
|
||||||
add_child(n);
|
add_child(n);
|
||||||
@ -662,8 +666,9 @@ void TerrainWorld::prop_add(Transform transform, const Ref<PropData> &prop, cons
|
|||||||
if (mesh_data.is_valid()) {
|
if (mesh_data.is_valid()) {
|
||||||
Ref<MeshDataResource> mdr = mesh_data->get_mesh();
|
Ref<MeshDataResource> mdr = mesh_data->get_mesh();
|
||||||
|
|
||||||
if (!mdr.is_valid())
|
if (!mdr.is_valid()) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Transform chunk_local_tform = t;
|
Transform chunk_local_tform = t;
|
||||||
|
|
||||||
|
@ -563,8 +563,9 @@ void VoxelWorld::prop_add(Transform tarnsform, const Ref<PropData> &prop, const
|
|||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
Ref<PropDataEntry> entry = prop->get_prop(i);
|
Ref<PropDataEntry> entry = prop->get_prop(i);
|
||||||
|
|
||||||
if (!entry.is_valid())
|
if (!entry.is_valid()) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Transform t = tarnsform * entry->get_transform();
|
Transform t = tarnsform * entry->get_transform();
|
||||||
|
|
||||||
@ -576,8 +577,9 @@ void VoxelWorld::prop_add(Transform tarnsform, const Ref<PropData> &prop, const
|
|||||||
if (prop_entry_data.is_valid()) {
|
if (prop_entry_data.is_valid()) {
|
||||||
Ref<PropData> p = prop_entry_data->get_prop();
|
Ref<PropData> p = prop_entry_data->get_prop();
|
||||||
|
|
||||||
if (!p.is_valid())
|
if (!p.is_valid()) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
prop_add(t, p, false);
|
prop_add(t, p, false);
|
||||||
|
|
||||||
@ -589,8 +591,9 @@ void VoxelWorld::prop_add(Transform tarnsform, const Ref<PropData> &prop, const
|
|||||||
if (scene_data.is_valid()) {
|
if (scene_data.is_valid()) {
|
||||||
Ref<PackedScene> sc = scene_data->get_scene();
|
Ref<PackedScene> sc = scene_data->get_scene();
|
||||||
|
|
||||||
if (!sc.is_valid())
|
if (!sc.is_valid()) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Node *n = sc->instance();
|
Node *n = sc->instance();
|
||||||
add_child(n);
|
add_child(n);
|
||||||
|
Loading…
Reference in New Issue
Block a user