Fix build for 4.0.

This commit is contained in:
Relintai 2020-04-09 12:37:56 +02:00
parent dc598c5932
commit 58d46884a4

View File

@ -19,7 +19,6 @@
#include "core/math/vector3.h"
#include "core/ustring.h"
#include "scene/resources/mesh.h"
#include "servers/visual_server.h"
#include <float.h> //FLT_EPSILON, DBL_EPSILON
#include <limits.h>
@ -27,6 +26,19 @@
#include <map>
#include <vector>
#include "core/version.h"
#if VERSION_MAJOR < 4
#include "servers/visual_server.h"
#else
#include "servers/rendering_server.h"
typedef class RenderingServer VisualServer;
typedef class RenderingServer VS;
#define PoolVector Vector
#endif
namespace Simplify {
struct vector3 {
@ -1069,8 +1081,9 @@ public:
PoolVector<int> pindices = arrays.get(ArrayMesh::ARRAY_INDEX);
if ((pindices.size() % 3) != 0)
if ((pindices.size() % 3) != 0) {
ERR_FAIL_MSG("The index array length must be a multiple of 3 in order to represent triangles.");
}
//std::vector<std::vector<int> > uvMap;