* Fixes endless loop in the Land Module when selecting any object.

* Fixes returning objects when the object owner hasn't been in the simulator since the simulator started up last.
0.6.0-stable
Teravus Ovares 2008-05-24 21:13:44 +00:00
parent dd4100db4c
commit cd79be569c
4 changed files with 110 additions and 75 deletions

View File

@ -582,6 +582,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
public void UpdateLandPrimCounts() public void UpdateLandPrimCounts()
{ {
ResetAllLandPrimCounts();
foreach (EntityBase obj in m_scene.Entities.Values) foreach (EntityBase obj in m_scene.Entities.Values)
{ {
if (obj is SceneObjectGroup) if (obj is SceneObjectGroup)
@ -589,6 +590,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land
m_scene.EventManager.TriggerParcelPrimCountAdd((SceneObjectGroup)obj); m_scene.EventManager.TriggerParcelPrimCountAdd((SceneObjectGroup)obj);
} }
} }
FinalizeLandPrimCountUpdate();
landPrimCountTainted = false;
} }
public void PerformParcelPrimCountUpdate() public void PerformParcelPrimCountUpdate()

View File

@ -751,12 +751,15 @@ namespace OpenSim.Region.Environment.Modules.World.Land
landData.ownerPrims = 0; landData.ownerPrims = 0;
landData.otherPrims = 0; landData.otherPrims = 0;
landData.selectedPrims = 0; landData.selectedPrims = 0;
lock (primsOverMe) lock (primsOverMe)
primsOverMe.Clear(); primsOverMe.Clear();
} }
public void addPrimToCount(SceneObjectGroup obj) public void addPrimToCount(SceneObjectGroup obj)
{ {
LLUUID prim_owner = obj.OwnerID; LLUUID prim_owner = obj.OwnerID;
int prim_count = obj.PrimCount; int prim_count = obj.PrimCount;

View File

@ -438,6 +438,16 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
public void TriggerObjectBeingRemovedFromScene(SceneObjectGroup obj)
{
handlerObjectBeingRemovedFromScene = OnObjectBeingRemovedFromScene;
if (handlerObjectBeingRemovedFromScene != null)
{
handlerObjectBeingRemovedFromScene(obj);
}
}
public void TriggerShutdown() public void TriggerShutdown()
{ {
handlerShutdown = OnShutdown; handlerShutdown = OnShutdown;
@ -725,15 +735,6 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
public void TriggerObjectBeingRemovedFromScene(SceneObjectGroup obj)
{
handlerObjectBeingRemovedFromScene = OnObjectBeingRemovedFromScene;
if (handlerObjectBeingRemovedFromScene != null)
{
handlerObjectBeingRemovedFromScene(obj);
}
}
public void TriggerRequestParcelPrimCountUpdate() public void TriggerRequestParcelPrimCountUpdate()

View File

@ -1675,6 +1675,7 @@ namespace OpenSim.Region.Environment.Scenes
} }
public virtual bool returnObjects(SceneObjectGroup[] returnobjects, LLUUID AgentId) public virtual bool returnObjects(SceneObjectGroup[] returnobjects, LLUUID AgentId)
{ {
string message = "";
if (returnobjects.Length <= 0) if (returnobjects.Length <= 0)
return false; return false;
@ -1698,7 +1699,14 @@ namespace OpenSim.Region.Environment.Scenes
{ {
CachedUserInfo userInfo = CachedUserInfo userInfo =
CommsManager.UserProfileCacheService.GetUserDetails(returnobjects[i].OwnerID); CommsManager.UserProfileCacheService.GetUserDetails(returnobjects[i].OwnerID);
if (userInfo == null)
{
CommsManager.UserProfileCacheService.AddNewUser(returnobjects[i].OwnerID);
}
if (userInfo != null) if (userInfo != null)
{
if (userInfo.HasInventory)
{ {
LLUUID folderID = LLUUID.Zero; LLUUID folderID = LLUUID.Zero;
@ -1783,9 +1791,29 @@ namespace OpenSim.Region.Environment.Scenes
DeleteSceneObjectGroup(ObjectDeleting); DeleteSceneObjectGroup(ObjectDeleting);
ObjectDeleting = null; ObjectDeleting = null;
} }
return true; else
{
CommsManager.UserProfileCacheService.RequestInventoryForUser(returnobjects[i].OwnerID);
message = "Still waiting on the inventory service, some of the items won't be returned until the inventory services completes it's task. Try again shortly.";
}
}
else
{
message = "Still waiting on the inventory service, some of the items won't be returned until the inventory services completes it's task. Try again shortly.";
}
//return true;
}
if (message.Length != 0)
{
ScenePresence returningavatar = GetScenePresence(AgentId);
if (returningavatar != null)
{
returningavatar.ControllingClient.SendAlertMessage(message);
} }
return false; return false;
}
return true;
} }