Fix compile for 4.0.

This commit is contained in:
Relintai 2020-10-06 23:15:32 +02:00
parent 90fe105b54
commit e42931597c
3 changed files with 15 additions and 8 deletions

View File

@ -31,6 +31,12 @@ SOFTWARE.
#include "core/resource.h"
#endif
#include "../../defines.h"
#if GODOT4
#define Texture Texture2D
#endif
class VoxelChunk;
#if THREAD_POOL_PRESENT

View File

@ -22,8 +22,6 @@ SOFTWARE.
#include "voxel_terrarin_job.h"
#include "../../defines.h"
#include "../../library/voxel_surface.h"
#include "../../library/voxelman_library.h"
@ -176,7 +174,6 @@ void VoxelTerrarinJob::phase_collider() {
}
if (Engine::get_singleton()->is_editor_hint()) {
starti = 0;
if (has_meta("bpc_laa")) {
@ -346,7 +343,6 @@ void VoxelTerrarinJob::phase_terrarin_mesh() {
}
if (mesher->get_vertex_count() == 0 && liquid_mesher.is_valid() && liquid_mesher->get_vertex_count() == 0) {
if (has_meta("bptm_ulm")) {
remove_meta("bptm_ulm");
}
@ -370,7 +366,6 @@ void VoxelTerrarinJob::phase_terrarin_mesh() {
}
if (mesher->get_vertex_count() != 0) {
if (should_do()) {
temp_mesh_arr = mesher->build_mesh();

View File

@ -25,7 +25,13 @@ SOFTWARE.
#include "voxel_job.h"
class VoxelMesher;
#include "../../defines.h"
#include pool_vector_h
include_pool_vector
class VoxelMesher;
class VoxelTerrarinJob : public VoxelJob {
GDCLASS(VoxelTerrarinJob, VoxelJob);
@ -63,8 +69,8 @@ public:
protected:
static void _bind_methods();
Vector<Ref<VoxelMesher> > _meshers;
Vector<Ref<VoxelMesher> > _liquid_meshers;
Vector<Ref<VoxelMesher>> _meshers;
Vector<Ref<VoxelMesher>> _liquid_meshers;
PoolVector<Vector3> temp_arr_collider;
PoolVector<Vector3> temp_arr_collider_liquid;