set grp.RootPart.GroupPosition for code consistency (and readability) rather than calling SOP.OffsetForNewRegion
parent
9bf8c3e7b7
commit
c2da1c4580
|
@ -1686,7 +1686,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
|
|
||||||
// Offset the positions for the new region across the border
|
// Offset the positions for the new region across the border
|
||||||
Vector3 oldGroupPosition = grp.RootPart.GroupPosition;
|
Vector3 oldGroupPosition = grp.RootPart.GroupPosition;
|
||||||
grp.OffsetForNewRegion(pos);
|
grp.RootPart.GroupPosition = pos;
|
||||||
|
|
||||||
// If we fail to cross the border, then reset the position of the scene object on that border.
|
// If we fail to cross the border, then reset the position of the scene object on that border.
|
||||||
uint x = 0, y = 0;
|
uint x = 0, y = 0;
|
||||||
|
@ -1694,7 +1694,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
GridRegion destination = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y);
|
GridRegion destination = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y);
|
||||||
if (destination != null && !CrossPrimGroupIntoNewRegion(destination, grp, silent))
|
if (destination != null && !CrossPrimGroupIntoNewRegion(destination, grp, silent))
|
||||||
{
|
{
|
||||||
grp.OffsetForNewRegion(oldGroupPosition);
|
grp.RootPart.GroupPosition = oldGroupPosition;
|
||||||
grp.ScheduleGroupForFullUpdate();
|
grp.ScheduleGroupForFullUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2798,11 +2798,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ScheduleGroupForTerseUpdate();
|
ScheduleGroupForTerseUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OffsetForNewRegion(Vector3 offset)
|
|
||||||
{
|
|
||||||
m_rootPart.GroupPosition = offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Rotation
|
#region Rotation
|
||||||
|
|
Loading…
Reference in New Issue