From ae68ce722e0cba79b709838a3ff2fa38d306c484 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 16 Dec 2019 11:50:15 +0800 Subject: [PATCH] Various fixes or adjustments --- code/nel/include/nel/3d/texture.h | 3 ++- code/ryzom/client/src/r2/dmc/com_lua_module.cpp | 2 +- code/ryzom/common/src/game_share/object.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/nel/include/nel/3d/texture.h b/code/nel/include/nel/3d/texture.h index bd71a00fd..f74af29d9 100644 --- a/code/nel/include/nel/3d/texture.h +++ b/code/nel/include/nel/3d/texture.h @@ -106,7 +106,8 @@ public: class ITexture : public CBitmap, public NLMISC::CRefCount, public NLMISC::IStreamable { public: -// NL_USES_DEFAULT_ARENA_OBJECT_ALLOCATOR // for fast alloc + // TODO: FIX: NL_USES_DEFAULT_ARENA_OBJECT_ALLOCATOR // for fast alloc + // Those enums MUST be the same than in UTexture!! enum TWrapMode { diff --git a/code/ryzom/client/src/r2/dmc/com_lua_module.cpp b/code/ryzom/client/src/r2/dmc/com_lua_module.cpp index c717b2cba..2ea3d91dd 100644 --- a/code/ryzom/client/src/r2/dmc/com_lua_module.cpp +++ b/code/ryzom/client/src/r2/dmc/com_lua_module.cpp @@ -1261,7 +1261,7 @@ CObject* CComLuaModule::getObjectFromLua(lua_State* state, sint idx) case LUA_TBOOLEAN: { - double value = static_cast(lua_toboolean(state, -1)); + sint64 value = lua_toboolean(state, -1); lua_pop(state, 1); return new CObjectNumber(value); } diff --git a/code/ryzom/common/src/game_share/object.cpp b/code/ryzom/common/src/game_share/object.cpp index 4b12cf3ea..c9315997f 100644 --- a/code/ryzom/common/src/game_share/object.cpp +++ b/code/ryzom/common/src/game_share/object.cpp @@ -760,7 +760,7 @@ void CObjectRefId::doSerialize(std::string& out, CSerializeContext& /* context CObjectNumber::CObjectNumber(double value) : CObject(), m_IsInteger(false) { - m_Value.Integer = value; + m_Value.Number = value; } CObjectNumber::CObjectNumber(sint64 value) : CObject(), m_IsInteger(true)