diff options
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 29 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 12 |
3 files changed, 43 insertions, 16 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 4c69930..69ef9b4 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -948,7 +948,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
948 | public void LinkToGroup(SceneObjectGroup objectGroup) | 948 | public void LinkToGroup(SceneObjectGroup objectGroup) |
949 | { | 949 | { |
950 | if (objectGroup.RootPart.UpdateFlag > 0) | 950 | if (objectGroup.RootPart.UpdateFlag > 0) |
951 | { | ||
952 | // I've never actually seen this happen, though I think it's theoretically possible | ||
953 | m_log.ErrorFormat( | ||
954 | "[SCENE OBJECT GROUP]: Aborted linking {0}, {1} to {2}, {3} as it has yet to finish delinking", | ||
955 | objectGroup.RootPart.Name, objectGroup.RootPart.UUID, RootPart.Name, RootPart.UUID); | ||
956 | |||
951 | return; | 957 | return; |
958 | } | ||
959 | |||
960 | // m_log.DebugFormat( | ||
961 | // "[SCENE OBJECT GROUP]: Linking group with root part {0}, {1} to group with root part {2}, {3}", | ||
962 | // objectGroup.RootPart.Name, objectGroup.RootPart.UUID, RootPart.Name, RootPart.UUID); | ||
952 | 963 | ||
953 | SceneObjectPart linkPart = objectGroup.m_rootPart; | 964 | SceneObjectPart linkPart = objectGroup.m_rootPart; |
954 | 965 | ||
@@ -1017,13 +1028,25 @@ namespace OpenSim.Region.Environment.Scenes | |||
1017 | /// <param name="partID"></param> | 1028 | /// <param name="partID"></param> |
1018 | public void DelinkFromGroup(uint partID) | 1029 | public void DelinkFromGroup(uint partID) |
1019 | { | 1030 | { |
1031 | // Don't try and update if we're already in the middle of updating | ||
1020 | if (RootPart.UpdateFlag > 0) | 1032 | if (RootPart.UpdateFlag > 0) |
1033 | { | ||
1034 | // I've never actually seen this happen, though I think it's theoretically possible | ||
1035 | m_log.WarnFormat( | ||
1036 | "[SCENE OBJECT GROUP]: Aborted delink update for {0}, {1} as it has yet to finish linking", | ||
1037 | RootPart.Name, RootPart.UUID); | ||
1038 | |||
1021 | return; | 1039 | return; |
1040 | } | ||
1022 | 1041 | ||
1023 | SceneObjectPart linkPart = GetChildPart(partID); | 1042 | SceneObjectPart linkPart = GetChildPart(partID); |
1024 | 1043 | ||
1025 | if (null != linkPart) | 1044 | if (null != linkPart) |
1026 | { | 1045 | { |
1046 | // m_log.DebugFormat( | ||
1047 | // "[SCENE OBJECT GROUP]: Delinking part {0}, {1} from group with root part {2}, {3}", | ||
1048 | // linkPart.Name, linkPart.UUID, RootPart.Name, RootPart.UUID); | ||
1049 | |||
1027 | LLQuaternion worldRot = linkPart.GetWorldRotation(); | 1050 | LLQuaternion worldRot = linkPart.GetWorldRotation(); |
1028 | 1051 | ||
1029 | // Remove the part from this object | 1052 | // Remove the part from this object |
@@ -1645,7 +1668,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1645 | } | 1668 | } |
1646 | 1669 | ||
1647 | /// <summary> | 1670 | /// <summary> |
1648 | /// | 1671 | /// Send a full update to the client for the given part |
1649 | /// </summary> | 1672 | /// </summary> |
1650 | /// <param name="remoteClient"></param> | 1673 | /// <param name="remoteClient"></param> |
1651 | /// <param name="part"></param> | 1674 | /// <param name="part"></param> |
@@ -1662,7 +1685,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1662 | } | 1685 | } |
1663 | 1686 | ||
1664 | /// <summary> | 1687 | /// <summary> |
1665 | /// | 1688 | /// Send a terse update to the client for the given part |
1666 | /// </summary> | 1689 | /// </summary> |
1667 | /// <param name="remoteClient"></param> | 1690 | /// <param name="remoteClient"></param> |
1668 | /// <param name="part"></param> | 1691 | /// <param name="part"></param> |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 4fc688a..6a19eb6 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -270,7 +270,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
270 | m_groupPosition.Y = PhysActor.Position.Y; | 270 | m_groupPosition.Y = PhysActor.Position.Y; |
271 | m_groupPosition.Z = PhysActor.Position.Z; | 271 | m_groupPosition.Z = PhysActor.Position.Z; |
272 | } | 272 | } |
273 | |||
274 | return m_groupPosition; | 273 | return m_groupPosition; |
275 | } | 274 | } |
276 | set | 275 | set |
@@ -1116,7 +1115,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
1116 | 1115 | ||
1117 | int timeNow = Util.UnixTimeSinceEpoch(); | 1116 | int timeNow = Util.UnixTimeSinceEpoch(); |
1118 | 1117 | ||
1119 | if (timeNow == TimeStampFull) | 1118 | // If multiple updates are scheduled on the same second, we still need to perform all of them |
1119 | // So we'll force the issue by bumping up the timestamp so that later processing sees these need | ||
1120 | // to be peformed. | ||
1121 | if (timeNow <= TimeStampFull) | ||
1120 | { | 1122 | { |
1121 | TimeStampFull += 1; | 1123 | TimeStampFull += 1; |
1122 | } | 1124 | } |
@@ -1126,6 +1128,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
1126 | } | 1128 | } |
1127 | 1129 | ||
1128 | m_updateFlag = 2; | 1130 | m_updateFlag = 2; |
1131 | |||
1132 | // m_log.DebugFormat( | ||
1133 | // "[SCENE OBJECT PART]: Scheduling full update for {0}, {1} at {2}", | ||
1134 | // UUID, Name, TimeStampFull); | ||
1129 | } | 1135 | } |
1130 | 1136 | ||
1131 | public void AddFlag(LLObject.ObjectFlags flag) | 1137 | public void AddFlag(LLObject.ObjectFlags flag) |
@@ -1155,7 +1161,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1155 | } | 1161 | } |
1156 | 1162 | ||
1157 | /// <summary> | 1163 | /// <summary> |
1158 | /// | 1164 | /// Schedule a terse update for this prim. Terse updates only send position, |
1165 | /// rotation, velocity, rotational velocity and shape information. | ||
1159 | /// </summary> | 1166 | /// </summary> |
1160 | public void ScheduleTerseUpdate() | 1167 | public void ScheduleTerseUpdate() |
1161 | { | 1168 | { |
@@ -1169,6 +1176,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1169 | TimeStampTerse = (uint) Util.UnixTimeSinceEpoch(); | 1176 | TimeStampTerse = (uint) Util.UnixTimeSinceEpoch(); |
1170 | m_updateFlag = 1; | 1177 | m_updateFlag = 1; |
1171 | 1178 | ||
1179 | // m_log.DebugFormat( | ||
1180 | // "[SCENE OBJECT PART]: Scheduling terse update for {0}, {1} at {2}", | ||
1181 | // UUID, Name, TimeStampTerse); | ||
1172 | } | 1182 | } |
1173 | } | 1183 | } |
1174 | 1184 | ||
@@ -1836,7 +1846,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1836 | } | 1846 | } |
1837 | 1847 | ||
1838 | /// <summary> | 1848 | /// <summary> |
1839 | /// | 1849 | /// Send a terse update to the client. |
1840 | /// </summary> | 1850 | /// </summary> |
1841 | /// <param name="remoteClient"></param> | 1851 | /// <param name="remoteClient"></param> |
1842 | public void SendTerseUpdate(IClientAPI remoteClient) | 1852 | public void SendTerseUpdate(IClientAPI remoteClient) |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 44d2316..a3d528d 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -472,20 +472,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
472 | { | 472 | { |
473 | ScenePartUpdate update = m_updateTimes[part.UUID]; | 473 | ScenePartUpdate update = m_updateTimes[part.UUID]; |
474 | 474 | ||
475 | // Two updates can occur with the same timestamp (especially | 475 | // We deal with the possibility that two updates occur at the same unix time |
476 | // since our timestamp resolution is to the nearest second). Therefore, we still need | 476 | // at the update point itself. |
477 | // to send an update even if the last full update time is identical to the part's | ||
478 | // update timestamp. | ||
479 | // | ||
480 | // If we don't do this, various events (such as linking and delinking in the same | ||
481 | // second), will stop working properly! | ||
482 | if (update.LastFullUpdateTime < part.TimeStampFull) | 477 | if (update.LastFullUpdateTime < part.TimeStampFull) |
483 | { | 478 | { |
484 | // m_log.DebugFormat( | 479 | // m_log.DebugFormat( |
485 | // "[SCENE PRESENCE]: Fully updating prim {0}, {1} - part timestamp {2}", | 480 | // "[SCENE PRESENCE]: Fully updating prim {0}, {1} - part timestamp {2}", |
486 | // part.Name, part.UUID, part.TimeStampFull); | 481 | // part.Name, part.UUID, part.TimeStampFull); |
487 | 482 | ||
488 | //need to do a full update | ||
489 | part.SendFullUpdate(ControllingClient, GenerateClientFlags(part.UUID)); | 483 | part.SendFullUpdate(ControllingClient, GenerateClientFlags(part.UUID)); |
490 | 484 | ||
491 | // We'll update to the part's timestamp rather than the current time to | 485 | // We'll update to the part's timestamp rather than the current time to |
@@ -1658,7 +1652,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1658 | gdb.GodLevel = (byte)0; | 1652 | gdb.GodLevel = (byte)0; |
1659 | m_godlevel = 0; | 1653 | m_godlevel = 0; |
1660 | } | 1654 | } |
1661 | 1655 | ||
1662 | gdb.Token = token; | 1656 | gdb.Token = token; |
1663 | //respondPacket.AgentData = (GrantGodlikePowersPacket.AgentDataBlock)ablock; | 1657 | //respondPacket.AgentData = (GrantGodlikePowersPacket.AgentDataBlock)ablock; |
1664 | respondPacket.GrantData = gdb; | 1658 | respondPacket.GrantData = gdb; |