Fix bug where objects could not be set to a new group if the group had been created in that client session, or if no other action has been performed on the object.

There were two problems here:
1) On object group update, we looked for the group is the IClientAPI group cache rather than in the groups service.  This fails to groups created newly in that session
2) On object group update, we weren't setting the HasGroupChanged flag.  This meant that the change was not persisted unless some other action set this flag.
This commit fixes these issues and hopefully addresses http://opensimulator.org/mantis/view.php?id=5588
This commit also moves HandleObjectGroupUpdate() to the GroupsModule from the Scene.PacketHandlers.cs file
This commit is contained in:
Justin Clark-Casey (justincc)
2011-12-17 02:23:24 +00:00
parent 9b56cc69c1
commit f9137c923b
8 changed files with 50 additions and 21 deletions

View File

@@ -3344,6 +3344,11 @@ namespace OpenSim.Region.Framework.Scenes
public void SetGroup(UUID groupID, IClientAPI client)
{
// Scene.AddNewPrims() calls with client == null so can't use this.
// m_log.DebugFormat(
// "[SCENE OBJECT PART]: Setting group for {0} to {1} for {2}",
// Name, groupID, OwnerID);
GroupID = groupID;
if (client != null)
SendPropertiesToClient(client);