aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorUbitUmarov2019-04-02 15:10:42 +0100
committerUbitUmarov2019-04-02 15:10:42 +0100
commit8152e47a4a3a460590825e9475599075c9e31e9d (patch)
treeaaad76e5223a58d79ee006caf92b9a348f8c22f7 /OpenSim/Region/Framework/Scenes
parentadd extra delay before sending initial data (diff)
downloadopensim-SC-8152e47a4a3a460590825e9475599075c9e31e9d.zip
opensim-SC-8152e47a4a3a460590825e9475599075c9e31e9d.tar.gz
opensim-SC-8152e47a4a3a460590825e9475599075c9e31e9d.tar.bz2
opensim-SC-8152e47a4a3a460590825e9475599075c9e31e9d.tar.xz
change the point where child regions are closed/opened
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs160
1 files changed, 83 insertions, 77 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 8c46211..12887fb 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2168,6 +2168,7 @@ namespace OpenSim.Region.Framework.Scenes
2168 m_inTransit = false; 2168 m_inTransit = false;
2169 2169
2170 // Tell the client that we're ready to send rest 2170 // Tell the client that we're ready to send rest
2171 m_gotRegionHandShake = false; // allow it
2171 ControllingClient.SendRegionHandshake(); 2172 ControllingClient.SendRegionHandshake();
2172 2173
2173 ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look); 2174 ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look);
@@ -2299,54 +2300,6 @@ namespace OpenSim.Region.Framework.Scenes
2299 2300
2300 if (!IsNPC) 2301 if (!IsNPC)
2301 { 2302 {
2302 if (!string.IsNullOrEmpty(m_callbackURI))
2303 {
2304 m_log.DebugFormat(
2305 "[SCENE PRESENCE]: Releasing {0} {1} with old callback to {2}",
2306 client.Name, client.AgentId, m_callbackURI);
2307
2308 UUID originID;
2309
2310 lock (m_originRegionIDAccessLock)
2311 originID = m_originRegionID;
2312
2313 Scene.SimulationService.ReleaseAgent(originID, UUID, m_callbackURI);
2314 m_callbackURI = null;
2315 //m_log.DebugFormat("[CompleteMovement] ReleaseAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts));
2316 }
2317 else if (!string.IsNullOrEmpty(m_newCallbackURI))
2318 {
2319 m_log.DebugFormat(
2320 "[SCENE PRESENCE]: Releasing {0} {1} with callback to {2}",
2321 client.Name, client.AgentId, m_newCallbackURI);
2322
2323 UUID originID;
2324
2325 lock (m_originRegionIDAccessLock)
2326 originID = m_originRegionID;
2327
2328 Scene.SimulationService.ReleaseAgent(originID, UUID, m_newCallbackURI);
2329 m_newCallbackURI = null;
2330 //m_log.DebugFormat("[CompleteMovement] ReleaseAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts));
2331 }
2332
2333 if (openChildAgents)
2334 {
2335 // Create child agents in neighbouring regions
2336 IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();
2337 if (m_agentTransfer != null)
2338 {
2339 m_agentTransfer.EnableChildAgents(this);
2340 }
2341 }
2342
2343 m_lastChildUpdatesTime = Util.EnvironmentTickCount() + 10000;
2344 m_lastChildAgentUpdatePosition = AbsolutePosition;
2345 m_lastChildAgentUpdateDrawDistance = DrawDistance;
2346
2347 m_lastChildAgentUpdateGodLevel = GodController.ViwerUIGodLevel;
2348 m_childUpdatesBusy = false; // allow them
2349
2350 // send the rest of the world 2303 // send the rest of the world
2351 if (m_teleportFlags > 0 || m_currentParcelHide) 2304 if (m_teleportFlags > 0 || m_currentParcelHide)
2352 //SendInitialDataToMe(); 2305 //SendInitialDataToMe();
@@ -4029,8 +3982,61 @@ namespace OpenSim.Region.Framework.Scenes
4029 3982
4030 bool selfappearance = (flags & 4) != 0; 3983 bool selfappearance = (flags & 4) != 0;
4031 3984
3985 // this should enqueued on the client processing job to save threads
4032 Util.FireAndForget(delegate 3986 Util.FireAndForget(delegate
4033 { 3987 {
3988 if(!IsChildAgent)
3989 {
3990 // close v1 sender region obsolete
3991 if (!string.IsNullOrEmpty(m_callbackURI))
3992 {
3993 m_log.DebugFormat(
3994 "[SCENE PRESENCE({0})]: Releasing {1} {2} with old callback to {3}",
3995 Scene.RegionInfo.RegionName, Name, UUID, m_callbackURI);
3996
3997 UUID originID;
3998
3999 lock (m_originRegionIDAccessLock)
4000 originID = m_originRegionID;
4001
4002 Scene.SimulationService.ReleaseAgent(originID, UUID, m_callbackURI);
4003 m_callbackURI = null;
4004 NeedInitialData = 4;
4005 return;
4006 }
4007 // v0.7 close HG sender region
4008 if (!string.IsNullOrEmpty(m_newCallbackURI))
4009 {
4010 m_log.DebugFormat(
4011 "[SCENE PRESENCE({0})]: Releasing {1} {2} with callback to {3}",
4012 Scene.RegionInfo.RegionName, Name, UUID, m_newCallbackURI);
4013
4014 UUID originID;
4015
4016 lock (m_originRegionIDAccessLock)
4017 originID = m_originRegionID;
4018
4019 Scene.SimulationService.ReleaseAgent(originID, UUID, m_newCallbackURI);
4020 m_newCallbackURI = null;
4021 NeedInitialData = 4;
4022 return;
4023 }
4024
4025 // Create child agents in neighbouring regions
4026 IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();
4027 if (m_agentTransfer != null)
4028 {
4029 m_agentTransfer.EnableChildAgents(this);
4030 }
4031
4032 m_lastChildUpdatesTime = Util.EnvironmentTickCount() + 10000;
4033 m_lastChildAgentUpdatePosition = AbsolutePosition;
4034 m_lastChildAgentUpdateDrawDistance = DrawDistance;
4035
4036 m_lastChildAgentUpdateGodLevel = GodController.ViwerUIGodLevel;
4037 m_childUpdatesBusy = false; // allow them
4038 }
4039
4034 m_log.DebugFormat("[SCENE PRESENCE({0})]: SendInitialData for {1}", Scene.RegionInfo.RegionName, UUID); 4040 m_log.DebugFormat("[SCENE PRESENCE({0})]: SendInitialData for {1}", Scene.RegionInfo.RegionName, UUID);
4035 if (m_teleportFlags <= 0) 4041 if (m_teleportFlags <= 0)
4036 { 4042 {
@@ -4052,46 +4058,46 @@ namespace OpenSim.Region.Framework.Scenes
4052 ControllingClient.ReprioritizeUpdates(); 4058 ControllingClient.ReprioritizeUpdates();
4053 m_reprioritizationLastTime = Util.EnvironmentTickCount(); 4059 m_reprioritizationLastTime = Util.EnvironmentTickCount();
4054 m_reprioritizationBusy = false; 4060 m_reprioritizationBusy = false;
4055 return;
4056 } 4061 }
4057
4058 bool cacheCulling = (flags & 1) != 0;
4059 bool cacheEmpty;
4060 if (cacheCulling)
4061 cacheEmpty = (flags & 2) != 0;
4062 else 4062 else
4063 cacheEmpty = true;
4064
4065 EntityBase[] entities = Scene.Entities.GetEntities();
4066 if(cacheEmpty)
4067 { 4063 {
4068 foreach (EntityBase e in entities) 4064 bool cacheCulling = (flags & 1) != 0;
4065 bool cacheEmpty;
4066 if (cacheCulling)
4067 cacheEmpty = (flags & 2) != 0;
4068 else
4069 cacheEmpty = true;
4070
4071 EntityBase[] entities = Scene.Entities.GetEntities();
4072 if(cacheEmpty)
4069 { 4073 {
4070 if (e != null && e is SceneObjectGroup && !((SceneObjectGroup)e).IsAttachment) 4074 foreach (EntityBase e in entities)
4071 ((SceneObjectGroup)e).SendFullAnimUpdateToClient(ControllingClient); 4075 {
4076 if (e != null && e is SceneObjectGroup && !((SceneObjectGroup)e).IsAttachment)
4077 ((SceneObjectGroup)e).SendFullAnimUpdateToClient(ControllingClient);
4078 }
4072 } 4079 }
4073 } 4080 else
4074 else
4075 {
4076 foreach (EntityBase e in entities)
4077 { 4081 {
4078 if (e != null && e is SceneObjectGroup && !((SceneObjectGroup)e).IsAttachment) 4082 foreach (EntityBase e in entities)
4079 { 4083 {
4080 SceneObjectGroup grp = e as SceneObjectGroup; 4084 if (e != null && e is SceneObjectGroup && !((SceneObjectGroup)e).IsAttachment)
4081 if(grp.IsViewerCachable) 4085 {
4082 grp.SendUpdateProbes(ControllingClient); 4086 SceneObjectGroup grp = e as SceneObjectGroup;
4083 else 4087 if(grp.IsViewerCachable)
4084 grp.SendFullAnimUpdateToClient(ControllingClient); 4088 grp.SendUpdateProbes(ControllingClient);
4089 else
4090 grp.SendFullAnimUpdateToClient(ControllingClient);
4091 }
4085 } 4092 }
4086 } 4093 }
4087 }
4088
4089 m_reprioritizationLastPosition = AbsolutePosition;
4090 m_reprioritizationLastDrawDistance = DrawDistance;
4091 m_reprioritizationLastTime = Util.EnvironmentTickCount() + 15000; // delay it
4092 4094
4093 m_reprioritizationBusy = false; 4095 m_reprioritizationLastPosition = AbsolutePosition;
4096 m_reprioritizationLastDrawDistance = DrawDistance;
4097 m_reprioritizationLastTime = Util.EnvironmentTickCount() + 15000; // delay it
4094 4098
4099 m_reprioritizationBusy = false;
4100 }
4095 }); 4101 });
4096 4102
4097 } 4103 }