diff --git a/code/ryzom/server/src/admin_modules/aes_module.cpp b/code/ryzom/server/src/admin_modules/aes_module.cpp index 93fbcae32..c1268cf29 100644 --- a/code/ryzom/server/src/admin_modules/aes_module.cpp +++ b/code/ryzom/server/src/admin_modules/aes_module.cpp @@ -1418,16 +1418,7 @@ retry_pending_command_loop: } // add redirection -#ifdef NL_OS_UNIX - string logFile = "/tmp/aes_command_output.log"; -#else - char *tempDir = getenv("TEMP"); - if (tempDir == NULL) - tempDir = getenv("TMP"); - if (tempDir == NULL) - tempDir = "."; - string logFile = string(tempDir)+"\\aes_command_output.log"; -#endif + string logFile = CPath::getTemporaryDirectory() + "aes_command_output.log"; cmdLine += " > "+logFile; diff --git a/code/ryzom/server/src/ai_service/ai_entity_physical.h b/code/ryzom/server/src/ai_service/ai_entity_physical.h index 340568656..c66a1c53a 100644 --- a/code/ryzom/server/src/ai_service/ai_entity_physical.h +++ b/code/ryzom/server/src/ai_service/ai_entity_physical.h @@ -305,7 +305,7 @@ public: //@{ virtual void addHealer(IAIEntityPhysicalHealer* healer) { _Healers.insert(healer); if (healer) healer->healerAdded(this); } virtual void delHealer(IAIEntityPhysicalHealer* healer) { _Healers.erase(healer); if (healer) healer->healerRemoved(this); } - virtual int getHealerCount() { return (int)_Healers.size(); } + virtual sint getHealerCount() { return (sint)_Healers.size(); } //@} static int _PlayerVisibilityDistance; diff --git a/code/ryzom/server/src/ai_service/commands.cpp b/code/ryzom/server/src/ai_service/commands.cpp index 024f70d7b..f3317e68f 100644 --- a/code/ryzom/server/src/ai_service/commands.cpp +++ b/code/ryzom/server/src/ai_service/commands.cpp @@ -2894,8 +2894,8 @@ NLMISC_COMMAND(unloadPrimitiveFile,"unload a primitive file","") static int const MULTI_LINE_FORMATER_maxn = 78; void MULTI_LINE_FORMATER::pushTitle(std::vector& container, std::string const& text) { - int const maxn = MULTI_LINE_FORMATER_maxn; - int n = maxn - (int)text.length() - 4; + const sint maxn = MULTI_LINE_FORMATER_maxn; + sint n = maxn - (sint)text.length() - 4; container.push_back(" _/"); container.back() += text; container.back() += "\\" + std::string(n, '_'); @@ -3030,7 +3030,7 @@ NLMISC_COMMAND(simulateBug, "simulate an old AIS bug; command is one of 'list', initBugSimulations(); if (args[1]=="all") { - for (int i=0; isend("AIS",msgout); - - } void CAiWrapperServer::setHPLevel(NLMISC::CEntityId entityId, uint32 alias, float hp) @@ -252,10 +244,8 @@ void CAiWrapperServer::setHPLevel(NLMISC::CEntityId entityId, uint32 alias, floa uint32 nbString=2; std::string eid = entityId.toString(); - std::string hpstr = NLMISC::toString("()setBotHPScaleByAlias(%f, \"%s\");", hp, aliasToString(alias).c_str()); - //CMessage msgout("EVENT_NPC_GROUP_SCRIPT"); CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID"); msgout.serial(messageVersion); @@ -264,9 +254,6 @@ void CAiWrapperServer::setHPLevel(NLMISC::CEntityId entityId, uint32 alias, floa msgout.serial(hpstr); CUnifiedNetwork::getInstance()->send("AIS",msgout); - - - } @@ -378,7 +365,6 @@ void CAiWrapperServer::setPioneerRight(NLMISC::CEntityId entityId, const R2::TPi msgout.serial(command); CUnifiedNetwork::getInstance()->send("EGS",msgout); } - } else if (right == R2::TPioneerRight::Tester) { @@ -400,7 +386,6 @@ void CAiWrapperServer::setPioneerRight(NLMISC::CEntityId entityId, const R2::TPi msgout.serial(command); CUnifiedNetwork::getInstance()->send("EGS",msgout); } - } else { diff --git a/code/ryzom/server/src/ai_share/primitive_parser.cpp b/code/ryzom/server/src/ai_share/primitive_parser.cpp index 1e5175c7a..caa38e3b5 100644 --- a/code/ryzom/server/src/ai_share/primitive_parser.cpp +++ b/code/ryzom/server/src/ai_share/primitive_parser.cpp @@ -3333,6 +3333,8 @@ static void parsePrimOutpost(const IPrimitive *prim, const std::string &mapName, case AITypeManager: parsePrimMgr(child, mapName, filename); break; + default: + break; } } } diff --git a/code/ryzom/server/src/entities_game_service/entity_manager/entity_callbacks.cpp b/code/ryzom/server/src/entities_game_service/entity_manager/entity_callbacks.cpp index 4be66250c..c64d84c98 100644 --- a/code/ryzom/server/src/entities_game_service/entity_manager/entity_callbacks.cpp +++ b/code/ryzom/server/src/entities_game_service/entity_manager/entity_callbacks.cpp @@ -497,7 +497,6 @@ void cbClientReady( CMessage& msgin, const std::string &serviceName, NLNET::TSer { c->setWhoSeesMe(UINT64_CONSTANT(0xffffffffffffffff)); } - } if (!IsRingShard && player->havePriv(AlwaysInvisiblePriv)) @@ -1030,7 +1029,6 @@ CreationFailed: return; } - void cbCreateChar_part2(uint32 userId, const CCreateCharMsg &createCharMsg, bool ok) { TLogNoContext_Character noContextCharacter; @@ -1254,7 +1252,6 @@ void sendCharactersSummary( CPlayer *player, bool AllAutorized, uint32 bitfieldO } } - // Build the message CBitMemStream bms; if( chars.size() > 0 ) @@ -1526,8 +1523,6 @@ void cbClientTpAck( NLNET::CMessage& msgin, const std::string &serviceName, NLNE ch->setWhoSeesMe( IsRingShard? R2_VISION::buildWhoSeesMe(R2_VISION::WHOSEESME_VISIBLE_PLAYER,true): UINT64_CONSTANT(0xffffffffffffffff) ); } } - - } @@ -2520,7 +2515,6 @@ void cbItemSwap( NLNET::CMessage& msgin, const std::string &serviceName, NLNET:: { H_AUTO(cbItemSwap); - CEntityId charId; uint16 slotSrc, slotDst, quantity; INVENTORIES::TInventory inventorySrc, inventoryDst; diff --git a/code/ryzom/server/src/entities_game_service/guild_manager/guild_manager.cpp b/code/ryzom/server/src/entities_game_service/guild_manager/guild_manager.cpp index 12f702f58..b62d6a8b4 100644 --- a/code/ryzom/server/src/entities_game_service/guild_manager/guild_manager.cpp +++ b/code/ryzom/server/src/entities_game_service/guild_manager/guild_manager.cpp @@ -167,7 +167,6 @@ void CGuildManager::release() #ifndef USE_PDS if(_Instance->_Container) { - for ( map::iterator it = _Instance->_Container->getGuildsBegin(); it != _Instance->_Container->getGuildsEnd();++it ) { CGuild * guild = EGS_PD_CAST( (*it).second ); @@ -333,7 +332,6 @@ void CGuildManager::saveGuild( CGuild* guild ) } else { - string fileName = NLMISC::toString("guilds/guild_%05u.bin", id & 0x000fffff); if( UseBS ) { @@ -935,7 +933,6 @@ void CGuildManager::deleteGuild(uint32 id) // } // else // _FreeGuildIds.insert(id); - } //---------------------------------------------------------------------------- @@ -992,7 +989,6 @@ void CGuildManager::characterDeleted( CCharacter & user ) } } - // if the guild is still valid, set the successor as leader if ( successor ) { @@ -1669,7 +1665,6 @@ restartMemberLoop: // A character connect/disconnect on another shard, update the online tags void CGuildManager::characterConnectionEvent(const NLMISC::CEntityId &eid, bool online) { - // iterate over all guild, for each look the member list and update online state if it is the concerned character if (_Container == NULL) diff --git a/code/ryzom/server/src/entities_game_service/player_manager/character_inventory_manipulation.cpp b/code/ryzom/server/src/entities_game_service/player_manager/character_inventory_manipulation.cpp index 364502a71..d60f0e372 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/character_inventory_manipulation.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/character_inventory_manipulation.cpp @@ -1243,8 +1243,8 @@ bool CCharacter::checkItemValidityWithEquipmentSlot( const CSheetId& sheet, uint //---------------------------------------------------------------------------- bool CCharacter::checkRightLeftHandCompatibility( const std::vector itemRight, const std::vector itemLeft ) { - const int itemRightSlotSize = (int)itemRight.size(); - const int itemLeftSlotSize = (int)itemLeft.size(); + const sint itemRightSlotSize = (sint)itemRight.size(); + const sint itemLeftSlotSize = (sint)itemLeft.size(); for( int i = 0; i < itemRightSlotSize; ++i ) { @@ -1265,8 +1265,8 @@ bool CCharacter::checkRightLeftHandCompatibility( const std::vector //---------------------------------------------------------------------------- bool CCharacter::checkIfItemCompatibleWithSlots( const std::vector itemSlot, std::vector< uint16 > slots ) { - const int itemSlotSize = (int)itemSlot.size(); - const int typeSlotSize = (int)slots.size(); + const sint itemSlotSize = (sint)itemSlot.size(); + const sint typeSlotSize = (sint)slots.size(); for( int i = 0; i < itemSlotSize; ++i ) { for( int j = 0; j < typeSlotSize; ++j )