mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-07-28 23:16:15 -04:00
cleanups
This commit is contained in:
@@ -3367,38 +3367,38 @@ void JNICALL ScriptMethodsObjectInfoNamespace::sendScriptVarsToProxies(JNIEnv *
|
||||
{
|
||||
PROFILER_AUTO_BLOCK_DEFINE("JNI::sendScriptVarsToProxies");
|
||||
|
||||
ServerObject * object = 0;
|
||||
if (obj != 0 && buffer != 0)
|
||||
{
|
||||
ServerObject *object = nullptr;
|
||||
if (JavaLibrary::getObject(obj, object) && object != nullptr)
|
||||
if (JavaLibrary::getObject(obj, object))
|
||||
{
|
||||
ProxyList proxyList(object->getExposedProxyList());
|
||||
ProxyList const &proxyList = object->getExposedProxyList();
|
||||
if (!proxyList.empty())
|
||||
{
|
||||
std::vector<int8> data;
|
||||
if (ScriptConversion::convert(buffer, data))
|
||||
std::vector<int8> data;
|
||||
if (ScriptConversion::convert(buffer, data))
|
||||
{
|
||||
if(data.size() > 0)
|
||||
{
|
||||
if(data.size() > 0)
|
||||
{
|
||||
WARNING(data.size() > 60000, ("JavaLibrary::sendScriptVarsToProxies: "
|
||||
"Packing scriptvars for object %s, packed data size = %d",
|
||||
|
||||
WARNING(data.size() > 60000, ("JavaLibrary::sendScriptVarsToProxies: "
|
||||
"Packing scriptvars for object %s, packed data size = %d",
|
||||
object->getNetworkId().getValueString().c_str(),
|
||||
static_cast<int>(data.size())));
|
||||
|
||||
uint32 const myProcessId = GameServer::getInstance().getProcessId();
|
||||
uint32 const authProcessId = object->getAuthServerProcessId();
|
||||
|
||||
ProxyList syncServers(proxyList);
|
||||
if (myProcessId != authProcessId)
|
||||
{
|
||||
proxyList.erase(myProcessId);
|
||||
proxyList.insert(authProcessId);
|
||||
syncServers.erase(myProcessId);
|
||||
syncServers.insert(authProcessId);
|
||||
}
|
||||
|
||||
ServerMessageForwarding::begin(std::vector<uint32>(proxyList.begin(), proxyList.end()));
|
||||
|
||||
ServerMessageForwarding::begin(std::vector<uint32>(syncServers.begin(), syncServers.end()));
|
||||
|
||||
SynchronizeScriptVarDeltasMessage const deltasMessage(object->getNetworkId(), data);
|
||||
|
||||
ServerMessageForwarding::send(deltasMessage);
|
||||
|
||||
ServerMessageForwarding::end();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user