diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs index 0ba3e7fbac..b6bd45a12c 100644 --- a/OpenSim/Framework/IScene.cs +++ b/OpenSim/Framework/IScene.cs @@ -45,6 +45,7 @@ namespace OpenSim.Framework public interface IScene { RegionInfo RegionInfo { get; } + uint NextAvatarLocalId { get; } RegionStatus Region_Status { get; set; } ClientManager ClientManager { get; } diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index bba31f7413..67e23b5848 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs @@ -80,6 +80,7 @@ namespace OpenSim.Region.Environment.Scenes get { return m_eventManager; } } + protected SceneExternalChecks m_externalChecks; public SceneExternalChecks ExternalChecks { @@ -88,6 +89,8 @@ namespace OpenSim.Region.Environment.Scenes protected string m_datastore; + private uint m_nextAvatarLocalId = 8880000; + private AssetCache m_assetCache; public AssetCache AssetCache @@ -161,6 +164,11 @@ namespace OpenSim.Region.Environment.Scenes get { return m_regInfo; } } + public uint NextAvatarLocalId + { + get { return m_nextAvatarLocalId++; } + } + #region admin stuff /// diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 5e3396c0eb..00357678a7 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -492,7 +492,7 @@ namespace OpenSim.Region.Environment.Scenes m_scene = world; m_uuid = client.AgentId; m_regionInfo = reginfo; - m_localId = m_scene.AllocateLocalId(); + m_localId = m_scene.NextAvatarLocalId; IGroupsModule gm = m_scene.RequestModuleInterface(); if (gm != null) @@ -2214,6 +2214,8 @@ namespace OpenSim.Region.Environment.Scenes CrossAttachmentsIntoNewRegion(neighbourHandle, true); +// m_scene.SendKillObject(m_localId); + m_scene.NotifyMyCoarseLocationChange(); // the user may change their profile information in other region, // so the userinfo in UserProfileCache is not reliable any more, delete it @@ -2263,6 +2265,7 @@ namespace OpenSim.Region.Environment.Scenes /// public void ChildAgentDataUpdate(ChildAgentDataUpdate cAgentData, uint tRegionX, uint tRegionY, uint rRegionX, uint rRegionY) { + // if (!IsChildAgent) return;