aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs21
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs34
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs5
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs13
7 files changed, 41 insertions, 46 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 8c51077..1b091bf 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -12602,7 +12602,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12602 { 12602 {
12603 if (p is ScenePresence) 12603 if (p is ScenePresence)
12604 { 12604 {
12605 ScenePresence presence = p as ScenePresence;
12606 // It turns out to get the agent to stop flying, you have to feed it stop flying velocities 12605 // It turns out to get the agent to stop flying, you have to feed it stop flying velocities
12607 // There's no explicit message to send the client to tell it to stop flying.. it relies on the 12606 // There's no explicit message to send the client to tell it to stop flying.. it relies on the
12608 // velocity, collision plane and avatar height 12607 // velocity, collision plane and avatar height
@@ -12610,15 +12609,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12610 // Add 1/6 the avatar's height to it's position so it doesn't shoot into the air 12609 // Add 1/6 the avatar's height to it's position so it doesn't shoot into the air
12611 // when the avatar stands up 12610 // when the avatar stands up
12612 12611
12613 Vector3 pos = presence.AbsolutePosition;
12614
12615 ImprovedTerseObjectUpdatePacket.ObjectDataBlock block = 12612 ImprovedTerseObjectUpdatePacket.ObjectDataBlock block =
12616 CreateImprovedTerseBlock(p, false); 12613 CreateImprovedTerseBlock(p, false);
12617 12614
12618 const float TIME_DILATION = 1.0f; 12615 const float TIME_DILATION = 1.0f;
12619 ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f); 12616 ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f);
12620 12617
12621
12622 ImprovedTerseObjectUpdatePacket packet 12618 ImprovedTerseObjectUpdatePacket packet
12623 = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket( 12619 = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(
12624 PacketType.ImprovedTerseObjectUpdate); 12620 PacketType.ImprovedTerseObjectUpdate);
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index 797097f..5854428 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -536,7 +536,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
536 } 536 }
537 catch (Exception e) 537 catch (Exception e)
538 { 538 {
539 m_log.ErrorFormat("[INVENTORY ARCHIVER]: Could not authenticate password, {0}", e.Message); 539 m_log.ErrorFormat("[INVENTORY ARCHIVER]: Could not authenticate password, {0}", e);
540 return null; 540 return null;
541 } 541 }
542 } 542 }
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 17ebc83..8950516 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -832,8 +832,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
832 } 832 }
833 833
834 m_log.WarnFormat( 834 m_log.WarnFormat(
835 "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1} from {2}. Keeping avatar in source region.", 835 "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1}. Keeping avatar in {2}",
836 sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); 836 sp.Name, finalDestination.RegionName, sp.Scene.Name);
837 837
838 Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established."); 838 Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established.");
839 return; 839 return;
@@ -1053,8 +1053,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1053 } 1053 }
1054 1054
1055 m_log.WarnFormat( 1055 m_log.WarnFormat(
1056 "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1} from {2}. Keeping avatar in source region.", 1056 "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1}. Keeping avatar in {2}",
1057 sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); 1057 sp.Name, finalDestination.RegionName, sp.Scene.Name);
1058 1058
1059 Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established."); 1059 Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established.");
1060 return; 1060 return;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index b58e7c4..cb12d65 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4416,10 +4416,27 @@ namespace OpenSim.Region.Framework.Scenes
4416 4416
4417 // Check that the auth_token is valid 4417 // Check that the auth_token is valid
4418 AgentCircuitData acd = AuthenticateHandler.GetAgentCircuitData(agentID); 4418 AgentCircuitData acd = AuthenticateHandler.GetAgentCircuitData(agentID);
4419 if (acd != null && acd.SessionID.ToString() == auth_token) 4419
4420 if (acd == null)
4421 {
4422 m_log.DebugFormat(
4423 "[SCENE]: Request to close agent {0} but no such agent in scene {1}. May have been closed previously.",
4424 agentID, Name);
4425
4426 return false;
4427 }
4428
4429 if (acd.SessionID.ToString() == auth_token)
4430 {
4420 return IncomingCloseAgent(agentID, force); 4431 return IncomingCloseAgent(agentID, force);
4432 }
4421 else 4433 else
4422 m_log.ErrorFormat("[SCENE]: Request to close agent {0} with invalid authorization token {1}", agentID, auth_token); 4434 {
4435 m_log.WarnFormat(
4436 "[SCENE]: Request to close agent {0} with invalid authorization token {1} in {2}",
4437 agentID, auth_token, Name);
4438 }
4439
4423 return false; 4440 return false;
4424 } 4441 }
4425 4442
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index bb7ae7f..0a5bfd2 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -561,39 +561,15 @@ namespace OpenSim.Region.Framework.Scenes
561 protected internal ScenePresence CreateAndAddChildScenePresence( 561 protected internal ScenePresence CreateAndAddChildScenePresence(
562 IClientAPI client, AvatarAppearance appearance, PresenceType type) 562 IClientAPI client, AvatarAppearance appearance, PresenceType type)
563 { 563 {
564 ScenePresence newAvatar = null;
565
566 // ScenePresence always defaults to child agent 564 // ScenePresence always defaults to child agent
567 newAvatar = new ScenePresence(client, m_parentScene, appearance, type); 565 ScenePresence presence = new ScenePresence(client, m_parentScene, appearance, type);
568
569 AddScenePresence(newAvatar);
570
571 return newAvatar;
572 }
573
574 /// <summary>
575 /// Add a presence to the scene
576 /// </summary>
577 /// <param name="presence"></param>
578 protected internal void AddScenePresence(ScenePresence presence)
579 {
580 // Always a child when added to the scene
581 bool child = presence.IsChildAgent;
582
583 if (child)
584 {
585 m_numChildAgents++;
586 }
587 else
588 {
589 m_numRootAgents++;
590 presence.AddToPhysicalScene(false);
591 }
592 566
593 Entities[presence.UUID] = presence; 567 Entities[presence.UUID] = presence;
594 568
595 lock (m_presenceLock) 569 lock (m_presenceLock)
596 { 570 {
571 m_numChildAgents++;
572
597 Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap); 573 Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap);
598 List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray); 574 List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray);
599 575
@@ -604,7 +580,7 @@ namespace OpenSim.Region.Framework.Scenes
604 } 580 }
605 else 581 else
606 { 582 {
607 // Remember the old presene reference from the dictionary 583 // Remember the old presence reference from the dictionary
608 ScenePresence oldref = newmap[presence.UUID]; 584 ScenePresence oldref = newmap[presence.UUID];
609 // Replace the presence reference in the dictionary with the new value 585 // Replace the presence reference in the dictionary with the new value
610 newmap[presence.UUID] = presence; 586 newmap[presence.UUID] = presence;
@@ -616,6 +592,8 @@ namespace OpenSim.Region.Framework.Scenes
616 m_scenePresenceMap = newmap; 592 m_scenePresenceMap = newmap;
617 m_scenePresenceArray = newlist; 593 m_scenePresenceArray = newlist;
618 } 594 }
595
596 return presence;
619 } 597 }
620 598
621 /// <summary> 599 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 4fc207a..b4e8f09 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3243,11 +3243,6 @@ namespace OpenSim.Region.Framework.Scenes
3243 } 3243 }
3244 } 3244 }
3245 3245
3246 public void RestoreInCurrentScene()
3247 {
3248 AddToPhysicalScene(false); // not exactly false
3249 }
3250
3251 public void Reset() 3246 public void Reset()
3252 { 3247 {
3253// m_log.DebugFormat("[SCENE PRESENCE]: Resetting {0} in {1}", Name, Scene.RegionInfo.RegionName); 3248// m_log.DebugFormat("[SCENE PRESENCE]: Resetting {0} in {1}", Name, Scene.RegionInfo.RegionName);
diff --git a/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs b/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs
index e9cb213..5a6b284 100644
--- a/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs
@@ -119,11 +119,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand
119 119
120 foreach (ScenePresence sp in scenePresences) 120 foreach (ScenePresence sp in scenePresences)
121 { 121 {
122 if (sp.SitGround || sp.IsSatOnObject)
123 continue;
124
122 SceneObjectPart sitPart = null; 125 SceneObjectPart sitPart = null;
123 List<SceneObjectGroup> sceneObjects = m_scene.GetSceneObjectGroups(); 126 List<SceneObjectGroup> sceneObjects = m_scene.GetSceneObjectGroups();
124 127
125 foreach (SceneObjectGroup sceneObject in sceneObjects) 128 foreach (SceneObjectGroup sceneObject in sceneObjects)
126 { 129 {
130 if (sceneObject.IsAttachment)
131 continue;
132
127 foreach (SceneObjectPart part in sceneObject.Parts) 133 foreach (SceneObjectPart part in sceneObject.Parts)
128 { 134 {
129 if (part.IsSitTargetSet && part.SitTargetAvatar == UUID.Zero) 135 if (part.IsSitTargetSet && part.SitTargetAvatar == UUID.Zero)
@@ -169,8 +175,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand
169 175
170 foreach (ScenePresence sp in scenePresences) 176 foreach (ScenePresence sp in scenePresences)
171 { 177 {
172 MainConsole.Instance.OutputFormat("Standing {0} in {1}", sp.Name, m_scene.Name); 178 if (sp.SitGround || sp.IsSatOnObject)
173 sp.StandUp(); 179 {
180 MainConsole.Instance.OutputFormat("Standing {0} in {1}", sp.Name, m_scene.Name);
181 sp.StandUp();
182 }
174 } 183 }
175 } 184 }
176 185