diff options
author | UbitUmarov | 2015-09-01 14:54:35 +0100 |
---|---|---|
committer | UbitUmarov | 2015-09-01 14:54:35 +0100 |
commit | 371c9dd2af01a2e7422ec901ee1f80757284a78c (patch) | |
tree | 058d2a513cacb12efcce0c0df0ae14ad135dbfe2 /OpenSim/Region/OptionalModules/PrimLimitsModule | |
parent | remove lixo (diff) | |
parent | dont change camera on crossings (diff) | |
download | opensim-SC_OLD-371c9dd2af01a2e7422ec901ee1f80757284a78c.zip opensim-SC_OLD-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.gz opensim-SC_OLD-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.bz2 opensim-SC_OLD-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.xz |
bad merge?
Diffstat (limited to 'OpenSim/Region/OptionalModules/PrimLimitsModule')
-rw-r--r-- | OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs index 395bbf1..d3c46c9 100644 --- a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs +++ b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs | |||
@@ -135,31 +135,50 @@ namespace OpenSim.Region.OptionalModules | |||
135 | 135 | ||
136 | private bool CanObjectEnter(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene) | 136 | private bool CanObjectEnter(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene) |
137 | { | 137 | { |
138 | if (newPoint.X < -1f || newPoint.X > (scene.RegionInfo.RegionSizeX + 1) || | ||
139 | newPoint.Y < -1f || newPoint.Y > (scene.RegionInfo.RegionSizeY) ) | ||
140 | return true; | ||
141 | |||
138 | SceneObjectPart obj = scene.GetSceneObjectPart(objectID); | 142 | SceneObjectPart obj = scene.GetSceneObjectPart(objectID); |
139 | Vector3 oldPoint = obj.GroupPosition; | 143 | |
140 | int objectCount = obj.ParentGroup.PrimCount; | 144 | if (obj == null) |
141 | ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y); | 145 | return false; |
146 | |||
147 | // Prim counts are determined by the location of the root prim. if we're | ||
148 | // moving a child prim, just let it pass | ||
149 | if (!obj.IsRoot) | ||
150 | { | ||
151 | return true; | ||
152 | } | ||
153 | |||
142 | ILandObject newParcel = scene.LandChannel.GetLandObject(newPoint.X, newPoint.Y); | 154 | ILandObject newParcel = scene.LandChannel.GetLandObject(newPoint.X, newPoint.Y); |
143 | 155 | ||
156 | <<<<<<< HEAD | ||
144 | // newParcel will be null only if it outside of our current region. If this is the case, then the | 157 | // newParcel will be null only if it outside of our current region. If this is the case, then the |
145 | // receiving permissions will perform the check. | 158 | // receiving permissions will perform the check. |
146 | if (newParcel == null) | 159 | if (newParcel == null) |
147 | return true; | 160 | return true; |
148 | 161 | ||
149 | // The prim hasn't crossed a region boundary so we don't need to worry | 162 | // The prim hasn't crossed a region boundary so we don't need to worry |
150 | // about prim counts here | 163 | ======= |
151 | if(oldParcel.Equals(newParcel)) | 164 | if (newParcel == null) |
152 | { | ||
153 | return true; | 165 | return true; |
154 | } | ||
155 | 166 | ||
156 | // Prim counts are determined by the location of the root prim. if we're | 167 | Vector3 oldPoint = obj.GroupPosition; |
157 | // moving a child prim, just let it pass | 168 | ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y); |
158 | if(!obj.IsRoot) | 169 | |
170 | // The prim hasn't crossed a region boundry so we don't need to worry | ||
171 | >>>>>>> avn/ubitvar | ||
172 | // about prim counts here | ||
173 | if(oldParcel != null && oldParcel.Equals(newParcel)) | ||
159 | { | 174 | { |
160 | return true; | 175 | return true; |
161 | } | 176 | } |
162 | 177 | ||
178 | int objectCount = obj.ParentGroup.PrimCount; | ||
179 | int usedPrims = newParcel.PrimCounts.Total; | ||
180 | int simulatorCapacity = newParcel.GetSimulatorMaxPrimCount(); | ||
181 | |||
163 | // TODO: Add Special Case here for temporary prims | 182 | // TODO: Add Special Case here for temporary prims |
164 | 183 | ||
165 | string response = DoCommonChecks(objectCount, obj.OwnerID, newParcel, scene); | 184 | string response = DoCommonChecks(objectCount, obj.OwnerID, newParcel, scene); |