more fixing and cleanup

This commit is contained in:
DarthArgus
2015-10-13 20:49:42 -05:00
parent 0775701e48
commit b61c932498
10 changed files with 13 additions and 117 deletions
@@ -421,7 +421,7 @@ void ConnectionServerConnection::onReceive(const Archive::ByteStream & message)
NetworkId targetId = message.getKickeeId();
std::string const & targetName = message.getKickeeName();
if(targetId.isValid() ||
!targetName.empty() && (ChatServer::getVoiceChatLoginInfoFromName(targetName, targetId)))
(!targetName.empty() && (ChatServer::getVoiceChatLoginInfoFromName(targetName, targetId))))
{
ChatServer::requestKickPlayerFromChannel(message.getRequester(), targetId, message.getChannelName());
}
@@ -3923,8 +3923,8 @@ void GameServer::run(void)
NetworkHandler::update();
}
if ( ServerWorld::isSpaceScene() && ConfigServerGame::getSpaceShouldSleep()
|| !ServerWorld::isSpaceScene() && ConfigServerGame::getGroundShouldSleep())
if ((ServerWorld::isSpaceScene() && ConfigServerGame::getSpaceShouldSleep())
|| (!ServerWorld::isSpaceScene() && ConfigServerGame::getGroundShouldSleep()))
{
PROFILER_AUTO_BLOCK_DEFINE("Os::sleep");
Os::sleep(1);
@@ -1814,8 +1814,6 @@ void CreatureObject::initializeFirstTimeObject()
void CreatureObject::onLoadedFromDatabase()
{
typedef const std::string * strptr;
if (isAuthoritative())
{
if (isPlayerControlled())
@@ -8545,8 +8543,6 @@ void CreatureObject::onCharacterMatchRetrieved(MatchMakingCharacterResult const
if (creatureController != NULL)
{
typedef std::pair<NetworkId, Unicode::String> Payload;
MessageQueueGenericValueType<MatchMakingCharacterResult> * const msg = new MessageQueueGenericValueType<MatchMakingCharacterResult>(results);
creatureController->appendMessage(static_cast<int>(CM_characterMatchRetrieved), 0.0f, msg, GameControllerMessageFlags::SEND | GameControllerMessageFlags::RELIABLE | GameControllerMessageFlags::DEST_AUTH_CLIENT);
@@ -4156,11 +4156,13 @@ void ServerObject::performCombatSpam (const MessageQueueCombatSpam & spamMsg, bo
if (sendToTarget && !sendToBystanders)
{
ServerObject * const target = safe_cast<ServerObject *>(NetworkIdManager::getObjectById(spamMsg.m_defender));
if (target)
if (target->getNetworkId() != spamMsg.m_attacker)
if (target) {
if (target->getNetworkId() != spamMsg.m_attacker) {
target->seeCombatSpam (spamMsg);
else
}
} else {
WARNING_STRICT_FATAL (!sendToSelf && !sendToBystanders, ("null target_obj in commandFuncCombatSpam, when sendToTarget was set true"));
}
}
if (sendToBystanders)
@@ -39,10 +39,6 @@ if(WIN32)
set(PLATFORM_SOURCES
win32/FirstServerUtility.cpp
)
else()
set(PLATFORM_SOURCES
linux/stlhack.cpp
)
endif()
include_directories(
@@ -1,23 +0,0 @@
//#include "FirstGame.h"
//#include <hash_map> //without this we get an internal compiler error
// This resolves a problem with stlport compiling under gcc 2.91 that ships with RedHat 6.2.
// Basically, the compiler has trouble instantiating an instance of _Stl_prime<bool> without it
// being explicitly defined. So we have to instantiate one.
// We should try removing this file when either we a) upgrade the compiler or b) upgrate the OS.
//#define __stl_num_primes 28
//#define __PRIME_LIST_BODY { \
// 53ul, 97ul, 193ul, 389ul, 769ul, \
// 1543ul, 3079ul, 6151ul, 12289ul, 24593ul, \
// 49157ul, 98317ul, 196613ul, 393241ul, 786433ul, \
// 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul, \
// 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul,\
// 1610612741ul, 3221225473ul, 4294967291ul \
//}
//
//template <> const size_t std::_Stl_prime<bool>::_M_list[__stl_num_primes] = __PRIME_LIST_BODY;
//
//#undef __stl_num_primes
//#undef __PRIME_LIST_BODY
//