From bfc65e70e778deb02fb285998420848e79fb3c4f Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 6 Sep 2013 14:44:03 +0200 Subject: [PATCH 1/9] Removed: DInput module because it's not used anymore --- code/CMakeModules/FindDInput.cmake | 38 ------------------------------ 1 file changed, 38 deletions(-) delete mode 100644 code/CMakeModules/FindDInput.cmake diff --git a/code/CMakeModules/FindDInput.cmake b/code/CMakeModules/FindDInput.cmake deleted file mode 100644 index 100650652..000000000 --- a/code/CMakeModules/FindDInput.cmake +++ /dev/null @@ -1,38 +0,0 @@ -# - Find DirectInput -# Find the DirectSound includes and libraries -# -# DINPUT_INCLUDE_DIR - where to find dinput.h -# DINPUT_LIBRARIES - List of libraries when using DirectInput. -# DINPUT_FOUND - True if DirectInput found. - -if(DINPUT_INCLUDE_DIR) - # Already in cache, be silent - set(DINPUT_FIND_QUIETLY TRUE) -endif(DINPUT_INCLUDE_DIR) - -find_path(DINPUT_INCLUDE_DIR dinput.h - "$ENV{DXSDK_DIR}" - "$ENV{DXSDK_DIR}/Include" -) - -find_library(DINPUT_LIBRARY - NAMES dinput dinput8 - PATHS - "$ENV{DXSDK_DIR}" - "$ENV{DXSDK_DIR}/Lib" - "$ENV{DXSDK_DIR}/Lib/x86" -) - -# Handle the QUIETLY and REQUIRED arguments and set DINPUT_FOUND to TRUE if -# all listed variables are TRUE. -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(DINPUT DEFAULT_MSG - DINPUT_INCLUDE_DIR DINPUT_LIBRARY) - -if(DINPUT_FOUND) - set(DINPUT_LIBRARIES ${DINPUT_LIBRARY}) -else(DINPUT_FOUND) - set(DINPUT_LIBRARIES) -endif(DINPUT_FOUND) - -mark_as_advanced(DINPUT_INCLUDE_DIR DINPUT_LIBRARY) From 1560df430ac9cf4d4adc0323d0673ce4ef38bf35 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 6 Sep 2013 14:45:48 +0200 Subject: [PATCH 2/9] Changed: Replace atoi by NLMISC::fromString --- .../brick_param_extractor.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/code/ryzom/tools/server/brick_param_extractor/brick_param_extractor.cpp b/code/ryzom/tools/server/brick_param_extractor/brick_param_extractor.cpp index 0ff24e0f9..1a4257a99 100644 --- a/code/ryzom/tools/server/brick_param_extractor/brick_param_extractor.cpp +++ b/code/ryzom/tools/server/brick_param_extractor/brick_param_extractor.cpp @@ -490,6 +490,8 @@ void COutputFile::generateOutput() const outbuff+="/*\n"; outbuff+="\tFILE: "; outbuff+=_FileName+"\n\n"; + outbuff+="#ifndef RY_EGS_STATIC_BRICK_CPP_H\n"; + outbuff+="#define RY_EGS_STATIC_BRICK_CPP_H\n\n"; outbuff+="\tWARNING: This file is autogenerated - any modifications will be lost at next regeneration\n\n"; outbuff+="*/\n\n"; @@ -505,6 +507,8 @@ void COutputFile::generateOutput() const _Structures[i].generateOutput(outbuff); } + outbuff+="#endif\n\n"; + // read in the previous version of the output file char *inbuff=NULL; FILE *inf=fopen(_FileName.c_str(),"rb"); @@ -631,17 +635,11 @@ void COutputFile::CStruct::generateOutput(std::string &outbuff) const for (i=0;i<_Params.size();++i) { outbuff+="\t\t"; - outbuff+=_Params[i]._Name+"="; - if (_Params[i]._Type==COutputFile::INT) outbuff+="atoi("; - if (_Params[i]._Type==COutputFile::FLOAT) outbuff+="(float)atof("; - outbuff+="args["; + outbuff+="NLMISC::fromString(args["; if (i>100) outbuff+=('0'+((i/100)%10)); if (i>10) outbuff+=('0'+((i/10)%10)); outbuff+=('0'+(i%10)); - if (_Params[i]._Type==COutputFile::INT || _Params[i]._Type==COutputFile::FLOAT) - outbuff+="].c_str());\n"; - else - outbuff+="].c_str();\n"; + outbuff+="], "+_Params[i]._Name+");\n"; } outbuff+="\n"; outbuff+="\t\treturn *this;\n"; From b16d904bb275d634078f92c0d2a521edeb91b967 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 6 Sep 2013 14:48:21 +0200 Subject: [PATCH 3/9] Fixed: Use 32 bits libraries from Windows SDK in 64 bits --- code/CMakeModules/FindWindowsSDK.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/CMakeModules/FindWindowsSDK.cmake b/code/CMakeModules/FindWindowsSDK.cmake index 8f6ed5772..1b2affb99 100644 --- a/code/CMakeModules/FindWindowsSDK.cmake +++ b/code/CMakeModules/FindWindowsSDK.cmake @@ -43,10 +43,13 @@ FOREACH(_VERSION ${WINSDK_VERSIONS}) DETECT_WINSDK_VERSION(${_VERSION}) ENDFOREACH(_VERSION) +SET(WINSDK_SUFFIX) + IF(TARGET_ARM) SET(WINSDK8_SUFFIX "arm") ELSEIF(TARGET_X64) SET(WINSDK8_SUFFIX "x64") + SET(WINSDK_SUFFIX "x64") ELSEIF(TARGET_X86) SET(WINSDK8_SUFFIX "x86") ENDIF(TARGET_ARM) @@ -133,7 +136,7 @@ FIND_PATH(WINSDK_SHARED_INCLUDE_DIR d3d9.h FIND_PATH(WINSDK_LIBRARY_DIR ComCtl32.lib HINTS ${WINSDK_DIR}/Lib/win8/um/${WINSDK8_SUFFIX} - ${WINSDK_DIR}/Lib + ${WINSDK_DIR}/Lib/${WINSDK_SUFFIX} ) # signtool is used to sign executables From 12cd9083de4386053f2b9103cbf3becdec239418 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 6 Sep 2013 14:49:12 +0200 Subject: [PATCH 4/9] Changed: Cleanlooks doesn't exist anymore in Qt 5, so use default style --- code/nel/samples/3d/nel_qt/nel_qt.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/samples/3d/nel_qt/nel_qt.cfg b/code/nel/samples/3d/nel_qt/nel_qt.cfg index b2c141f89..b87b4767a 100644 --- a/code/nel/samples/3d/nel_qt/nel_qt.cfg +++ b/code/nel/samples/3d/nel_qt/nel_qt.cfg @@ -6,7 +6,7 @@ GraphicsDriver = "OpenGL"; SoundDriver = "OpenAL"; SoundDevice = ""; LanguageCode = "en"; -QtStyle = "Cleanlooks"; +QtStyle = ""; FontName = "andbasr.ttf"; FontShadow = 1; BackgroundColor = { From 53d5e56a2ae1f3d0975f28330c37194a38b371c8 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 6 Sep 2013 14:50:19 +0200 Subject: [PATCH 5/9] Changed: Don't use NLMISC includes in NLMISC PCH --- code/nel/src/misc/stdmisc.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/code/nel/src/misc/stdmisc.h b/code/nel/src/misc/stdmisc.h index 1c1cda1e5..432ec02b0 100644 --- a/code/nel/src/misc/stdmisc.h +++ b/code/nel/src/misc/stdmisc.h @@ -17,8 +17,6 @@ #ifndef NL_STDMISC_H #define NL_STDMISC_H -#include "nel/misc/types_nl.h" - #include #include #include @@ -44,16 +42,7 @@ #include #include -#include "nel/misc/debug.h" -#include "nel/misc/common.h" -#include "nel/misc/fast_mem.h" -#include "nel/misc/system_info.h" -#include "nel/misc/mem_displayer.h" -#include "nel/misc/stream.h" -#include "nel/misc/path.h" -#include "nel/misc/string_common.h" - -#ifdef NL_OS_WINDOWS +#ifdef _WIN32 #define NOMINMAX #include #include From 712f9ad2a0a10890f75bb5440476141e74b6ebe7 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 6 Sep 2013 14:51:21 +0200 Subject: [PATCH 6/9] Fixed: Integer 32 bits conversion to 64 bits pointer --- .../nel_vertex_tree_paint/vertex_tree_paint.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.cpp b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.cpp index 9c82f5421..a2465ba4c 100644 --- a/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.cpp +++ b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.cpp @@ -217,7 +217,7 @@ LRESULT APIENTRY colorSwatchSubclassWndProc( case WM_LBUTTONUP: case WM_LBUTTONDBLCLK: { HWND hPanel = GetParent(hwnd); - LONG mod = GetWindowLongPtr(hPanel,GWLP_USERDATA); + LONG_PTR mod = GetWindowLongPtr(hPanel,GWLP_USERDATA); if (mod) { ((VertexPaint*)mod)->PaletteButton(hwnd); } @@ -424,9 +424,10 @@ void VertexPaint::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev ) SendMessage(hParams, WM_POSTINIT, 0, 0); } - else { + else + { SetWindowLongPtr(hParams,GWLP_USERDATA,(LONG_PTR)this); - } + } iTint = SetupIntSpinner (hParams, IDC_TINT_SPIN, IDC_TINT, 0, 100, (int) (fTint*100.0f)); @@ -440,7 +441,7 @@ void VertexPaint::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev ) // Force an eval to update caches. NotifyDependents(FOREVER, PART_VERTCOLOR, REFMSG_CHANGE); - } +} void VertexPaint::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next) { From a886559bf6a040f99f157ff1174bc21fc16ccc6c Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 6 Sep 2013 14:53:40 +0200 Subject: [PATCH 7/9] Fixed: Define math.fmod as a function for Lua 5.0 --- code/ryzom/client/data/gamedev/interfaces_v3/player.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/player.lua b/code/ryzom/client/data/gamedev/interfaces_v3/player.lua index 062f09690..3827593b1 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/player.lua +++ b/code/ryzom/client/data/gamedev/interfaces_v3/player.lua @@ -8,6 +8,12 @@ function getDbPropU(dbEntry) return value end +if string.find(_VERSION, "Lua 5.0") then + function math.fmod(a, b) + return math.mod(a, b) + end +end + ------------------------------------------------------------------------------------------------------------ -- create the game namespace without reseting if already created in an other file. if (game==nil) then From 2a0d588cb5061cb82c19d31b4b7c679357cec076 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 6 Sep 2013 15:00:01 +0200 Subject: [PATCH 8/9] Changed: Merged code from official client --- .../client/src/interface_v3/chat_window.cpp | 56 +++++++++---------- .../src/input_output_service/chat_manager.cpp | 12 ++++ 2 files changed, 37 insertions(+), 31 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/chat_window.cpp b/code/ryzom/client/src/interface_v3/chat_window.cpp index 24b1e15c6..e74392432 100644 --- a/code/ryzom/client/src/interface_v3/chat_window.cpp +++ b/code/ryzom/client/src/interface_v3/chat_window.cpp @@ -924,33 +924,28 @@ void CChatGroupWindow::removeAllFreeTellers() void CChatGroupWindow::saveFreeTeller(NLMISC::IStream &f) { f.serialVersion(2); - - uint32 nNbFreeTellerSaved = 0; - - f.serial(nNbFreeTellerSaved); - - // Don't save the free tellers - //// Save the free teller only if it is present in the friend list to avoid the only-growing situation - //// because free tellers are never deleted in game if we save/load all the free tellers, we just create more - //// and more container. - - //uint32 i, nNbFreeTellerSaved = 0; - //for (i = 0; i < _FreeTellers.size(); ++i) - // if (PeopleInterraction.FriendList.getIndexFromName(_FreeTellers[i]->getUCTitle()) != -1) - // nNbFreeTellerSaved++; - - //f.serial(nNbFreeTellerSaved); - - //for (i = 0; i < _FreeTellers.size(); ++i) - //{ - // CGroupContainer *pGC = _FreeTellers[i]; - // if (PeopleInterraction.FriendList.getIndexFromName(pGC->getUCTitle()) != -1) - // { - // ucstring sTitle = pGC->getUCTitle(); - // f.serial(sTitle); - // } - //} + // Save the free teller only if it is present in the friend list to avoid the only-growing situation + // because free tellers are never deleted in game if we save/load all the free tellers, we just create more + // and more container. + + uint32 i, nNbFreeTellerSaved = 0; + for (i = 0; i < _FreeTellers.size(); ++i) + if (PeopleInterraction.FriendList.getIndexFromName(_FreeTellers[i]->getUCTitle()) != -1) + nNbFreeTellerSaved++; + + f.serial(nNbFreeTellerSaved); + + for (i = 0; i < _FreeTellers.size(); ++i) + { + CGroupContainer *pGC = _FreeTellers[i]; + + if (PeopleInterraction.FriendList.getIndexFromName(pGC->getUCTitle()) != -1) + { + ucstring sTitle = pGC->getUCTitle(); + f.serial(sTitle); + } + } } //================================================================================= @@ -979,12 +974,11 @@ void CChatGroupWindow::loadFreeTeller(NLMISC::IStream &f) ucstring sTitle; f.serial(sTitle); - // Don't actually create the free teller - //CGroupContainer *pGC = createFreeTeller(sTitle, ""); + CGroupContainer *pGC = createFreeTeller(sTitle, ""); - //// With version 1 all tells are active because windows information have "title based" ids and no "sID based". - //if ((ver == 1) && (pGC != NULL)) - // pGC->setActive(false); + // With version 1 all tells are active because windows information have "title based" ids and no "sID based". + if ((ver == 1) && (pGC != NULL)) + pGC->setActive(false); } } diff --git a/code/ryzom/server/src/input_output_service/chat_manager.cpp b/code/ryzom/server/src/input_output_service/chat_manager.cpp index a4765c300..50c58fce6 100644 --- a/code/ryzom/server/src/input_output_service/chat_manager.cpp +++ b/code/ryzom/server/src/input_output_service/chat_manager.cpp @@ -636,6 +636,18 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) { if (session->WriteRight) // player must have the right to speak in the channel { + // If universal channel check if player muted + if (session->getChan()->UniversalChannel) + { + if(_MutedUsers.find( eid ) != _MutedUsers.end()) + { + nldebug("IOSCM: chat The player %s:%x is muted", + TheDataset.getEntityId(sender).toString().c_str(), + sender.getIndex()); + return; + } + } + if (!session->getChan()->getDontBroadcastPlayerInputs()) { // add msg to the historic From 8d27acc654ede4a07e5b8c8cdcb86aca71f87e3b Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 6 Sep 2013 15:00:35 +0200 Subject: [PATCH 9/9] Changed: Minor changes --- code/nel/src/misc/sstring.cpp | 5 +--- .../client/client_config/display_dlg.cpp | 28 +++++++++---------- code/ryzom/tools/sheets_packer/stdpch.h | 2 -- 3 files changed, 15 insertions(+), 20 deletions(-) diff --git a/code/nel/src/misc/sstring.cpp b/code/nel/src/misc/sstring.cpp index 492a00db1..fe9332328 100644 --- a/code/nel/src/misc/sstring.cpp +++ b/code/nel/src/misc/sstring.cpp @@ -37,14 +37,13 @@ namespace NLMISC return token; } - uint i; + uint i, j; CSString result; // skip leading junk for (i=0;i #include -//#include - #ifdef NL_OS_WINDOWS #define NOMINMAX #include