diff options
author | Melanie | 2012-11-17 02:58:14 +0000 |
---|---|---|
committer | Melanie | 2012-11-17 02:58:14 +0000 |
commit | 7ad082f7c39ba82adeae3c25ca0befcf983c879d (patch) | |
tree | 0e3c488c65ef22b53e4536dd07f46c1467b58f78 /OpenSim/Region/OptionalModules | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Prevent a buffer overflow in asset receiving (diff) | |
download | opensim-SC-7ad082f7c39ba82adeae3c25ca0befcf983c879d.zip opensim-SC-7ad082f7c39ba82adeae3c25ca0befcf983c879d.tar.gz opensim-SC-7ad082f7c39ba82adeae3c25ca0befcf983c879d.tar.bz2 opensim-SC-7ad082f7c39ba82adeae3c25ca0befcf983c879d.tar.xz |
Merge branch 'avination' into careminster
Diffstat (limited to 'OpenSim/Region/OptionalModules')
3 files changed, 21 insertions, 14 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index c363fd3..254eeb4 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -873,6 +873,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
873 | public event MuteListEntryRemove OnRemoveMuteListEntry; | 873 | public event MuteListEntryRemove OnRemoveMuteListEntry; |
874 | public event GodlikeMessage onGodlikeMessage; | 874 | public event GodlikeMessage onGodlikeMessage; |
875 | public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; | 875 | public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; |
876 | public event GenericCall2 OnUpdateThrottles; | ||
876 | 877 | ||
877 | #pragma warning restore 67 | 878 | #pragma warning restore 67 |
878 | 879 | ||
diff --git a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs index 59ff9b8..39cabb5 100644 --- a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs +++ b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs | |||
@@ -121,34 +121,40 @@ namespace OpenSim.Region.OptionalModules | |||
121 | 121 | ||
122 | private bool CanObjectEnter(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene) | 122 | private bool CanObjectEnter(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene) |
123 | { | 123 | { |
124 | if ((newPoint.X > 257f || newPoint.X < -1f || newPoint.Y > 257f || newPoint.Y < -1f)) | 124 | if (newPoint.X < -1f || newPoint.X > (float)(Constants.RegionSize + 1) || |
125 | newPoint.Y < -1f || newPoint.Y > (float)(Constants.RegionSize + 1)) | ||
125 | return true; | 126 | return true; |
126 | 127 | ||
127 | SceneObjectPart obj = scene.GetSceneObjectPart(objectID); | 128 | SceneObjectPart obj = scene.GetSceneObjectPart(objectID); |
128 | Vector3 oldPoint = obj.GroupPosition; | 129 | |
129 | int objectCount = obj.ParentGroup.PrimCount; | 130 | if (obj == null) |
130 | ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y); | 131 | return false; |
132 | |||
133 | // Prim counts are determined by the location of the root prim. if we're | ||
134 | // moving a child prim, just let it pass | ||
135 | if (!obj.IsRoot) | ||
136 | { | ||
137 | return true; | ||
138 | } | ||
139 | |||
131 | ILandObject newParcel = scene.LandChannel.GetLandObject(newPoint.X, newPoint.Y); | 140 | ILandObject newParcel = scene.LandChannel.GetLandObject(newPoint.X, newPoint.Y); |
132 | 141 | ||
133 | if (newParcel == null) | 142 | if (newParcel == null) |
134 | return true; | 143 | return true; |
135 | 144 | ||
136 | int usedPrims = newParcel.PrimCounts.Total; | 145 | Vector3 oldPoint = obj.GroupPosition; |
137 | int simulatorCapacity = newParcel.GetSimulatorMaxPrimCount(); | 146 | ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y); |
138 | 147 | ||
139 | // The prim hasn't crossed a region boundry so we don't need to worry | 148 | // The prim hasn't crossed a region boundry so we don't need to worry |
140 | // about prim counts here | 149 | // about prim counts here |
141 | if(oldParcel.Equals(newParcel)) | 150 | if(oldParcel != null && oldParcel.Equals(newParcel)) |
142 | { | 151 | { |
143 | return true; | 152 | return true; |
144 | } | 153 | } |
145 | 154 | ||
146 | // Prim counts are determined by the location of the root prim. if we're | 155 | int objectCount = obj.ParentGroup.PrimCount; |
147 | // moving a child prim, just let it pass | 156 | int usedPrims = newParcel.PrimCounts.Total; |
148 | if(!obj.IsRoot) | 157 | int simulatorCapacity = newParcel.GetSimulatorMaxPrimCount(); |
149 | { | ||
150 | return true; | ||
151 | } | ||
152 | 158 | ||
153 | // TODO: Add Special Case here for temporary prims | 159 | // TODO: Add Special Case here for temporary prims |
154 | 160 | ||
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 5471afa..3a03101 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -473,7 +473,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
473 | public event MuteListEntryRemove OnRemoveMuteListEntry; | 473 | public event MuteListEntryRemove OnRemoveMuteListEntry; |
474 | public event GodlikeMessage onGodlikeMessage; | 474 | public event GodlikeMessage onGodlikeMessage; |
475 | public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; | 475 | public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; |
476 | 476 | public event GenericCall2 OnUpdateThrottles; | |
477 | #pragma warning restore 67 | 477 | #pragma warning restore 67 |
478 | 478 | ||
479 | #endregion | 479 | #endregion |