aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs15
-rw-r--r--OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs32
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs4
3 files changed, 31 insertions, 20 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index ee61de6..e94ecee 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Region.Framework.Scenes
112 private long timeLastChanged = 0; 112 private long timeLastChanged = 0;
113 private long m_maxPersistTime = 0; 113 private long m_maxPersistTime = 0;
114 private long m_minPersistTime = 0; 114 private long m_minPersistTime = 0;
115 private Random m_rand; 115// private Random m_rand;
116 private List<ScenePresence> m_linkedAvatars = new List<ScenePresence>(); 116 private List<ScenePresence> m_linkedAvatars = new List<ScenePresence>();
117 117
118 /// <summary> 118 /// <summary>
@@ -130,6 +130,7 @@ namespace OpenSim.Region.Framework.Scenes
130 { 130 {
131 if (value) 131 if (value)
132 { 132 {
133
133 if (m_isBackedUp) 134 if (m_isBackedUp)
134 { 135 {
135 m_scene.SceneGraph.FireChangeBackup(this); 136 m_scene.SceneGraph.FireChangeBackup(this);
@@ -139,19 +140,21 @@ namespace OpenSim.Region.Framework.Scenes
139 timeFirstChanged = DateTime.Now.Ticks; 140 timeFirstChanged = DateTime.Now.Ticks;
140 if (m_rootPart != null && m_rootPart.UUID != null && m_scene != null) 141 if (m_rootPart != null && m_rootPart.UUID != null && m_scene != null)
141 { 142 {
143/*
142 if (m_rand == null) 144 if (m_rand == null)
143 { 145 {
144 byte[] val = new byte[16]; 146 byte[] val = new byte[16];
145 m_rootPart.UUID.ToBytes(val, 0); 147 m_rootPart.UUID.ToBytes(val, 0);
146 m_rand = new Random(BitConverter.ToInt32(val, 0)); 148 m_rand = new Random(BitConverter.ToInt32(val, 0));
147 } 149 }
148 150 */
149 if (m_scene.GetRootAgentCount() == 0) 151 if (m_scene.GetRootAgentCount() == 0)
150 { 152 {
151 //If the region is empty, this change has been made by an automated process 153 //If the region is empty, this change has been made by an automated process
152 //and thus we delay the persist time by a random amount between 1.5 and 2.5. 154 //and thus we delay the persist time by a random amount between 1.5 and 2.5.
153 155
154 float factor = 1.5f + (float)(m_rand.NextDouble()); 156// float factor = 1.5f + (float)(m_rand.NextDouble());
157 float factor = 2.0f;
155 m_maxPersistTime = (long)((float)m_scene.m_persistAfter * factor); 158 m_maxPersistTime = (long)((float)m_scene.m_persistAfter * factor);
156 m_minPersistTime = (long)((float)m_scene.m_dontPersistBefore * factor); 159 m_minPersistTime = (long)((float)m_scene.m_dontPersistBefore * factor);
157 } 160 }
@@ -159,8 +162,10 @@ namespace OpenSim.Region.Framework.Scenes
159 { 162 {
160 //If the region is not empty, we want to obey the minimum and maximum persist times 163 //If the region is not empty, we want to obey the minimum and maximum persist times
161 //but add a random factor so we stagger the object persistance a little 164 //but add a random factor so we stagger the object persistance a little
162 m_maxPersistTime = (long)((float)m_scene.m_persistAfter * (1.0d - (m_rand.NextDouble() / 5.0d))); //Multiply by 1.0-1.5 165// m_maxPersistTime = (long)((float)m_scene.m_persistAfter * (1.0d - (m_rand.NextDouble() / 5.0d))); //Multiply by 1.0-1.5
163 m_minPersistTime = (long)((float)m_scene.m_dontPersistBefore * (1.0d + (m_rand.NextDouble() / 2.0d))); //Multiply by 0.8-1.0 166// m_minPersistTime = (long)((float)m_scene.m_dontPersistBefore * (1.0d + (m_rand.NextDouble() / 2.0d))); //Multiply by 0.8-1.0
167 m_maxPersistTime = m_scene.m_persistAfter;
168 m_minPersistTime = m_scene.m_dontPersistBefore;
164 } 169 }
165 } 170 }
166 } 171 }
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/Physics/UbitOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
index 76e42d4..dc247a9 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
@@ -1403,8 +1403,8 @@ namespace OpenSim.Region.Physics.OdePlugin
1403 1403
1404 if (vertexCount == 0 || indexCount == 0) 1404 if (vertexCount == 0 || indexCount == 0)
1405 { 1405 {
1406 m_log.WarnFormat("[PHYSICS]: Invalid mesh data on OdePrim {0}, mesh {1}", 1406 m_log.WarnFormat("[PHYSICS]: Invalid mesh data on OdePrim {0}, mesh {1} at {2}",
1407 Name, _pbs.SculptEntry ? _pbs.SculptTexture.ToString() : "primMesh"); 1407 Name, _pbs.SculptEntry ? _pbs.SculptTexture.ToString() : "primMesh",_position.ToString());
1408 1408
1409 m_hasOBB = false; 1409 m_hasOBB = false;
1410 m_OBBOffset = Vector3.Zero; 1410 m_OBBOffset = Vector3.Zero;