mirror of
https://github.com/Relintai/voxelman.git
synced 2025-01-12 15:01:09 +01:00
Fixed compile when mesh_data_resource is present, and props is not. Closes #3, thanks!
This commit is contained in:
parent
d9c523de59
commit
9253cc53c6
@ -723,11 +723,15 @@ int VoxelChunk::mesh_data_resource_addv(const Vector3 &local_data_pos, const Ref
|
||||
AABB mesh_aabb = e.transform.xform(mesh->get_aabb());
|
||||
e.is_inside = aabb.encloses(mesh_aabb);
|
||||
|
||||
#if PROPS_PRESENT
|
||||
if (get_library().is_valid() && texture.is_valid()) {
|
||||
e.uv_rect = get_library()->get_prop_uv_rect(texture);
|
||||
} else {
|
||||
e.uv_rect = Rect2(0, 0, 1, 1);
|
||||
}
|
||||
#else
|
||||
e.uv_rect = Rect2(0, 0, 1, 1);
|
||||
#endif
|
||||
|
||||
_mesh_data_resources.push_back(e);
|
||||
|
||||
@ -759,10 +763,14 @@ int VoxelChunk::mesh_data_resource_add(const Transform &local_transform, const R
|
||||
AABB mesh_aabb = e.transform.xform(mesh->get_aabb());
|
||||
e.is_inside = aabb.encloses(mesh_aabb);
|
||||
|
||||
#if PROPS_PRESENT
|
||||
if (get_library().is_valid() && texture.is_valid())
|
||||
e.uv_rect = get_library()->get_prop_uv_rect(texture);
|
||||
else
|
||||
e.uv_rect = Rect2(0, 0, 1, 1);
|
||||
#else
|
||||
e.uv_rect = Rect2(0, 0, 1, 1);
|
||||
#endif
|
||||
|
||||
_mesh_data_resources.push_back(e);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user