Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
a62ccb5c4c
|
@ -297,7 +297,6 @@ namespace OpenSim.Data.Tests
|
||||||
pbshap.ProfileEnd = ushort.MaxValue;
|
pbshap.ProfileEnd = ushort.MaxValue;
|
||||||
pbshap.ProfileHollow = ushort.MaxValue;
|
pbshap.ProfileHollow = ushort.MaxValue;
|
||||||
Vector3 scale = new Vector3(random.Next(),random.Next(),random.Next());
|
Vector3 scale = new Vector3(random.Next(),random.Next(),random.Next());
|
||||||
byte updatef = (byte) random.Next(127);
|
|
||||||
|
|
||||||
RegionInfo regionInfo = new RegionInfo();
|
RegionInfo regionInfo = new RegionInfo();
|
||||||
regionInfo.RegionID = region3;
|
regionInfo.RegionID = region3;
|
||||||
|
@ -336,7 +335,6 @@ namespace OpenSim.Data.Tests
|
||||||
sop.LinkNum = linknum;
|
sop.LinkNum = linknum;
|
||||||
sop.ClickAction = clickaction;
|
sop.ClickAction = clickaction;
|
||||||
sop.Scale = scale;
|
sop.Scale = scale;
|
||||||
sop.UpdateFlag = updatef;
|
|
||||||
|
|
||||||
//Tests if local part accepted the parameters:
|
//Tests if local part accepted the parameters:
|
||||||
Assert.That(regionh,Is.EqualTo(sop.RegionHandle), "Assert.That(regionh,Is.EqualTo(sop.RegionHandle))");
|
Assert.That(regionh,Is.EqualTo(sop.RegionHandle), "Assert.That(regionh,Is.EqualTo(sop.RegionHandle))");
|
||||||
|
@ -369,7 +367,6 @@ namespace OpenSim.Data.Tests
|
||||||
Assert.That(linknum,Is.EqualTo(sop.LinkNum), "Assert.That(linknum,Is.EqualTo(sop.LinkNum))");
|
Assert.That(linknum,Is.EqualTo(sop.LinkNum), "Assert.That(linknum,Is.EqualTo(sop.LinkNum))");
|
||||||
Assert.That(clickaction,Is.EqualTo(sop.ClickAction), "Assert.That(clickaction,Is.EqualTo(sop.ClickAction))");
|
Assert.That(clickaction,Is.EqualTo(sop.ClickAction), "Assert.That(clickaction,Is.EqualTo(sop.ClickAction))");
|
||||||
Assert.That(scale,Is.EqualTo(sop.Scale), "Assert.That(scale,Is.EqualTo(sop.Scale))");
|
Assert.That(scale,Is.EqualTo(sop.Scale), "Assert.That(scale,Is.EqualTo(sop.Scale))");
|
||||||
Assert.That(updatef,Is.EqualTo(sop.UpdateFlag), "Assert.That(updatef,Is.EqualTo(sop.UpdateFlag))");
|
|
||||||
|
|
||||||
// This is necessary or object will not be inserted in DB
|
// This is necessary or object will not be inserted in DB
|
||||||
sop.Flags = PrimFlags.None;
|
sop.Flags = PrimFlags.None;
|
||||||
|
@ -469,7 +466,6 @@ namespace OpenSim.Data.Tests
|
||||||
PrimitiveBaseShape pbshap = new PrimitiveBaseShape();
|
PrimitiveBaseShape pbshap = new PrimitiveBaseShape();
|
||||||
pbshap = PrimitiveBaseShape.Default;
|
pbshap = PrimitiveBaseShape.Default;
|
||||||
Vector3 scale = new Vector3(random.Next(),random.Next(),random.Next());
|
Vector3 scale = new Vector3(random.Next(),random.Next(),random.Next());
|
||||||
byte updatef = (byte) random.Next(127);
|
|
||||||
|
|
||||||
// Updates the region with new values
|
// Updates the region with new values
|
||||||
SceneObjectGroup sog2 = FindSOG("Adam West", region3);
|
SceneObjectGroup sog2 = FindSOG("Adam West", region3);
|
||||||
|
@ -499,7 +495,6 @@ namespace OpenSim.Data.Tests
|
||||||
sog2.RootPart.LinkNum = linknum;
|
sog2.RootPart.LinkNum = linknum;
|
||||||
sog2.RootPart.ClickAction = clickaction;
|
sog2.RootPart.ClickAction = clickaction;
|
||||||
sog2.RootPart.Scale = scale;
|
sog2.RootPart.Scale = scale;
|
||||||
sog2.RootPart.UpdateFlag = updatef;
|
|
||||||
|
|
||||||
db.StoreObject(sog2, region3);
|
db.StoreObject(sog2, region3);
|
||||||
List<SceneObjectGroup> sogs = db.LoadObjects(region3);
|
List<SceneObjectGroup> sogs = db.LoadObjects(region3);
|
||||||
|
|
|
@ -332,7 +332,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
|
|
||||||
grp.IsAttachment = false;
|
grp.IsAttachment = false;
|
||||||
// Required for linking
|
// Required for linking
|
||||||
grp.RootPart.UpdateFlag = 0;
|
grp.RootPart.ClearUpdateSchedule();
|
||||||
|
|
||||||
if (m_scene.Permissions.CanRezObject(1, avatar.UUID, pos))
|
if (m_scene.Permissions.CanRezObject(1, avatar.UUID, pos))
|
||||||
{
|
{
|
||||||
|
@ -345,8 +345,9 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
|
|
||||||
for (int j = 1; j < allparts.Length; j++)
|
for (int j = 1; j < allparts.Length; j++)
|
||||||
{
|
{
|
||||||
rootGroup.RootPart.UpdateFlag = 0;
|
// Required for linking
|
||||||
allparts[j].RootPart.UpdateFlag = 0;
|
rootGroup.RootPart.ClearUpdateSchedule();
|
||||||
|
allparts[j].RootPart.ClearUpdateSchedule();
|
||||||
rootGroup.LinkToGroup(allparts[j]);
|
rootGroup.LinkToGroup(allparts[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -356,12 +356,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
PresenceInfo[] presences = PresenceService.GetAgents(new string[] { fid });
|
PresenceInfo[] presences = PresenceService.GetAgents(new string[] { fid });
|
||||||
if (presences != null && presences.Length > 0)
|
if (presences != null && presences.Length > 0)
|
||||||
presence = presences[0];
|
presence = presences[0];
|
||||||
if (presence != null)
|
im.offline = 0;
|
||||||
im.offline = 0;
|
|
||||||
|
|
||||||
im.fromAgentID = fromAgentID.Guid;
|
im.fromAgentID = fromAgentID.Guid;
|
||||||
im.fromAgentName = firstname + " " + lastname;
|
im.fromAgentName = firstname + " " + lastname;
|
||||||
im.offline = (byte)((presence == null) ? 1 : 0);
|
|
||||||
im.imSessionID = im.fromAgentID;
|
im.imSessionID = im.fromAgentID;
|
||||||
im.message = FriendshipMessage(fid);
|
im.message = FriendshipMessage(fid);
|
||||||
|
|
||||||
|
|
|
@ -201,26 +201,42 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
|
|
||||||
private void UndeliveredMessage(GridInstantMessage im)
|
private void UndeliveredMessage(GridInstantMessage im)
|
||||||
{
|
{
|
||||||
if ((im.offline != 0)
|
if (im.dialog != (byte)InstantMessageDialog.MessageFromObject &&
|
||||||
&& (!im.fromGroup || (im.fromGroup && m_ForwardOfflineGroupMessages)))
|
im.dialog != (byte)InstantMessageDialog.MessageFromAgent &&
|
||||||
|
im.dialog != (byte)InstantMessageDialog.GroupNotice &&
|
||||||
|
im.dialog != (byte)InstantMessageDialog.GroupInvitation &&
|
||||||
|
im.dialog != (byte)InstantMessageDialog.InventoryOffered)
|
||||||
{
|
{
|
||||||
bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>(
|
return;
|
||||||
"POST", m_RestURL+"/SaveMessage/", im);
|
}
|
||||||
|
|
||||||
if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent)
|
if (!m_ForwardOfflineGroupMessages)
|
||||||
{
|
{
|
||||||
IClientAPI client = FindClient(new UUID(im.fromAgentID));
|
if (im.dialog == (byte)InstantMessageDialog.GroupNotice ||
|
||||||
if (client == null)
|
im.dialog != (byte)InstantMessageDialog.GroupInvitation)
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
client.SendInstantMessage(new GridInstantMessage(
|
Scene scene = FindScene(new UUID(im.fromAgentID));
|
||||||
null, new UUID(im.toAgentID),
|
if (scene == null)
|
||||||
"System", new UUID(im.fromAgentID),
|
scene = m_SceneList[0];
|
||||||
(byte)InstantMessageDialog.MessageFromAgent,
|
|
||||||
"User is not logged in. "+
|
bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>(
|
||||||
(success ? "Message saved." : "Message not saved"),
|
"POST", m_RestURL+"/SaveMessage/", im);
|
||||||
false, new Vector3()));
|
|
||||||
}
|
if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent)
|
||||||
|
{
|
||||||
|
IClientAPI client = FindClient(new UUID(im.fromAgentID));
|
||||||
|
if (client == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
client.SendInstantMessage(new GridInstantMessage(
|
||||||
|
null, new UUID(im.toAgentID),
|
||||||
|
"System", new UUID(im.fromAgentID),
|
||||||
|
(byte)InstantMessageDialog.MessageFromAgent,
|
||||||
|
"User is not logged in. "+
|
||||||
|
(success ? "Message saved." : "Message not saved"),
|
||||||
|
false, new Vector3()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1714,7 +1714,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
//m_log.Debug(" >>> CrossPrimGroupIntoNewRegion <<<");
|
//m_log.Debug(" >>> CrossPrimGroupIntoNewRegion <<<");
|
||||||
|
|
||||||
bool successYN = false;
|
bool successYN = false;
|
||||||
grp.RootPart.UpdateFlag = 0;
|
grp.RootPart.ClearUpdateSchedule();
|
||||||
//int primcrossingXMLmethod = 0;
|
//int primcrossingXMLmethod = 0;
|
||||||
|
|
||||||
if (destination != null)
|
if (destination != null)
|
||||||
|
|
|
@ -1494,7 +1494,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
msg.fromAgentName = "Server";
|
msg.fromAgentName = "Server";
|
||||||
msg.dialog = (byte)19; // Object msg
|
msg.dialog = (byte)19; // Object msg
|
||||||
msg.fromGroup = false;
|
msg.fromGroup = false;
|
||||||
msg.offline = (byte)1;
|
msg.offline = (byte)0;
|
||||||
msg.ParentEstateID = RegionInfo.EstateSettings.ParentEstateID;
|
msg.ParentEstateID = RegionInfo.EstateSettings.ParentEstateID;
|
||||||
msg.Position = Vector3.Zero;
|
msg.Position = Vector3.Zero;
|
||||||
msg.RegionID = RegionInfo.RegionID.Guid;
|
msg.RegionID = RegionInfo.RegionID.Guid;
|
||||||
|
|
|
@ -1799,7 +1799,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
newSet.RemoveAt(0);
|
newSet.RemoveAt(0);
|
||||||
|
|
||||||
foreach (SceneObjectPart newChild in newSet)
|
foreach (SceneObjectPart newChild in newSet)
|
||||||
newChild.UpdateFlag = 0;
|
newChild.ClearUpdateSchedule();
|
||||||
|
|
||||||
LinkObjects(newRoot, newSet);
|
LinkObjects(newRoot, newSet);
|
||||||
if (!affectedGroups.Contains(newRoot.ParentGroup))
|
if (!affectedGroups.Contains(newRoot.ParentGroup))
|
||||||
|
|
|
@ -1157,7 +1157,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if (!silent)
|
if (!silent)
|
||||||
{
|
{
|
||||||
part.UpdateFlag = 0;
|
part.ClearUpdateSchedule();
|
||||||
if (part == m_rootPart)
|
if (part == m_rootPart)
|
||||||
{
|
{
|
||||||
if (!IsAttachment || (AttachedAvatar == avatar.ControllingClient.AgentId) ||
|
if (!IsAttachment || (AttachedAvatar == avatar.ControllingClient.AgentId) ||
|
||||||
|
@ -1735,13 +1735,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f))
|
if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f))
|
||||||
{
|
{
|
||||||
m_rootPart.UpdateFlag = 1;
|
m_rootPart.UpdateFlag = UpdateRequired.TERSE;
|
||||||
lastPhysGroupPos = AbsolutePosition;
|
lastPhysGroupPos = AbsolutePosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f))
|
if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f))
|
||||||
{
|
{
|
||||||
m_rootPart.UpdateFlag = 1;
|
m_rootPart.UpdateFlag = UpdateRequired.TERSE;
|
||||||
lastPhysGroupRot = GroupRotation;
|
lastPhysGroupRot = GroupRotation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,6 +106,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SCULPT = 7
|
SCULPT = 7
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum UpdateRequired : byte
|
||||||
|
{
|
||||||
|
NONE = 0,
|
||||||
|
TERSE = 1,
|
||||||
|
FULL = 2
|
||||||
|
}
|
||||||
|
|
||||||
#endregion Enumerations
|
#endregion Enumerations
|
||||||
|
|
||||||
public class SceneObjectPart : IScriptHost, ISceneEntity
|
public class SceneObjectPart : IScriptHost, ISceneEntity
|
||||||
|
@ -254,15 +261,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
private bool m_passTouches;
|
private bool m_passTouches;
|
||||||
|
|
||||||
/// <summary>
|
private UpdateRequired m_updateFlag;
|
||||||
/// Only used internally to schedule client updates.
|
|
||||||
/// 0 - no update is scheduled
|
|
||||||
/// 1 - terse update scheduled
|
|
||||||
/// 2 - full update scheduled
|
|
||||||
///
|
|
||||||
/// TODO - This should be an enumeration
|
|
||||||
/// </summary>
|
|
||||||
private byte m_updateFlag;
|
|
||||||
|
|
||||||
private PhysicsActor m_physActor;
|
private PhysicsActor m_physActor;
|
||||||
protected Vector3 m_acceleration;
|
protected Vector3 m_acceleration;
|
||||||
|
@ -884,7 +883,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary></summary>
|
/// <summary>Update angular velocity and schedule terse update.</summary>
|
||||||
|
public void UpdateAngularVelocity(Vector3 avel)
|
||||||
|
{
|
||||||
|
AngularVelocity = avel;
|
||||||
|
ScheduleTerseUpdate();
|
||||||
|
ParentGroup.HasGroupChanged = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Get or set angular velocity. Does not schedule update.</summary>
|
||||||
public Vector3 AngularVelocity
|
public Vector3 AngularVelocity
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -1023,8 +1030,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
TriggerScriptChangedEvent(Changed.SCALE);
|
TriggerScriptChangedEvent(Changed.SCALE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte UpdateFlag
|
public UpdateRequired UpdateFlag
|
||||||
{
|
{
|
||||||
get { return m_updateFlag; }
|
get { return m_updateFlag; }
|
||||||
set { m_updateFlag = value; }
|
set { m_updateFlag = value; }
|
||||||
|
@ -1309,9 +1316,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Clear all pending updates of parts to clients
|
/// Clear all pending updates of parts to clients
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void ClearUpdateSchedule()
|
public void ClearUpdateSchedule()
|
||||||
{
|
{
|
||||||
m_updateFlag = 0;
|
UpdateFlag = UpdateRequired.NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -2829,7 +2836,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
TimeStampFull = (uint)timeNow;
|
TimeStampFull = (uint)timeNow;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_updateFlag = 2;
|
UpdateFlag = UpdateRequired.FULL;
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[SCENE OBJECT PART]: Scheduling full update for {0}, {1} at {2}",
|
// "[SCENE OBJECT PART]: Scheduling full update for {0}, {1} at {2}",
|
||||||
|
@ -2845,13 +2852,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (m_parentGroup == null)
|
if (m_parentGroup == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (m_updateFlag < 1)
|
if (UpdateFlag == UpdateRequired.NONE)
|
||||||
{
|
{
|
||||||
m_parentGroup.HasGroupChanged = true;
|
m_parentGroup.HasGroupChanged = true;
|
||||||
m_parentGroup.QueueForUpdateCheck();
|
m_parentGroup.QueueForUpdateCheck();
|
||||||
|
|
||||||
TimeStampTerse = (uint) Util.UnixTimeSinceEpoch();
|
TimeStampTerse = (uint) Util.UnixTimeSinceEpoch();
|
||||||
m_updateFlag = 1;
|
UpdateFlag = UpdateRequired.TERSE;
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[SCENE OBJECT PART]: Scheduling terse update for {0}, {1} at {2}",
|
// "[SCENE OBJECT PART]: Scheduling terse update for {0}, {1} at {2}",
|
||||||
|
@ -3018,45 +3025,39 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
const float POSITION_TOLERANCE = 0.05f;
|
const float POSITION_TOLERANCE = 0.05f;
|
||||||
const int TIME_MS_TOLERANCE = 3000;
|
const int TIME_MS_TOLERANCE = 3000;
|
||||||
|
|
||||||
if (m_updateFlag == 1)
|
switch (UpdateFlag)
|
||||||
{
|
{
|
||||||
// Throw away duplicate or insignificant updates
|
case UpdateRequired.TERSE:
|
||||||
if (!RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) ||
|
|
||||||
!Acceleration.Equals(m_lastAcceleration) ||
|
|
||||||
!Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) ||
|
|
||||||
Velocity.ApproxEquals(Vector3.Zero, VELOCITY_TOLERANCE) ||
|
|
||||||
!AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) ||
|
|
||||||
!OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
|
|
||||||
Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
|
|
||||||
{
|
{
|
||||||
AddTerseUpdateToAllAvatars();
|
// Throw away duplicate or insignificant updates
|
||||||
ClearUpdateSchedule();
|
if (!RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) ||
|
||||||
|
!Acceleration.Equals(m_lastAcceleration) ||
|
||||||
|
!Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) ||
|
||||||
|
Velocity.ApproxEquals(Vector3.Zero, VELOCITY_TOLERANCE) ||
|
||||||
|
!AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) ||
|
||||||
|
!OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
|
||||||
|
Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
|
||||||
|
{
|
||||||
|
AddTerseUpdateToAllAvatars();
|
||||||
|
ClearUpdateSchedule();
|
||||||
|
|
||||||
// This causes the Scene to 'poll' physical objects every couple of frames
|
// Update the "last" values
|
||||||
// bad, so it's been replaced by an event driven method.
|
m_lastPosition = OffsetPosition;
|
||||||
//if ((ObjectFlags & (uint)PrimFlags.Physics) != 0)
|
m_lastRotation = RotationOffset;
|
||||||
//{
|
m_lastVelocity = Velocity;
|
||||||
// Only send the constant terse updates on physical objects!
|
m_lastAcceleration = Acceleration;
|
||||||
//ScheduleTerseUpdate();
|
m_lastAngularVelocity = AngularVelocity;
|
||||||
//}
|
m_lastTerseSent = Environment.TickCount;
|
||||||
|
}
|
||||||
// Update the "last" values
|
break;
|
||||||
m_lastPosition = OffsetPosition;
|
|
||||||
m_lastRotation = RotationOffset;
|
|
||||||
m_lastVelocity = Velocity;
|
|
||||||
m_lastAcceleration = Acceleration;
|
|
||||||
m_lastAngularVelocity = AngularVelocity;
|
|
||||||
m_lastTerseSent = Environment.TickCount;
|
|
||||||
}
|
}
|
||||||
}
|
case UpdateRequired.FULL:
|
||||||
else
|
|
||||||
{
|
|
||||||
if (m_updateFlag == 2) // is a new prim, just created/reloaded or has major changes
|
|
||||||
{
|
{
|
||||||
AddFullUpdateToAllAvatars();
|
AddFullUpdateToAllAvatars();
|
||||||
ClearUpdateSchedule();
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ClearUpdateSchedule();
|
ClearUpdateSchedule();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3436,7 +3437,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
_groupID = groupID;
|
_groupID = groupID;
|
||||||
if (client != null)
|
if (client != null)
|
||||||
SendPropertiesToClient(client);
|
SendPropertiesToClient(client);
|
||||||
m_updateFlag = 2;
|
UpdateFlag = UpdateRequired.FULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -3212,7 +3212,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
foreach (ISceneObject so in cAgent.AttachmentObjects)
|
foreach (ISceneObject so in cAgent.AttachmentObjects)
|
||||||
{
|
{
|
||||||
((SceneObjectGroup)so).LocalId = 0;
|
((SceneObjectGroup)so).LocalId = 0;
|
||||||
((SceneObjectGroup)so).RootPart.UpdateFlag = 0;
|
((SceneObjectGroup)so).RootPart.ClearUpdateSchedule();
|
||||||
so.SetState(cAgent.AttachmentObjectStates[i++], m_scene);
|
so.SetState(cAgent.AttachmentObjectStates[i++], m_scene);
|
||||||
m_scene.IncomingCreateObject(so);
|
m_scene.IncomingCreateObject(so);
|
||||||
}
|
}
|
||||||
|
|
|
@ -316,7 +316,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
m_SOPXmlProcessors.Add("ClickAction", ProcessClickAction);
|
m_SOPXmlProcessors.Add("ClickAction", ProcessClickAction);
|
||||||
m_SOPXmlProcessors.Add("Shape", ProcessShape);
|
m_SOPXmlProcessors.Add("Shape", ProcessShape);
|
||||||
m_SOPXmlProcessors.Add("Scale", ProcessScale);
|
m_SOPXmlProcessors.Add("Scale", ProcessScale);
|
||||||
m_SOPXmlProcessors.Add("UpdateFlag", ProcessUpdateFlag);
|
|
||||||
m_SOPXmlProcessors.Add("SitTargetOrientation", ProcessSitTargetOrientation);
|
m_SOPXmlProcessors.Add("SitTargetOrientation", ProcessSitTargetOrientation);
|
||||||
m_SOPXmlProcessors.Add("SitTargetPosition", ProcessSitTargetPosition);
|
m_SOPXmlProcessors.Add("SitTargetPosition", ProcessSitTargetPosition);
|
||||||
m_SOPXmlProcessors.Add("SitTargetPositionLL", ProcessSitTargetPositionLL);
|
m_SOPXmlProcessors.Add("SitTargetPositionLL", ProcessSitTargetPositionLL);
|
||||||
|
@ -584,11 +583,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
obj.Scale = Util.ReadVector(reader, "Scale");
|
obj.Scale = Util.ReadVector(reader, "Scale");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void ProcessUpdateFlag(SceneObjectPart obj, XmlTextReader reader)
|
|
||||||
{
|
|
||||||
obj.UpdateFlag = (byte)reader.ReadElementContentAsInt("UpdateFlag", String.Empty);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void ProcessSitTargetOrientation(SceneObjectPart obj, XmlTextReader reader)
|
private static void ProcessSitTargetOrientation(SceneObjectPart obj, XmlTextReader reader)
|
||||||
{
|
{
|
||||||
obj.SitTargetOrientation = Util.ReadQuaternion(reader, "SitTargetOrientation");
|
obj.SitTargetOrientation = Util.ReadQuaternion(reader, "SitTargetOrientation");
|
||||||
|
@ -1187,7 +1181,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
WriteShape(writer, sop.Shape, options);
|
WriteShape(writer, sop.Shape, options);
|
||||||
|
|
||||||
WriteVector(writer, "Scale", sop.Scale);
|
WriteVector(writer, "Scale", sop.Scale);
|
||||||
writer.WriteElementString("UpdateFlag", sop.UpdateFlag.ToString());
|
|
||||||
WriteQuaternion(writer, "SitTargetOrientation", sop.SitTargetOrientation);
|
WriteQuaternion(writer, "SitTargetOrientation", sop.SitTargetOrientation);
|
||||||
WriteVector(writer, "SitTargetPosition", sop.SitTargetPosition);
|
WriteVector(writer, "SitTargetPosition", sop.SitTargetPosition);
|
||||||
WriteVector(writer, "SitTargetPositionLL", sop.SitTargetPositionLL);
|
WriteVector(writer, "SitTargetPositionLL", sop.SitTargetPositionLL);
|
||||||
|
|
|
@ -70,8 +70,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
grp2.UpdateGroupRotationR(Quaternion.CreateFromEulers(180 * Utils.DEG_TO_RAD, 0, 0));
|
grp2.UpdateGroupRotationR(Quaternion.CreateFromEulers(180 * Utils.DEG_TO_RAD, 0, 0));
|
||||||
|
|
||||||
// Required for linking
|
// Required for linking
|
||||||
grp1.RootPart.UpdateFlag = 0;
|
grp1.RootPart.ClearUpdateSchedule();
|
||||||
grp2.RootPart.UpdateFlag = 0;
|
grp2.RootPart.ClearUpdateSchedule();
|
||||||
|
|
||||||
// Link grp2 to grp1. part2 becomes child prim to grp1. grp2 is eliminated.
|
// Link grp2 to grp1. part2 becomes child prim to grp1. grp2 is eliminated.
|
||||||
grp1.LinkToGroup(grp2);
|
grp1.LinkToGroup(grp2);
|
||||||
|
@ -164,10 +164,10 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
grp4.UpdateGroupRotationR(Quaternion.CreateFromEulers(0, 90 * Utils.DEG_TO_RAD, 0));
|
grp4.UpdateGroupRotationR(Quaternion.CreateFromEulers(0, 90 * Utils.DEG_TO_RAD, 0));
|
||||||
|
|
||||||
// Required for linking
|
// Required for linking
|
||||||
grp1.RootPart.UpdateFlag = 0;
|
grp1.RootPart.ClearUpdateSchedule();
|
||||||
grp2.RootPart.UpdateFlag = 0;
|
grp2.RootPart.ClearUpdateSchedule();
|
||||||
grp3.RootPart.UpdateFlag = 0;
|
grp3.RootPart.ClearUpdateSchedule();
|
||||||
grp4.RootPart.UpdateFlag = 0;
|
grp4.RootPart.ClearUpdateSchedule();
|
||||||
|
|
||||||
// Link grp2 to grp1. part2 becomes child prim to grp1. grp2 is eliminated.
|
// Link grp2 to grp1. part2 becomes child prim to grp1. grp2 is eliminated.
|
||||||
grp1.LinkToGroup(grp2);
|
grp1.LinkToGroup(grp2);
|
||||||
|
@ -198,8 +198,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
// Required for linking
|
// Required for linking
|
||||||
grp1.RootPart.UpdateFlag = 0;
|
grp1.RootPart.ClearUpdateSchedule();
|
||||||
grp3.RootPart.UpdateFlag = 0;
|
grp3.RootPart.ClearUpdateSchedule();
|
||||||
|
|
||||||
// root part should have no offset position or rotation
|
// root part should have no offset position or rotation
|
||||||
Assert.That(part1.OffsetPosition == Vector3.Zero && part1.RotationOffset == Quaternion.Identity,
|
Assert.That(part1.OffsetPosition == Vector3.Zero && part1.RotationOffset == Quaternion.Identity,
|
||||||
|
|
|
@ -158,6 +158,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Note: Updating these properties on sop automatically schedules an update if needed
|
||||||
if (Position != Vector3.Zero)
|
if (Position != Vector3.Zero)
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
|
@ -181,8 +182,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
part.Resize(Scale);
|
part.Resize(Scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
part.ScheduleTerseUpdate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
part.Undoing = false;
|
part.Undoing = false;
|
||||||
|
@ -212,6 +211,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Note: Updating these properties on sop automatically schedules an update if needed
|
||||||
if (Position != Vector3.Zero)
|
if (Position != Vector3.Zero)
|
||||||
part.OffsetPosition = Position;
|
part.OffsetPosition = Position;
|
||||||
|
|
||||||
|
@ -220,8 +220,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if (Scale != Vector3.Zero)
|
if (Scale != Vector3.Zero)
|
||||||
part.Resize(Scale);
|
part.Resize(Scale);
|
||||||
|
|
||||||
part.ScheduleTerseUpdate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
part.Undoing = false;
|
part.Undoing = false;
|
||||||
|
|
|
@ -881,7 +881,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
msg.dialog = dialog;
|
msg.dialog = dialog;
|
||||||
// msg.dialog = (byte)OpenMetaverse.InstantMessageDialog.GroupNotice;
|
// msg.dialog = (byte)OpenMetaverse.InstantMessageDialog.GroupNotice;
|
||||||
msg.fromGroup = true;
|
msg.fromGroup = true;
|
||||||
msg.offline = (byte)1; // Allow this message to be stored for offline use
|
msg.offline = (byte)0;
|
||||||
msg.ParentEstateID = 0;
|
msg.ParentEstateID = 0;
|
||||||
msg.Position = Vector3.Zero;
|
msg.Position = Vector3.Zero;
|
||||||
msg.RegionID = UUID.Zero.Guid;
|
msg.RegionID = UUID.Zero.Guid;
|
||||||
|
|
|
@ -3351,10 +3351,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
protected void TargetOmega(SceneObjectPart part, LSL_Vector axis, double spinrate, double gain)
|
protected void TargetOmega(SceneObjectPart part, LSL_Vector axis, double spinrate, double gain)
|
||||||
{
|
{
|
||||||
part.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate));
|
part.UpdateAngularVelocity(new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)));
|
||||||
part.ScheduleTerseUpdate();
|
|
||||||
part.SendTerseUpdateToAllClients();
|
|
||||||
part.ParentGroup.HasGroupChanged = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public LSL_Integer llGetStartParameter()
|
public LSL_Integer llGetStartParameter()
|
||||||
|
@ -3616,11 +3613,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
parentPrim = targetPart.ParentGroup;
|
parentPrim = targetPart.ParentGroup;
|
||||||
childPrim = m_host.ParentGroup;
|
childPrim = m_host.ParentGroup;
|
||||||
}
|
}
|
||||||
// byte uf = childPrim.RootPart.UpdateFlag;
|
|
||||||
childPrim.RootPart.UpdateFlag = 0;
|
// Required for linking
|
||||||
|
childPrim.RootPart.ClearUpdateSchedule();
|
||||||
parentPrim.LinkToGroup(childPrim);
|
parentPrim.LinkToGroup(childPrim);
|
||||||
// if (uf != (Byte)0)
|
|
||||||
// parent.RootPart.UpdateFlag = uf;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
parentPrim.TriggerScriptChangedEvent(Changed.LINK);
|
parentPrim.TriggerScriptChangedEvent(Changed.LINK);
|
||||||
|
@ -3701,7 +3697,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
parts.Remove(newRoot);
|
parts.Remove(newRoot);
|
||||||
foreach (SceneObjectPart part in parts)
|
foreach (SceneObjectPart part in parts)
|
||||||
{
|
{
|
||||||
part.UpdateFlag = 0;
|
// Required for linking
|
||||||
|
part.ClearUpdateSchedule();
|
||||||
newRoot.ParentGroup.LinkToGroup(part.ParentGroup);
|
newRoot.ParentGroup.LinkToGroup(part.ParentGroup);
|
||||||
}
|
}
|
||||||
newRoot.ParentGroup.HasGroupChanged = true;
|
newRoot.ParentGroup.HasGroupChanged = true;
|
||||||
|
|
|
@ -473,7 +473,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
// Grab the asset data from the response stream
|
// Grab the asset data from the response stream
|
||||||
using (MemoryStream stream = new MemoryStream())
|
using (MemoryStream stream = new MemoryStream())
|
||||||
{
|
{
|
||||||
responseStream.CopyTo(stream, Int32.MaxValue);
|
responseStream.CopyTo(stream, 4096);
|
||||||
asset.Data = stream.ToArray();
|
asset.Data = stream.ToArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue