diff options
author | UbitUmarov | 2016-11-19 15:45:41 +0000 |
---|---|---|
committer | UbitUmarov | 2016-11-19 15:45:41 +0000 |
commit | 7cb3d583a97ac36f0c2ef5d6eadae28f26378fc4 (patch) | |
tree | a2ab69bce5eda122b119da082625449f92b4c3d3 /OpenSim/Region/Framework | |
parent | Merge branch 'master' into httptests (diff) | |
parent | REST console v2. This is an incompatible protocol change. It degrades gracefu... (diff) | |
download | opensim-SC-7cb3d583a97ac36f0c2ef5d6eadae28f26378fc4.zip opensim-SC-7cb3d583a97ac36f0c2ef5d6eadae28f26378fc4.tar.gz opensim-SC-7cb3d583a97ac36f0c2ef5d6eadae28f26378fc4.tar.bz2 opensim-SC-7cb3d583a97ac36f0c2ef5d6eadae28f26378fc4.tar.xz |
merge conflits
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/IUserAccountCacheModule.cs | 2 | ||||
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/Scene.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 62 |
3 files changed, 53 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IUserAccountCacheModule.cs b/OpenSim/Region/Framework/Interfaces/IUserAccountCacheModule.cs index ed26989..027a7e2 100644 --- a/OpenSim/Region/Framework/Interfaces/IUserAccountCacheModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IUserAccountCacheModule.cs | |||
@@ -26,8 +26,10 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using OpenSim.Region.Framework.Scenes; | 28 | using OpenSim.Region.Framework.Scenes; |
29 | using OpenMetaverse; | ||
29 | 30 | ||
30 | public interface IUserAccountCacheModule | 31 | public interface IUserAccountCacheModule |
31 | { | 32 | { |
32 | void Remove(string name); | 33 | void Remove(string name); |
34 | void Remove(UUID id); | ||
33 | } | 35 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ca32940..c349369 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -4141,7 +4141,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4141 | { | 4141 | { |
4142 | IUserAccountCacheModule cache = RequestModuleInterface<IUserAccountCacheModule>(); | 4142 | IUserAccountCacheModule cache = RequestModuleInterface<IUserAccountCacheModule>(); |
4143 | if (cache != null) | 4143 | if (cache != null) |
4144 | cache.Remove(acd.firstname + " " + acd.lastname); | 4144 | // cache.Remove(acd.firstname + " " + acd.lastname); |
4145 | cache.Remove(acd.AgentID); | ||
4145 | 4146 | ||
4146 | // Remove any preexisting circuit - we don't want duplicates | 4147 | // Remove any preexisting circuit - we don't want duplicates |
4147 | // This is a stab at preventing avatar "ghosting" | 4148 | // This is a stab at preventing avatar "ghosting" |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 3378ead..2cfdd94 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1104,7 +1104,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1104 | 1104 | ||
1105 | AdjustKnownSeeds(); | 1105 | AdjustKnownSeeds(); |
1106 | 1106 | ||
1107 | RegisterToEvents(); | 1107 | RegisterToClientEvents(); |
1108 | SetDirectionVectors(); | 1108 | SetDirectionVectors(); |
1109 | 1109 | ||
1110 | Appearance = appearance; | 1110 | Appearance = appearance; |
@@ -1171,7 +1171,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1171 | } | 1171 | } |
1172 | } | 1172 | } |
1173 | 1173 | ||
1174 | public void RegisterToEvents() | 1174 | public void RegisterToClientEvents() |
1175 | { | 1175 | { |
1176 | ControllingClient.OnCompleteMovementToRegion += CompleteMovement; | 1176 | ControllingClient.OnCompleteMovementToRegion += CompleteMovement; |
1177 | ControllingClient.OnAgentUpdate += HandleAgentUpdate; | 1177 | ControllingClient.OnAgentUpdate += HandleAgentUpdate; |
@@ -1189,6 +1189,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
1189 | // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); | 1189 | // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); |
1190 | // ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); | 1190 | // ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); |
1191 | } | 1191 | } |
1192 | |||
1193 | public void RemoveClientEvents() | ||
1194 | { | ||
1195 | ControllingClient.OnCompleteMovementToRegion -= CompleteMovement; | ||
1196 | ControllingClient.OnAgentUpdate -= HandleAgentUpdate; | ||
1197 | ControllingClient.OnAgentCameraUpdate -= HandleAgentCamerasUpdate; | ||
1198 | ControllingClient.OnAgentRequestSit -= HandleAgentRequestSit; | ||
1199 | ControllingClient.OnAgentSit -= HandleAgentSit; | ||
1200 | ControllingClient.OnSetAlwaysRun -= HandleSetAlwaysRun; | ||
1201 | ControllingClient.OnStartAnim -= HandleStartAnim; | ||
1202 | ControllingClient.OnStopAnim -= HandleStopAnim; | ||
1203 | ControllingClient.OnChangeAnim -= avnHandleChangeAnim; | ||
1204 | ControllingClient.OnForceReleaseControls -= HandleForceReleaseControls; | ||
1205 | ControllingClient.OnAutoPilotGo -= MoveToTarget; | ||
1206 | ControllingClient.OnUpdateThrottles -= RaiseUpdateThrottles; | ||
1207 | } | ||
1192 | 1208 | ||
1193 | private void SetDirectionVectors() | 1209 | private void SetDirectionVectors() |
1194 | { | 1210 | { |
@@ -2318,7 +2334,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2318 | Vector3 tocam = CameraPosition - posAdjusted; | 2334 | Vector3 tocam = CameraPosition - posAdjusted; |
2319 | 2335 | ||
2320 | float distTocamlen = tocam.LengthSquared(); | 2336 | float distTocamlen = tocam.LengthSquared(); |
2321 | if (distTocamlen > 0.08f && distTocamlen < 400) | 2337 | if (distTocamlen > 0.01f && distTocamlen < 400) |
2322 | { | 2338 | { |
2323 | distTocamlen = (float)Math.Sqrt(distTocamlen); | 2339 | distTocamlen = (float)Math.Sqrt(distTocamlen); |
2324 | tocam *= (1.0f / distTocamlen); | 2340 | tocam *= (1.0f / distTocamlen); |
@@ -4378,16 +4394,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
4378 | m_log.DebugFormat( | 4394 | m_log.DebugFormat( |
4379 | "[SCENE PRESENCE]: Closing child agents. Checking {0} regions in {1}", | 4395 | "[SCENE PRESENCE]: Closing child agents. Checking {0} regions in {1}", |
4380 | knownRegions.Count, Scene.RegionInfo.RegionName); | 4396 | knownRegions.Count, Scene.RegionInfo.RegionName); |
4381 | //DumpKnownRegions(); | ||
4382 | 4397 | ||
4383 | Util.RegionHandleToRegionLoc(newRegionHandle, out newRegionX, out newRegionY); | 4398 | Util.RegionHandleToRegionLoc(newRegionHandle, out newRegionX, out newRegionY); |
4384 | 4399 | ||
4385 | uint x, y; | 4400 | uint x, y; |
4386 | spRegionSizeInfo regInfo; | 4401 | spRegionSizeInfo regInfo; |
4387 | 4402 | ||
4388 | // this should not be here | ||
4389 | IEventQueue eventQueue = Scene.RequestModuleInterface<IEventQueue>(); | ||
4390 | |||
4391 | foreach (ulong handle in knownRegions) | 4403 | foreach (ulong handle in knownRegions) |
4392 | { | 4404 | { |
4393 | // Don't close the agent on this region yet | 4405 | // Don't close the agent on this region yet |
@@ -4400,16 +4412,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
4400 | Util.RegionHandleToRegionLoc(handle, out x, out y); | 4412 | Util.RegionHandleToRegionLoc(handle, out x, out y); |
4401 | if (m_knownChildRegionsSizeInfo.TryGetValue(handle, out regInfo)) | 4413 | if (m_knownChildRegionsSizeInfo.TryGetValue(handle, out regInfo)) |
4402 | { | 4414 | { |
4403 | |||
4404 | // m_log.Debug("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX))); | ||
4405 | // m_log.Debug("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY))); | ||
4406 | if (Util.IsOutsideView(RegionViewDistance, x, newRegionX, y, newRegionY, | 4415 | if (Util.IsOutsideView(RegionViewDistance, x, newRegionX, y, newRegionY, |
4407 | regInfo.sizeX, regInfo.sizeY, newRegionSizeX, newRegionSizeY)) | 4416 | regInfo.sizeX, regInfo.sizeY, newRegionSizeX, newRegionSizeY)) |
4408 | { | 4417 | { |
4409 | byebyeRegions.Add(handle); | 4418 | byebyeRegions.Add(handle); |
4410 | // this should not be here | ||
4411 | // if(eventQueue != null) | ||
4412 | /// eventQueue.DisableSimulator(handle,UUID); | ||
4413 | } | 4419 | } |
4414 | } | 4420 | } |
4415 | else | 4421 | else |
@@ -4445,6 +4451,32 @@ namespace OpenSim.Region.Framework.Scenes | |||
4445 | } | 4451 | } |
4446 | } | 4452 | } |
4447 | 4453 | ||
4454 | public void closeAllChildAgents() | ||
4455 | { | ||
4456 | List<ulong> byebyeRegions = new List<ulong>(); | ||
4457 | List<ulong> knownRegions = KnownRegionHandles; | ||
4458 | foreach (ulong handle in knownRegions) | ||
4459 | { | ||
4460 | if (handle != Scene.RegionInfo.RegionHandle) | ||
4461 | { | ||
4462 | byebyeRegions.Add(handle); | ||
4463 | RemoveNeighbourRegion(handle); | ||
4464 | Scene.CapsModule.DropChildSeed(UUID, handle); | ||
4465 | } | ||
4466 | } | ||
4467 | |||
4468 | if (byebyeRegions.Count > 0) | ||
4469 | { | ||
4470 | m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents"); | ||
4471 | |||
4472 | AgentCircuitData acd = Scene.AuthenticateHandler.GetAgentCircuitData(UUID); | ||
4473 | string auth = string.Empty; | ||
4474 | if (acd != null) | ||
4475 | auth = acd.SessionID.ToString(); | ||
4476 | m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, auth, byebyeRegions); | ||
4477 | } | ||
4478 | } | ||
4479 | |||
4448 | #endregion | 4480 | #endregion |
4449 | 4481 | ||
4450 | /// <summary> | 4482 | /// <summary> |
@@ -5000,12 +5032,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
5000 | RemoveFromPhysicalScene(); | 5032 | RemoveFromPhysicalScene(); |
5001 | 5033 | ||
5002 | m_scene.EventManager.OnRegionHeartbeatEnd -= RegionHeartbeatEnd; | 5034 | m_scene.EventManager.OnRegionHeartbeatEnd -= RegionHeartbeatEnd; |
5035 | RemoveClientEvents(); | ||
5003 | 5036 | ||
5004 | // if (Animator != null) | 5037 | // if (Animator != null) |
5005 | // Animator.Close(); | 5038 | // Animator.Close(); |
5006 | Animator = null; | 5039 | Animator = null; |
5007 | 5040 | ||
5041 | scriptedcontrols.Clear(); | ||
5042 | ControllingClient = null; | ||
5008 | LifecycleState = ScenePresenceState.Removed; | 5043 | LifecycleState = ScenePresenceState.Removed; |
5044 | IsDeleted = true; | ||
5009 | } | 5045 | } |
5010 | 5046 | ||
5011 | public void AddAttachment(SceneObjectGroup gobj) | 5047 | public void AddAttachment(SceneObjectGroup gobj) |