From dfbdb5bcd7bc48efb21d585d5c22454a9d5f0f1e Mon Sep 17 00:00:00 2001 From: kwolekr Date: Sat, 4 Jun 2016 01:35:37 -0400 Subject: Change internal type for seeds to s32 This fixes value truncation (and therefore incompatibility) on platforms with an LP32 data model, such as VAX or MS-DOS. --- src/script/lua_api/l_noise.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/script/lua_api/l_noise.h') diff --git a/src/script/lua_api/l_noise.h b/src/script/lua_api/l_noise.h index 492eb7550..40bfd1315 100644 --- a/src/script/lua_api/l_noise.h +++ b/src/script/lua_api/l_noise.h @@ -79,7 +79,7 @@ class LuaPerlinNoiseMap : public ModApiBase { static int l_getMapSlice(lua_State *L); public: - LuaPerlinNoiseMap(NoiseParams *np, int seed, v3s16 size); + LuaPerlinNoiseMap(NoiseParams *np, s32 seed, v3s16 size); ~LuaPerlinNoiseMap(); @@ -111,7 +111,7 @@ private: static int l_next(lua_State *L); public: - LuaPseudoRandom(int seed) : + LuaPseudoRandom(s32 seed) : m_pseudo(seed) {} // LuaPseudoRandom(seed) -- cgit v1.2.3