From a0469daf759d09de040aa8b5287fab9a83555cc1 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 26 Jan 2011 21:12:41 +0000
Subject: Implement command "land show". This shows all the parcels on the
currently selected region/s
This is useful for diagnostics. The command is "land show" rather than "show land" because it's implemented as a module specific subcommand.
---
OpenSim/Region/Framework/Interfaces/ILandObject.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Interfaces/ILandObject.cs b/OpenSim/Region/Framework/Interfaces/ILandObject.cs
index 585eb00..b7487e8 100644
--- a/OpenSim/Region/Framework/Interfaces/ILandObject.cs
+++ b/OpenSim/Region/Framework/Interfaces/ILandObject.cs
@@ -43,7 +43,11 @@ namespace OpenSim.Region.Framework.Interfaces
LandData LandData { get; set; }
bool[,] LandBitmap { get; set; }
UUID RegionUUID { get; }
+ Vector3 StartPoint { get; }
+ Vector3 EndPoint { get; }
+
bool ContainsPoint(int x, int y);
+
ILandObject Copy();
void SendLandUpdateToAvatarsOverMe();
--
cgit v1.1
From 8eb2789ae1d1f94ea9dfe4bf25b1c69065f0f960 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 26 Jan 2011 21:19:22 +0000
Subject: Add some comments on ILandObject.StartPoint and EndPoint
---
OpenSim/Region/Framework/Interfaces/ILandObject.cs | 10 ++++++++++
1 file changed, 10 insertions(+)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Interfaces/ILandObject.cs b/OpenSim/Region/Framework/Interfaces/ILandObject.cs
index b7487e8..576b645 100644
--- a/OpenSim/Region/Framework/Interfaces/ILandObject.cs
+++ b/OpenSim/Region/Framework/Interfaces/ILandObject.cs
@@ -43,7 +43,17 @@ namespace OpenSim.Region.Framework.Interfaces
LandData LandData { get; set; }
bool[,] LandBitmap { get; set; }
UUID RegionUUID { get; }
+
+ ///
+ /// The start point for the land object. This is the western-most point as one scans land working from
+ /// north to south.
+ ///
Vector3 StartPoint { get; }
+
+ ///
+ /// The end point for the land object. This is the eastern-most point as one scans land working from
+ /// south to north.
+ ///
Vector3 EndPoint { get; }
bool ContainsPoint(int x, int y);
--
cgit v1.1
From 240c0eaf1d8886378829e32a68aa9d2534f31a09 Mon Sep 17 00:00:00 2001
From: Mic Bowman
Date: Wed, 26 Jan 2011 13:33:34 -0800
Subject: Remove the RestorePresences functions (which don't seem to be doing
anything) and clean up the code in AddNewClient (so Appearance only gets
assigned once, not three times).
---
OpenSim/Region/Framework/Scenes/Scene.cs | 77 ++++-----------------------
OpenSim/Region/Framework/Scenes/SceneGraph.cs | 4 +-
2 files changed, 12 insertions(+), 69 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 12fd813..71d0f09 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -498,12 +498,6 @@ namespace OpenSim.Region.Framework.Scenes
get { return m_sceneGraph.Entities; }
}
- public Dictionary m_restorePresences
- {
- get { return m_sceneGraph.RestorePresences; }
- set { m_sceneGraph.RestorePresences = value; }
- }
-
#endregion Properties
#region Constructors
@@ -2483,56 +2477,24 @@ namespace OpenSim.Region.Framework.Scenes
(aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0;
CheckHeartbeat();
- ScenePresence presence;
- if (m_restorePresences.ContainsKey(client.AgentId))
+ if (GetScenePresence(client.AgentId) == null) // ensure there is no SP here
{
- m_log.DebugFormat("[SCENE]: Restoring agent {0} {1} in {2}", client.Name, client.AgentId, RegionInfo.RegionName);
+ m_log.Debug("[SCENE]: Adding new agent " + client.Name + " to scene " + RegionInfo.RegionName);
m_clientManager.Add(client);
SubscribeToClientEvents(client);
- presence = m_restorePresences[client.AgentId];
- m_restorePresences.Remove(client.AgentId);
-
- // This is one of two paths to create avatars that are
- // used. This tends to get called more in standalone
- // than grid, not really sure why, but as such needs
- // an explicity appearance lookup here.
- AvatarAppearance appearance = null;
- GetAvatarAppearance(client, out appearance);
- presence.Appearance = appearance;
+ ScenePresence sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance);
+ m_eventManager.TriggerOnNewPresence(sp);
- presence.initializeScenePresence(client, RegionInfo, this);
-
- m_sceneGraph.AddScenePresence(presence);
-
- lock (m_restorePresences)
+ // HERE!!! Do the initial attachments right here
+ // first agent upon login is a root agent by design.
+ // All other AddNewClient calls find aCircuit.child to be true
+ if (aCircuit.child == false)
{
- Monitor.PulseAll(m_restorePresences);
- }
- }
- else
- {
- if (GetScenePresence(client.AgentId) == null) // ensure there is no SP here
- {
- m_log.Debug("[SCENE]: Adding new agent " + client.Name + " to scene " + RegionInfo.RegionName);
-
- m_clientManager.Add(client);
- SubscribeToClientEvents(client);
-
- ScenePresence sp = CreateAndAddScenePresence(client);
- if (aCircuit != null)
- sp.Appearance = aCircuit.Appearance;
-
- // HERE!!! Do the initial attachments right here
- // first agent upon login is a root agent by design.
- // All other AddNewClient calls find aCircuit.child to be true
- if (aCircuit == null || (aCircuit != null && aCircuit.child == false))
- {
- sp.IsChildAgent = false;
- Util.FireAndForget(delegate(object o) { sp.RezAttachments(); });
- }
+ sp.IsChildAgent = false;
+ Util.FireAndForget(delegate(object o) { sp.RezAttachments(); });
}
}
@@ -2997,25 +2959,6 @@ namespace OpenSim.Region.Framework.Scenes
}
///
- /// Create a child agent scene presence and add it to this scene.
- ///
- ///
- ///
- protected virtual ScenePresence CreateAndAddScenePresence(IClientAPI client)
- {
- CheckHeartbeat();
- AvatarAppearance appearance = null;
- GetAvatarAppearance(client, out appearance);
-
- ScenePresence avatar = m_sceneGraph.CreateAndAddChildScenePresence(client, appearance);
- //avatar.KnownRegions = GetChildrenSeeds(avatar.UUID);
-
- m_eventManager.TriggerOnNewPresence(avatar);
-
- return avatar;
- }
-
- ///
/// Get the avatar apperance for the given client.
///
///
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index a2ed54f..969ff13 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -73,7 +73,6 @@ namespace OpenSim.Region.Framework.Scenes
protected List m_scenePresenceArray = new List();
protected internal EntityManager Entities = new EntityManager();
- protected internal Dictionary RestorePresences = new Dictionary();
protected RegionInfo m_regInfo;
protected Scene m_parentScene;
@@ -564,8 +563,8 @@ namespace OpenSim.Region.Framework.Scenes
{
ScenePresence newAvatar = null;
+ // ScenePresence always defaults to child agent
newAvatar = new ScenePresence(client, m_parentScene, m_regInfo, appearance);
- newAvatar.IsChildAgent = true;
AddScenePresence(newAvatar);
@@ -578,6 +577,7 @@ namespace OpenSim.Region.Framework.Scenes
///
protected internal void AddScenePresence(ScenePresence presence)
{
+ // Always a child when added to the scene
bool child = presence.IsChildAgent;
if (child)
--
cgit v1.1