mirror of
https://github.com/Relintai/voxelman.git
synced 2024-11-14 10:17:20 +01:00
Removed the temp mesh array I just added from voxel chunk.
This commit is contained in:
parent
656f0ba9fa
commit
370e14f6c8
@ -780,18 +780,15 @@ void VoxelChunk::_build_phase(int phase) {
|
||||
|
||||
ERR_FAIL_COND(!mesher.is_valid());
|
||||
|
||||
temp_mesh_arr = mesher->build_mesh();
|
||||
if (mesher->get_vertex_count() == 0) {
|
||||
next_phase();
|
||||
return;
|
||||
}
|
||||
|
||||
if (_mesh_rid != RID())
|
||||
VS::get_singleton()->mesh_clear(_mesh_rid);
|
||||
|
||||
PoolVector3Array v = temp_mesh_arr[VisualServer::ARRAY_VERTEX];
|
||||
|
||||
if (temp_mesh_arr.size() == 0 || v.size() == 0) {
|
||||
temp_mesh_arr.clear();
|
||||
next_phase();
|
||||
return;
|
||||
}
|
||||
Array temp_mesh_arr = mesher->build_mesh();
|
||||
|
||||
if (_mesh_rid == RID()) {
|
||||
allocate_main_mesh();
|
||||
@ -802,8 +799,6 @@ void VoxelChunk::_build_phase(int phase) {
|
||||
if (_library->get_material().is_valid())
|
||||
VS::get_singleton()->mesh_surface_set_material(_mesh_rid, 0, _library->get_material()->get_rid());
|
||||
|
||||
temp_mesh_arr.clear();
|
||||
|
||||
next_phase();
|
||||
|
||||
return;
|
||||
|
@ -393,7 +393,6 @@ protected:
|
||||
Mutex *_build_phase_done_mutex;
|
||||
bool _build_phase_done;
|
||||
Thread *_build_thread;
|
||||
Array temp_mesh_arr;
|
||||
};
|
||||
|
||||
VARIANT_ENUM_CAST(VoxelChunk::DefaultChannels);
|
||||
|
Loading…
Reference in New Issue
Block a user