From 470b48ea0dc0ec461694c2a82cbb2761ad69db60 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 21 Nov 2020 00:29:34 +0800 Subject: [PATCH 1/2] Fix Max version --- nel/tools/3d/ligo/plugin_max/version.rc2 | 4 ++++ nel/tools/3d/plugin_max/nel_3dsmax_shared/version.rc2 | 4 ++++ nel/tools/3d/plugin_max/nel_patch_converter/version.rc2 | 4 ++++ nel/tools/3d/plugin_max/nel_patch_edit/version.rc2 | 4 ++++ nel/tools/3d/plugin_max/nel_patch_paint/version.rc2 | 4 ++++ nel/tools/3d/plugin_max/nel_vertex_tree_paint/version.rc2 | 4 ++++ nel/tools/3d/plugin_max/tile_utility/version.rc2 | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/nel/tools/3d/ligo/plugin_max/version.rc2 b/nel/tools/3d/ligo/plugin_max/version.rc2 index 56dbaa448..70ff66abb 100644 --- a/nel/tools/3d/ligo/plugin_max/version.rc2 +++ b/nel/tools/3d/ligo/plugin_max/version.rc2 @@ -12,6 +12,10 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #define STRINGIFY_(x) #x #define STRINGIFY(x) STRINGIFY_(x) +#ifndef MAX_PRODUCT_YEAR_NUMBER +#define MAX_PRODUCT_YEAR_NUMBER MAX_VERSION_MAJOR +#endif + #ifdef _DEBUG #define NL_FILEEXT "_d" #else diff --git a/nel/tools/3d/plugin_max/nel_3dsmax_shared/version.rc2 b/nel/tools/3d/plugin_max/nel_3dsmax_shared/version.rc2 index d584d0982..ccda8e6e8 100644 --- a/nel/tools/3d/plugin_max/nel_3dsmax_shared/version.rc2 +++ b/nel/tools/3d/plugin_max/nel_3dsmax_shared/version.rc2 @@ -12,6 +12,10 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #define STRINGIFY_(x) #x #define STRINGIFY(x) STRINGIFY_(x) +#ifndef MAX_PRODUCT_YEAR_NUMBER +#define MAX_PRODUCT_YEAR_NUMBER MAX_VERSION_MAJOR +#endif + #ifdef _DEBUG #define NL_FILEEXT "_d" #else diff --git a/nel/tools/3d/plugin_max/nel_patch_converter/version.rc2 b/nel/tools/3d/plugin_max/nel_patch_converter/version.rc2 index 57004f301..aabed0e99 100644 --- a/nel/tools/3d/plugin_max/nel_patch_converter/version.rc2 +++ b/nel/tools/3d/plugin_max/nel_patch_converter/version.rc2 @@ -12,6 +12,10 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #define STRINGIFY_(x) #x #define STRINGIFY(x) STRINGIFY_(x) +#ifndef MAX_PRODUCT_YEAR_NUMBER +#define MAX_PRODUCT_YEAR_NUMBER MAX_VERSION_MAJOR +#endif + #ifdef _DEBUG #define NL_FILEEXT "_d" #else diff --git a/nel/tools/3d/plugin_max/nel_patch_edit/version.rc2 b/nel/tools/3d/plugin_max/nel_patch_edit/version.rc2 index 92d5dada7..72d296cb2 100644 --- a/nel/tools/3d/plugin_max/nel_patch_edit/version.rc2 +++ b/nel/tools/3d/plugin_max/nel_patch_edit/version.rc2 @@ -12,6 +12,10 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #define STRINGIFY_(x) #x #define STRINGIFY(x) STRINGIFY_(x) +#ifndef MAX_PRODUCT_YEAR_NUMBER +#define MAX_PRODUCT_YEAR_NUMBER MAX_VERSION_MAJOR +#endif + #ifdef _DEBUG #define NL_FILEEXT "_d" #else diff --git a/nel/tools/3d/plugin_max/nel_patch_paint/version.rc2 b/nel/tools/3d/plugin_max/nel_patch_paint/version.rc2 index 080d0e24c..abbdc69df 100644 --- a/nel/tools/3d/plugin_max/nel_patch_paint/version.rc2 +++ b/nel/tools/3d/plugin_max/nel_patch_paint/version.rc2 @@ -12,6 +12,10 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #define STRINGIFY_(x) #x #define STRINGIFY(x) STRINGIFY_(x) +#ifndef MAX_PRODUCT_YEAR_NUMBER +#define MAX_PRODUCT_YEAR_NUMBER MAX_VERSION_MAJOR +#endif + #ifdef _DEBUG #define NL_FILEEXT "_d" #else diff --git a/nel/tools/3d/plugin_max/nel_vertex_tree_paint/version.rc2 b/nel/tools/3d/plugin_max/nel_vertex_tree_paint/version.rc2 index 669cb1c15..dd205b8a1 100644 --- a/nel/tools/3d/plugin_max/nel_vertex_tree_paint/version.rc2 +++ b/nel/tools/3d/plugin_max/nel_vertex_tree_paint/version.rc2 @@ -12,6 +12,10 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #define STRINGIFY_(x) #x #define STRINGIFY(x) STRINGIFY_(x) +#ifndef MAX_PRODUCT_YEAR_NUMBER +#define MAX_PRODUCT_YEAR_NUMBER MAX_VERSION_MAJOR +#endif + #ifdef _DEBUG #define NL_FILEEXT "_d" #else diff --git a/nel/tools/3d/plugin_max/tile_utility/version.rc2 b/nel/tools/3d/plugin_max/tile_utility/version.rc2 index 2c4d7869a..c3069afe5 100644 --- a/nel/tools/3d/plugin_max/tile_utility/version.rc2 +++ b/nel/tools/3d/plugin_max/tile_utility/version.rc2 @@ -12,6 +12,10 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #define STRINGIFY_(x) #x #define STRINGIFY(x) STRINGIFY_(x) +#ifndef MAX_PRODUCT_YEAR_NUMBER +#define MAX_PRODUCT_YEAR_NUMBER MAX_VERSION_MAJOR +#endif + #ifdef _DEBUG #define NL_FILEEXT "_d" #else From b1ef06d9009a7d66da738189c4df6ccb1bb38fcf Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 22 Nov 2020 03:55:50 +0800 Subject: [PATCH 2/2] These asserts don't make sense --- nel/src/3d/render_trav.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nel/src/3d/render_trav.cpp b/nel/src/3d/render_trav.cpp index 1b7e8e84e..a1e1b69be 100644 --- a/nel/src/3d/render_trav.cpp +++ b/nel/src/3d/render_trav.cpp @@ -921,7 +921,7 @@ void CRenderTrav::changeVPLightSetupMaterial(const CMaterial &mat, bool exclude Driver->setUniform4f(IDriver::VertexProgram, program->idxLighted().Diffuse[i], color); } - nlassert(_VPNumLights < MaxVPLight); + nlassert(_VPNumLights <= MaxVPLight); if (i != _VPNumLights) { color= _VPLightDiffuse[i] * matDiff; @@ -1240,7 +1240,7 @@ std::string CRenderTrav::getLightVPFragmentNeLVP(uint numActivePointLights, uin // Code frag written for 4 light max. nlassert(MaxVPLight==4); - nlassert(numActivePointLights<=MaxVPLight-1); + nlassert(numActivePointLights<=MaxVPLight); // Add LightingVPFragmentNormalize fragment? if(normalize)