mirror of
https://github.com/SWG-Source/src.git
synced 2026-08-03 03:16:01 -04:00
remove SOE deprecated code and files - leaving in the #if 0 blocks with TODO and other possible uses for later
This commit is contained in:
@@ -72,10 +72,6 @@ void TaskConnection::onConnectionOpened()
|
||||
void TaskConnection::onReceive(const Archive::ByteStream & message)
|
||||
{
|
||||
UNREF(message);
|
||||
#if 0
|
||||
Archive::ReadIterator r(message);
|
||||
GameNetworkMessage m(r);
|
||||
#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
@@ -46,32 +46,8 @@ TaskManagerSysInfo & TaskManagerSysInfo::operator = (const TaskManagerSysInfo &
|
||||
|
||||
const float TaskManagerSysInfo::getScore() const
|
||||
{
|
||||
#if 0
|
||||
//Temporariy remove this since it's not giving us good results
|
||||
FILE * avg = popen("uptime", "r");
|
||||
float a = 0.0f;
|
||||
if(avg)
|
||||
{
|
||||
std::string output;
|
||||
while(!feof(avg))
|
||||
{
|
||||
char buf[1024] = {"\0"};
|
||||
|
||||
fread(buf, sizeof(buf), 1, avg);
|
||||
output += buf;
|
||||
}
|
||||
char formatted[1024] = {"\0"};
|
||||
std::string load = output.substr(output.find("load average:"));
|
||||
sscanf(load.c_str(), "load average: %f", &a);
|
||||
pclose(avg);
|
||||
}
|
||||
return a;
|
||||
#else
|
||||
|
||||
float ret = static_cast<float>(TaskManager::getNumGameConnections());
|
||||
return ret;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
@@ -77,10 +77,6 @@ void MetricsServerConnection::onProcessKilled(const ProcessKilled & k)
|
||||
|
||||
void MetricsServerConnection::receive(const Archive::ByteStream & )
|
||||
{
|
||||
#if 0
|
||||
Archive::ReadIterator r(message);
|
||||
GameNetworkMessage m(r);
|
||||
#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
@@ -831,15 +831,6 @@ void TaskManager::update()
|
||||
lastTime = currentTime;
|
||||
}
|
||||
|
||||
#if 0
|
||||
instance().m_sysInfoSource->update();
|
||||
if (ms_doUpdate)
|
||||
{
|
||||
Locator::updateAllLoads();
|
||||
ms_doUpdate = false;
|
||||
}
|
||||
#endif//0
|
||||
|
||||
// get process status
|
||||
std::set<std::pair<std::string, unsigned long> >::iterator i;
|
||||
for(i = instance().m_localServers.begin(); i != instance().m_localServers.end();)
|
||||
|
||||
@@ -498,23 +498,6 @@ void DatabaseProcess::receiveMessage(const MessageDispatch::Emitter & source, co
|
||||
Loader::getInstance().checkVersionNumber(ConfigServerDatabase::getExpectedDBVersion(), ConfigServerDatabase::isCorrectDBVersionRequired());
|
||||
Loader::getInstance().loadClock();
|
||||
}
|
||||
else if(message.isType("LoadObjectMessage"))
|
||||
{
|
||||
#if 0
|
||||
Archive::ReadIterator ri = static_cast<const GameNetworkMessage &>(message).getByteStream().begin();
|
||||
LoadObjectMessage lom(ri);
|
||||
connectToGameServer(lom.getAddress().c_str(),lom.getPort(),lom.getProcess());
|
||||
#endif
|
||||
}
|
||||
else if (message.isType("LoadUniverseMessage"))
|
||||
{
|
||||
#if 0
|
||||
Archive::ReadIterator ri = static_cast<const GameNetworkMessage &>(message).getByteStream().begin();
|
||||
LoadUniverseMessage lom(ri);
|
||||
connectToGameServer(lom.getAddress().c_str(),lom.getPort(),lom.getProcess());
|
||||
#endif
|
||||
}
|
||||
|
||||
else if(message.isType("GameSetProcessId") || message.isType("GameGameServerConnect"))
|
||||
{
|
||||
GameServerConnection * g = const_cast<GameServerConnection *>(static_cast<const GameServerConnection *>(&source));
|
||||
|
||||
@@ -246,15 +246,6 @@ namespace CommoditiesMarketNamespace
|
||||
errorCode = ar_ITEM_EQUIPPED;
|
||||
}
|
||||
|
||||
#if 0
|
||||
const VolumeContainer *vol = ContainerInterface::getVolumeContainer(item);
|
||||
if (vol && vol->getCurrentVolume() > 0)
|
||||
{
|
||||
errorCode = ar_NOT_EMPTY;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if ((errorCode == ar_OK) && auctionContainer.isVendor() && !auctionContainer.isBazaarTerminal())
|
||||
{
|
||||
// check to make sure the vendor isn't restricted from accepting this item
|
||||
@@ -1772,67 +1763,9 @@ void CommoditiesMarket::auctionCreateImmediate(CreatureObject &owner, ServerObje
|
||||
|
||||
void CommoditiesMarket::auctionCreatePermanent(const std::string &, const ServerObject &, const ServerObject &, BidAmount , const Unicode::String &, bool )
|
||||
{
|
||||
if (!ConfigServerGame::getCommoditiesMarketEnabled())
|
||||
return;
|
||||
|
||||
DEBUG_WARNING(true, ("auctionCreatePermanent has been depricated and shouldn't be used. If you see this WARNING, add a line to catch cheaters in the command in CommandCppFuncs.cpp"));
|
||||
|
||||
return;
|
||||
|
||||
#if 0 //what the hell is this?
|
||||
|
||||
const NetworkId & itemId = item.getNetworkId();
|
||||
int flags = AUCTION_ALWAYS_PRESENT;
|
||||
if (premium)
|
||||
{
|
||||
flags |= AUCTION_PREMIUM_AUCTION;
|
||||
}
|
||||
const TangibleObject *tangibleObject = item.asTangibleObject();
|
||||
if (tangibleObject && tangibleObject->hasCondition(ServerTangibleObjectTemplate::C_magicItem))
|
||||
{
|
||||
flags |= AUCTION_MAGIC_ITEM;
|
||||
}
|
||||
|
||||
const Unicode::String objectName = Auction::getItemAuctionName(&item);
|
||||
|
||||
const AuctionToken & token = AuctionTokenServer::createTokenFor(item);
|
||||
Unicode::String oobData;
|
||||
OutOfBandPackager::pack(token, 0, oobData);
|
||||
|
||||
ServerObject::AttributeVector attributes;
|
||||
|
||||
//-- I don't know why this cast is necessary, but MSDEV is apparently confused otherwise
|
||||
static_cast<const ServerObject &>(item).getAttributes(NetworkId::cms_invalid, attributes);
|
||||
OutOfBandPackager::pack(attributes, 1, oobData);
|
||||
|
||||
OutOfBandPackager::pack(item.getTemplateName(), 2, oobData);
|
||||
|
||||
if (s_market)
|
||||
{
|
||||
s_market->AddImmediateAuction(
|
||||
-1,
|
||||
ownerName,
|
||||
price,
|
||||
1,
|
||||
itemId,
|
||||
objectName.size(), objectName.data(),
|
||||
item.getGameObjectType(),
|
||||
ConfigServerGame::getUnclaimedAuctionItemDestroyTimeSec(),
|
||||
auctionContainer.getNetworkId(),
|
||||
getLocationString(auctionContainer),
|
||||
flags,
|
||||
userDescription.size(), userDescription.data(),
|
||||
oobData.size(),
|
||||
oobData);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
DEBUG_WARNING(true, ("[Commodities API] : No commodities server connection to send AddImmediateAuction."));
|
||||
|
||||
getCommoditiesServerConnection(); //attempt to reconnect to commodities server
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
@@ -91,13 +91,6 @@ namespace PreloadManagerNameSpace
|
||||
if (tmp)
|
||||
line = tmp;
|
||||
|
||||
DataTable* dt = DataTableManager::getTable(line, true);
|
||||
#if 0
|
||||
if (dt)
|
||||
ms_dataTableList.push_back(dt);
|
||||
#else
|
||||
UNREF(dt);
|
||||
#endif
|
||||
DEBUG_REPORT_LOG(true, ("."));
|
||||
line = fgets(buf, 256, fp);
|
||||
}
|
||||
|
||||
@@ -549,16 +549,6 @@ void ServerBuildoutManagerNamespace::buildObjectsToSave(std::vector<ServerObject
|
||||
|
||||
bool ServerBuildoutManagerNamespace::isNotObjectForBuildout(ServerObject const *obj)
|
||||
{
|
||||
#if 0
|
||||
DEBUG_REPORT_LOG_PRINT( true, ( "isNotObjectForBuildout: %s [%d] ver=%d isPersisted=%d isPlayerController=%d includeInBuildout=%d\n" ,
|
||||
Unicode::wideToNarrow( obj->getObjectName() ).c_str(),
|
||||
(int)obj->getNetworkId().getValue(),
|
||||
obj->getCacheVersion(),
|
||||
obj->isPersisted(),
|
||||
obj->isPlayerControlled(),
|
||||
obj->getIncludeInBuildout() ) );
|
||||
#endif
|
||||
|
||||
const ServerObject * const containingObject = safe_cast<const ServerObject *>(ContainerInterface::getContainedByObject(*obj));
|
||||
|
||||
// make sure that cells that should be included in the buildout have all their
|
||||
@@ -750,12 +740,6 @@ void ServerBuildoutManagerNamespace::loadArea(AreaInfo &areaInfo)
|
||||
|
||||
FATAL( isPob && ( cellIndex != 0 || containerId != 0 ), ( "tried to add a pob to a cell or other container. %s (objId=%d cellIndex=%d containerId=%d)",
|
||||
serverTemplateBase->getName(), objId, cellIndex,containerId ) );
|
||||
#if 0
|
||||
DEBUG_REPORT_LOG_PRINT( true, ( "SERVER --------- objId=%016I64x container=%016I64x\n",
|
||||
objId,
|
||||
containerId));
|
||||
|
||||
#endif
|
||||
|
||||
Quaternion const q(
|
||||
areaBuildoutTable.getFloatValue(qwColumn, buildoutRow),
|
||||
|
||||
@@ -2524,18 +2524,6 @@ void ServerWorld::remove()
|
||||
delete m_sceneId;
|
||||
m_sceneId = 0;
|
||||
|
||||
#if 0 //removed pending objects
|
||||
ObjectMap::iterator objIter;
|
||||
while (m_pendingObjects->size() > 0)
|
||||
{
|
||||
objIter = m_pendingObjects->begin();
|
||||
object = (*objIter).second;
|
||||
m_pendingObjects->erase(objIter);
|
||||
delete object;
|
||||
}
|
||||
delete m_pendingObjects;
|
||||
m_pendingObjects = 0;
|
||||
#endif
|
||||
delete g_objectSphereTree;
|
||||
g_objectSphereTree = 0;
|
||||
delete g_triggerSphereTree;
|
||||
|
||||
@@ -2821,12 +2821,6 @@ float CreatureObject::alter(float time)
|
||||
}
|
||||
|
||||
//check timer and migrate stats if necessary
|
||||
|
||||
//disable self stat migration
|
||||
#if 0
|
||||
migrateStats(time);
|
||||
#endif
|
||||
|
||||
if (isPlayerControlled())
|
||||
{
|
||||
PROFILER_AUTO_BLOCK_DEFINE("CreatureObject::alter auth player stuff");
|
||||
|
||||
@@ -112,36 +112,12 @@ void GroupWaypointBuilderNamespace::updateGroupWaypoints(PlayerObject &playerObj
|
||||
|
||||
void GroupWaypointBuilder::updateGroupWaypoints(GroupObject const &groupObject)
|
||||
{
|
||||
#if 0
|
||||
PlayerObject::WaypointMap groupWaypoints;
|
||||
buildGroupWaypoints(groupObject, groupWaypoints);
|
||||
GroupWaypointBuilderNamespace::updateGroupWaypoints(groupObject, groupWaypoints);
|
||||
#endif
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void GroupWaypointBuilder::updateGroupWaypoints(PlayerObject &playerObject, bool const updateGroup)
|
||||
{
|
||||
#if 0
|
||||
CreatureObject const * const creatureObject = playerObject.getCreatureObject();
|
||||
if (creatureObject)
|
||||
{
|
||||
GroupObject const * const groupObject = creatureObject->getGroup();
|
||||
if (groupObject && updateGroup)
|
||||
{
|
||||
PlayerObject::WaypointMap groupWaypoints;
|
||||
buildGroupWaypoints(*groupObject, groupWaypoints);
|
||||
GroupWaypointBuilderNamespace::updateGroupWaypoints(*groupObject, groupWaypoints);
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayerObject::WaypointMap groupWaypoints;
|
||||
buildGroupWaypoints(playerObject, groupWaypoints);
|
||||
GroupWaypointBuilderNamespace::updateGroupWaypoints(playerObject, groupWaypoints);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
@@ -2411,13 +2411,6 @@ int ServerObject::getVolume(void) const
|
||||
{
|
||||
const VolumeContainmentProperty* volumeProperty = ContainerInterface::getVolumeContainmentProperty(*this);
|
||||
return volumeProperty ? volumeProperty->getVolume() : 1;
|
||||
#if 0
|
||||
const VolumeContainer * container = ContainerInterface::getVolumeContainer(*this);
|
||||
if (container)
|
||||
return m_volume.get()+container->getCurrentVolume();
|
||||
else
|
||||
return m_volume.get();
|
||||
#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
@@ -268,20 +268,6 @@ void ShipClientUpdateTracker::update(float elapsedTime) // static
|
||||
|
||||
static Archive::ByteStream bs;
|
||||
|
||||
#if 0
|
||||
GameClientMessage gcm(
|
||||
(*k).second,
|
||||
false,
|
||||
ShipUpdateTransformMessage(
|
||||
ship->getNetworkId(),
|
||||
controller->getTransform(),
|
||||
controller->getVelocity(),
|
||||
controller->getYawRate(),
|
||||
controller->getPitchRate(),
|
||||
controller->getRollRate(),
|
||||
(*j).first->getSyncStampLong()));
|
||||
gcm.pack(bs);
|
||||
#else
|
||||
static ConstCharCrcString const s_gcmname("GameClientMessage");
|
||||
static ConstCharCrcString const s_sutmname("ShipUpdateTransformMessage");
|
||||
static unsigned int const s_sutmByteStreamLength =
|
||||
@@ -313,7 +299,6 @@ void ShipClientUpdateTracker::update(float elapsedTime) // static
|
||||
PackedRotationRate const packedRollRate(controller->getRollRate());
|
||||
Archive::put(bs, packedRollRate);
|
||||
Archive::put(bs, (*j).first->getSyncStampLong());
|
||||
#endif
|
||||
|
||||
(*j).first->Connection::send(bs, false);
|
||||
bs.clear();
|
||||
|
||||
@@ -733,63 +733,6 @@ void ServerSecureTrade::removeItem(const CreatureObject & trader, const ServerOb
|
||||
//-- CS requested that removing an item cancels the trade to prevent scamming
|
||||
UNREF (item);
|
||||
cancelTrade (trader);
|
||||
|
||||
#if 0
|
||||
if (m_tradeState != TS_Trading)
|
||||
{
|
||||
DEBUG_REPORT_LOG(true, ("Secure Trade: received an remove item in non-trade state\n"));
|
||||
beginTrading();
|
||||
}
|
||||
|
||||
if (&trader == m_initiator)
|
||||
{
|
||||
std::vector<ServerObject *>::iterator i = std::find(m_initiatorContents->begin(), m_initiatorContents->end(), &item);
|
||||
if (i != m_initiatorContents->end())
|
||||
{
|
||||
m_initiatorContents->erase(i);
|
||||
|
||||
Client * const recipientClient = m_recipient->getClient();
|
||||
if (recipientClient)
|
||||
{
|
||||
RemoveItemMessage const m(item.getNetworkId());
|
||||
recipientClient->send(m, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//@todo need an error message
|
||||
}
|
||||
|
||||
}
|
||||
else if (& trader == m_recipient)
|
||||
{
|
||||
std::vector<ServerObject *>::iterator i = std::find(m_recipientContents->begin(), m_recipientContents->end(), &item);
|
||||
if (i != m_recipientContents->end())
|
||||
{
|
||||
m_recipientContents->erase(i);
|
||||
|
||||
Client * const initiatorClient = m_initiator->getClient();
|
||||
if (initiatorClient)
|
||||
{
|
||||
RemoveItemMessage const m(item.getNetworkId());
|
||||
initiatorClient->send(m, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//@todo need an error message for not found.
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
WARNING_STRICT_FATAL(true, ("Secure Trade: received a remove Item from non participant\n"));
|
||||
return;
|
||||
}
|
||||
unacceptOffer(*m_initiator);
|
||||
unacceptOffer(*m_recipient);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
@@ -42,23 +42,7 @@ KeyServer::~KeyServer()
|
||||
|
||||
bool KeyServer::update(void)
|
||||
{
|
||||
bool result = false;
|
||||
#if 0 // disable key rotation
|
||||
lastUpdateTime += Clock::frameTime();
|
||||
if(lastUpdateTime > updateRate)
|
||||
{
|
||||
lastUpdateTime = CONST_REAL(0.0);
|
||||
KeyShare::Key k;
|
||||
for(unsigned int j = 0; j < KeyShareConstants::keyLength; j ++)
|
||||
{
|
||||
k.value[j] = static_cast<unsigned char>(randomNumberGenerator->random(255));
|
||||
}
|
||||
pushKey(k);
|
||||
result = true;
|
||||
}
|
||||
#endif // disable key rotation
|
||||
|
||||
return result;
|
||||
return false;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
@@ -4705,20 +4705,6 @@ int JavaLibrary::runScript(const NetworkId & caller, const std::string& script,
|
||||
}
|
||||
}
|
||||
break;
|
||||
#if 0
|
||||
case 'S':
|
||||
{
|
||||
arg = globals.getNextStringId();
|
||||
if (arg == 0)
|
||||
{
|
||||
return SCRIPT_OVERRIDE;
|
||||
}
|
||||
// @todo: fix this when we get real string ids
|
||||
// int param = atoi(stringArg);
|
||||
// ms_env->SetIntField(arg, ms_fidStringIdData, static_cast<jint>(param));
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
DEBUG_REPORT_LOG(true, ("unknown parameter type %c(%#x)\n", argList[i],
|
||||
static_cast<unsigned>(argList[i]))); //lint !e571 suspicious cast
|
||||
|
||||
@@ -181,29 +181,6 @@ jstring JNICALL ScriptMethodsChatNamespace::chatPackOutOfBandToken(JNIEnv * env,
|
||||
|
||||
JavaString result("JavaLibrary::chatPackOutOfBandToken - FAILED Token archive not implemented");
|
||||
return result.getReturnValue();
|
||||
|
||||
#if 0
|
||||
JavaStringParam jt(target);
|
||||
Unicode::String t;
|
||||
if(! JavaLibrary::convert(jt, t))
|
||||
return 0;
|
||||
|
||||
if(! source)
|
||||
return 0;
|
||||
|
||||
Token * token = 0;
|
||||
if(!JavaLibrary::getObject(source, token))
|
||||
return 0;
|
||||
|
||||
Archive::ByteStream bs;
|
||||
Archive::put(bs, std::string(token->getObjectTemplateName()));
|
||||
Archive::put(bs, *token);
|
||||
|
||||
OutOfBandPackager::pack(bs, gs_Object, position, t);
|
||||
|
||||
JavaString result(t);
|
||||
return result.getReturnValue();
|
||||
#endif
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user