Eliminate region archive passing
parent
6236d24d14
commit
bcce66ad1f
|
@ -166,17 +166,6 @@ namespace OpenSim.Region.Examples.RegionSyncModule
|
|||
m_scene.Heightmap.LoadFromXmlString(Encoding.ASCII.GetString(msg.Data));
|
||||
return HandlerSuccess(msg, "Syncrhonized terrain");
|
||||
}
|
||||
case RegionSyncMessage.MsgType.RegionArchive:
|
||||
{
|
||||
IRegionArchiverModule archiver = m_scene.RequestModuleInterface<IRegionArchiverModule>();
|
||||
if (archiver == null)
|
||||
{
|
||||
return HandlerFailure(msg, "Could not retrieve archiver module.");
|
||||
}
|
||||
MemoryStream ms = new MemoryStream(msg.Data);
|
||||
archiver.DearchiveRegion(ms);
|
||||
return HandlerSuccess(msg,"Synchronized region");
|
||||
}
|
||||
case RegionSyncMessage.MsgType.AddObject:
|
||||
case RegionSyncMessage.MsgType.UpdateObject:
|
||||
{
|
||||
|
@ -201,7 +190,7 @@ namespace OpenSim.Region.Examples.RegionSyncModule
|
|||
Vector3 vel = data["vel"].AsVector3();
|
||||
Quaternion rot = data["rot"].AsQuaternion();
|
||||
|
||||
// We get the UUID of the object to be deleted, find it in the scene
|
||||
// We get the UUID of the avatar to be updated, find it in the scene
|
||||
if (agentID != UUID.Zero)
|
||||
{
|
||||
ScenePresence presence = m_scene.GetScenePresence(agentID);
|
||||
|
@ -313,7 +302,6 @@ namespace OpenSim.Region.Examples.RegionSyncModule
|
|||
m_scene.DeleteAllSceneObjects();
|
||||
Send(new RegionSyncMessage(RegionSyncMessage.MsgType.GetTerrain));
|
||||
Send(new RegionSyncMessage(RegionSyncMessage.MsgType.GetObjects));
|
||||
//Send(new RegionSyncMessage(RegionSyncMessage.MsgType.GetRegionArchive));
|
||||
// Register for events which will be forwarded to authoritative scene
|
||||
m_scene.EventManager.OnNewClient += EventManager_OnNewClient;
|
||||
}
|
||||
|
|
|
@ -140,28 +140,6 @@ namespace OpenSim.Region.Examples.RegionSyncModule
|
|||
Send(new RegionSyncMessage(RegionSyncMessage.MsgType.Terrain, m_scene.Heightmap.SaveToXmlString()));
|
||||
return HandlerSuccess(msg, "Terrain sent");
|
||||
}
|
||||
case RegionSyncMessage.MsgType.GetRegionArchive:
|
||||
{
|
||||
IRegionArchiverModule archiver = m_scene.RequestModuleInterface<IRegionArchiverModule>();
|
||||
if (archiver == null)
|
||||
{
|
||||
return HandlerFailure(msg, "Could not retrieve archiver module from scene");
|
||||
}
|
||||
MemoryStream ms = new MemoryStream();
|
||||
// Remember the last time we archived this region to the ClientSyncServer
|
||||
// Any updates after this time cannot be assumed to be in the archive stream
|
||||
m_archive_time = DateTime.Now.Ticks;
|
||||
archiver.ArchiveRegion(ms, Guid.Empty);
|
||||
// ***
|
||||
// The call to ArchiveRegion is asynchronous. We need a better way to know when it's done.
|
||||
// For now, just sleep for 1 second. That will support a vary large region to be archived.
|
||||
// Since this command is typically only executed when a new RegionSyncClient connects and
|
||||
// is done on a RegionSyncServer thread, it should not impact other RegionSyncClients the
|
||||
// RegionSyncServer, or the sim.
|
||||
Thread.Sleep(1000);
|
||||
Send(new RegionSyncMessage(RegionSyncMessage.MsgType.RegionArchive, ms.ToArray()));
|
||||
return HandlerSuccess(msg, "Region archive sent");
|
||||
}
|
||||
case RegionSyncMessage.MsgType.AgentAdd:
|
||||
{
|
||||
OSDMap data = OSDParser.DeserializeJson(Encoding.ASCII.GetString(msg.Data)) as OSDMap;
|
||||
|
|
|
@ -20,17 +20,17 @@ namespace OpenSim.Region.Examples.RegionSyncModule
|
|||
AgentAdd,
|
||||
AgentUpdate,
|
||||
GetTerrain,
|
||||
GetRegionArchive,
|
||||
GetObjects,
|
||||
GetObject,
|
||||
SubscribeObjects,
|
||||
GetAvatars,
|
||||
SubscribeAvatars,
|
||||
ChatFromClient,
|
||||
// SIM -> CM
|
||||
Terrain,
|
||||
RegionArchive,
|
||||
AddObject,
|
||||
UpdateObject,
|
||||
RemoveObject,
|
||||
AddAvatar,
|
||||
AddAvatarResponse,
|
||||
UpdateAvatarTerse,
|
||||
RemoveAvatar,
|
||||
ChatFromSim,
|
||||
|
|
Loading…
Reference in New Issue