aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorJeff Ames2008-07-23 13:24:25 +0000
committerJeff Ames2008-07-23 13:24:25 +0000
commit80d8e2889e62d8900837d37a800a4eeaae5ffc5a (patch)
tree47bdf0f48ae8ace3bb7cd10ab91d91b52b96f80e /OpenSim/Region/Environment/Scenes
parentget rid of some LLQuaternion == null checks. Because LLQuaternion is (diff)
downloadopensim-SC_OLD-80d8e2889e62d8900837d37a800a4eeaae5ffc5a.zip
opensim-SC_OLD-80d8e2889e62d8900837d37a800a4eeaae5ffc5a.tar.gz
opensim-SC_OLD-80d8e2889e62d8900837d37a800a4eeaae5ffc5a.tar.bz2
opensim-SC_OLD-80d8e2889e62d8900837d37a800a4eeaae5ffc5a.tar.xz
Update svn properties. Formatting cleanup. Remove a compiler warning.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs10
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs30
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs58
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs2
5 files changed, 52 insertions, 50 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 399cbf6..7df70a0 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -1365,7 +1365,7 @@ namespace OpenSim.Region.Environment.Scenes
1365 // We need to explicitly resend the newly link prim's object properties since no other actions 1365 // We need to explicitly resend the newly link prim's object properties since no other actions
1366 // occur on link to invoke this elsewhere (such as object selection) 1366 // occur on link to invoke this elsewhere (such as object selection)
1367 parenPrim.TriggerScriptChangedEvent(Changed.LINK); 1367 parenPrim.TriggerScriptChangedEvent(Changed.LINK);
1368 if(client != null) 1368 if (client != null)
1369 parenPrim.GetProperties(client); 1369 parenPrim.GetProperties(client);
1370 else 1370 else
1371 { 1371 {
@@ -1426,13 +1426,13 @@ namespace OpenSim.Region.Environment.Scenes
1426 parenPrim.DelinkFromGroup(childPrimId, sendEvents); 1426 parenPrim.DelinkFromGroup(childPrimId, sendEvents);
1427 } 1427 }
1428 1428
1429 if(parenPrim.Children.Count == 1) 1429 if (parenPrim.Children.Count == 1)
1430 { 1430 {
1431 // The link set has been completely torn down 1431 // The link set has been completely torn down
1432 // This is the case if you select a link set and delink 1432 // This is the case if you select a link set and delink
1433 // 1433 //
1434 parenPrim.RootPart.LinkNum = 1; 1434 parenPrim.RootPart.LinkNum = 1;
1435 if(sendEvents) 1435 if (sendEvents)
1436 parenPrim.TriggerScriptChangedEvent(Changed.LINK); 1436 parenPrim.TriggerScriptChangedEvent(Changed.LINK);
1437 } 1437 }
1438 else 1438 else
@@ -1449,7 +1449,7 @@ namespace OpenSim.Region.Environment.Scenes
1449 1449
1450 // Tear down the remaining link set 1450 // Tear down the remaining link set
1451 // 1451 //
1452 if(unlink_ids.Count == 2) 1452 if (unlink_ids.Count == 2)
1453 { 1453 {
1454 DelinkObjects(unlink_ids, true); 1454 DelinkObjects(unlink_ids, true);
1455 return; 1455 return;
@@ -1494,7 +1494,7 @@ namespace OpenSim.Region.Environment.Scenes
1494 { 1494 {
1495 grp.DelinkFromGroup(primIds[i]); 1495 grp.DelinkFromGroup(primIds[i]);
1496 delinkedSomething = true; 1496 delinkedSomething = true;
1497 if(!parents.Contains(grp)) 1497 if (!parents.Contains(grp))
1498 parents.Add(grp); 1498 parents.Add(grp);
1499 } 1499 }
1500 1500
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 0cf2016..5caf0f0 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -1693,7 +1693,7 @@ namespace OpenSim.Region.Environment.Scenes
1693 } 1693 }
1694 1694
1695 // Finally remove the item, for reals this time. 1695 // Finally remove the item, for reals this time.
1696 if(permissionToDelete) 1696 if (permissionToDelete)
1697 DeleteSceneObject(objectGroup); 1697 DeleteSceneObject(objectGroup);
1698 } 1698 }
1699 1699
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index ae5a3c7..7ff5024 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -88,8 +88,8 @@ namespace OpenSim.Region.Environment.Scenes
88 /// Are we applying physics to any of the prims in this scene? 88 /// Are we applying physics to any of the prims in this scene?
89 /// </summary> 89 /// </summary>
90 public bool m_physicalPrim; 90 public bool m_physicalPrim;
91 public float m_maxNonphys = 65536; 91 public float m_maxNonphys = 65536;
92 public float m_maxPhys = 10; 92 public float m_maxPhys = 10;
93 93
94 public bool m_seeIntoRegionFromNeighbor; 94 public bool m_seeIntoRegionFromNeighbor;
95 public int MaxUndoCount = 5; 95 public int MaxUndoCount = 5;
@@ -272,7 +272,7 @@ namespace OpenSim.Region.Environment.Scenes
272 272
273 // Load region settings 273 // Load region settings
274 m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); 274 m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID);
275 if(m_storageManager.EstateDataStore != null) 275 if (m_storageManager.EstateDataStore != null)
276 m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID); 276 m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID);
277 277
278 278
@@ -311,16 +311,16 @@ namespace OpenSim.Region.Environment.Scenes
311 + " ChilTasks:" + m_seeIntoRegionFromNeighbor.ToString() 311 + " ChilTasks:" + m_seeIntoRegionFromNeighbor.ToString()
312 + " PhysPrim:" + m_physicalPrim.ToString(); 312 + " PhysPrim:" + m_physicalPrim.ToString();
313 313
314 try 314 try
315 { 315 {
316 IConfig startupConfig = m_config.Configs["Startup"]; 316 IConfig startupConfig = m_config.Configs["Startup"];
317 m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", 65536.0f); 317 m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", 65536.0f);
318 m_maxPhys = startupConfig.GetFloat("PhysicalPrimMax", 10.0f); 318 m_maxPhys = startupConfig.GetFloat("PhysicalPrimMax", 10.0f);
319 } 319 }
320 catch (Exception) 320 catch (Exception)
321 { 321 {
322 m_log.Warn("Failed to load StartupConfig"); 322 m_log.Warn("Failed to load StartupConfig");
323 } 323 }
324 324
325 } 325 }
326 326
@@ -2505,8 +2505,8 @@ namespace OpenSim.Region.Environment.Scenes
2505 /// <param name="capsObjectPath"></param> 2505 /// <param name="capsObjectPath"></param>
2506 public void AddCapsHandler(LLUUID agentId) 2506 public void AddCapsHandler(LLUUID agentId)
2507 { 2507 {
2508 if(RegionInfo.EstateSettings.IsBanned(agentId)) 2508 if (RegionInfo.EstateSettings.IsBanned(agentId))
2509 return; 2509 return;
2510 String capsObjectPath = GetCapsPath(agentId); 2510 String capsObjectPath = GetCapsPath(agentId);
2511 2511
2512 m_log.DebugFormat( 2512 m_log.DebugFormat(
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index c2ce9d8..87e69f7 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -427,7 +427,7 @@ namespace OpenSim.Region.Environment.Scenes
427 if (reader.Name == "SceneObjectPart") 427 if (reader.Name == "SceneObjectPart")
428 { 428 {
429 SceneObjectPart Part = SceneObjectPart.FromXml(reader); 429 SceneObjectPart Part = SceneObjectPart.FromXml(reader);
430 if(m_rootPart.LinkNum == 0) 430 if (m_rootPart.LinkNum == 0)
431 m_rootPart.LinkNum++; 431 m_rootPart.LinkNum++;
432 AddPart(Part); 432 AddPart(Part);
433 Part.LinkNum = m_parts.Count; 433 Part.LinkNum = m_parts.Count;
@@ -833,7 +833,7 @@ namespace OpenSim.Region.Environment.Scenes
833 833
834 part.LinkNum = m_parts.Count; 834 part.LinkNum = m_parts.Count;
835 835
836 if(part.LinkNum == 2 && RootPart != null) 836 if (part.LinkNum == 2 && RootPart != null)
837 RootPart.LinkNum = 1; 837 RootPart.LinkNum = 1;
838 } 838 }
839 } 839 }
@@ -1745,7 +1745,7 @@ namespace OpenSim.Region.Environment.Scenes
1745 linkPart.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w); 1745 linkPart.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w);
1746 1746
1747 linkPart.ParentID = m_rootPart.LocalId; 1747 linkPart.ParentID = m_rootPart.LocalId;
1748 if(m_rootPart.LinkNum == 0) 1748 if (m_rootPart.LinkNum == 0)
1749 m_rootPart.LinkNum = 1; 1749 m_rootPart.LinkNum = 1;
1750 1750
1751 lock (m_parts) 1751 lock (m_parts)
@@ -1815,13 +1815,15 @@ namespace OpenSim.Region.Environment.Scenes
1815 m_parts.Remove(linkPart.UUID); 1815 m_parts.Remove(linkPart.UUID);
1816 } 1816 }
1817 1817
1818 if(m_parts.Count == 1 && RootPart != null) //Single prim is left 1818 if (m_parts.Count == 1 && RootPart != null) //Single prim is left
1819 RootPart.LinkNum = 0; 1819 RootPart.LinkNum = 0;
1820 else 1820 else
1821 { 1821 {
1822 foreach (SceneObjectPart p in m_parts.Values) 1822 foreach (SceneObjectPart p in m_parts.Values)
1823 if(p.LinkNum > linkPart.LinkNum) 1823 {
1824 if (p.LinkNum > linkPart.LinkNum)
1824 p.LinkNum--; 1825 p.LinkNum--;
1826 }
1825 } 1827 }
1826 1828
1827 linkPart.ParentID = 0; 1829 linkPart.ParentID = 0;
@@ -1858,7 +1860,7 @@ namespace OpenSim.Region.Environment.Scenes
1858 1860
1859 m_scene.AddNewSceneObject(objectGroup, true); 1861 m_scene.AddNewSceneObject(objectGroup, true);
1860 1862
1861 if(sendEvents) 1863 if (sendEvents)
1862 linkPart.TriggerScriptChangedEvent(Changed.LINK); 1864 linkPart.TriggerScriptChangedEvent(Changed.LINK);
1863 1865
1864 HasGroupChanged = true; 1866 HasGroupChanged = true;
@@ -2131,11 +2133,11 @@ namespace OpenSim.Region.Environment.Scenes
2131 /// <param name="localID"></param> 2133 /// <param name="localID"></param>
2132 public void Resize(LLVector3 scale, uint localID) 2134 public void Resize(LLVector3 scale, uint localID)
2133 { 2135 {
2134 if(scale.X > m_scene.m_maxNonphys) 2136 if (scale.X > m_scene.m_maxNonphys)
2135 scale.X = m_scene.m_maxNonphys; 2137 scale.X = m_scene.m_maxNonphys;
2136 if(scale.Y > m_scene.m_maxNonphys) 2138 if (scale.Y > m_scene.m_maxNonphys)
2137 scale.Y = m_scene.m_maxNonphys; 2139 scale.Y = m_scene.m_maxNonphys;
2138 if(scale.Z > m_scene.m_maxNonphys) 2140 if (scale.Z > m_scene.m_maxNonphys)
2139 scale.Z = m_scene.m_maxNonphys; 2141 scale.Z = m_scene.m_maxNonphys;
2140 2142
2141 SceneObjectPart part = GetChildPart(localID); 2143 SceneObjectPart part = GetChildPart(localID);
@@ -2144,13 +2146,13 @@ namespace OpenSim.Region.Environment.Scenes
2144 part.Resize(scale); 2146 part.Resize(scale);
2145 if (part.PhysActor != null) 2147 if (part.PhysActor != null)
2146 { 2148 {
2147 if(part.PhysActor.IsPhysical) 2149 if (part.PhysActor.IsPhysical)
2148 { 2150 {
2149 if(scale.X > m_scene.m_maxPhys) 2151 if (scale.X > m_scene.m_maxPhys)
2150 scale.X = m_scene.m_maxPhys; 2152 scale.X = m_scene.m_maxPhys;
2151 if(scale.Y > m_scene.m_maxPhys) 2153 if (scale.Y > m_scene.m_maxPhys)
2152 scale.Y = m_scene.m_maxPhys; 2154 scale.Y = m_scene.m_maxPhys;
2153 if(scale.Z > m_scene.m_maxPhys) 2155 if (scale.Z > m_scene.m_maxPhys)
2154 scale.Z = m_scene.m_maxPhys; 2156 scale.Z = m_scene.m_maxPhys;
2155 } 2157 }
2156 part.PhysActor.Size = 2158 part.PhysActor.Size =
@@ -2179,19 +2181,19 @@ namespace OpenSim.Region.Environment.Scenes
2179 SceneObjectPart part = GetChildPart(localID); 2181 SceneObjectPart part = GetChildPart(localID);
2180 if (part != null) 2182 if (part != null)
2181 { 2183 {
2182 if(scale.X > m_scene.m_maxNonphys) 2184 if (scale.X > m_scene.m_maxNonphys)
2183 scale.X = m_scene.m_maxNonphys; 2185 scale.X = m_scene.m_maxNonphys;
2184 if(scale.Y > m_scene.m_maxNonphys) 2186 if (scale.Y > m_scene.m_maxNonphys)
2185 scale.Y = m_scene.m_maxNonphys; 2187 scale.Y = m_scene.m_maxNonphys;
2186 if(scale.Z > m_scene.m_maxNonphys) 2188 if (scale.Z > m_scene.m_maxNonphys)
2187 scale.Z = m_scene.m_maxNonphys; 2189 scale.Z = m_scene.m_maxNonphys;
2188 if(part.PhysActor != null && part.PhysActor.IsPhysical) 2190 if (part.PhysActor != null && part.PhysActor.IsPhysical)
2189 { 2191 {
2190 if(scale.X > m_scene.m_maxPhys) 2192 if (scale.X > m_scene.m_maxPhys)
2191 scale.X = m_scene.m_maxPhys; 2193 scale.X = m_scene.m_maxPhys;
2192 if(scale.Y > m_scene.m_maxPhys) 2194 if (scale.Y > m_scene.m_maxPhys)
2193 scale.Y = m_scene.m_maxPhys; 2195 scale.Y = m_scene.m_maxPhys;
2194 if(scale.Z > m_scene.m_maxPhys) 2196 if (scale.Z > m_scene.m_maxPhys)
2195 scale.Z = m_scene.m_maxPhys; 2197 scale.Z = m_scene.m_maxPhys;
2196 } 2198 }
2197 float x = (scale.X / part.Scale.X); 2199 float x = (scale.X / part.Scale.X);
@@ -2200,7 +2202,7 @@ namespace OpenSim.Region.Environment.Scenes
2200 2202
2201 lock (m_parts) 2203 lock (m_parts)
2202 { 2204 {
2203 if(x > 1.0f || y > 1.0f || z > 1.0f) 2205 if (x > 1.0f || y > 1.0f || z > 1.0f)
2204 { 2206 {
2205 foreach (SceneObjectPart obPart in m_parts.Values) 2207 foreach (SceneObjectPart obPart in m_parts.Values)
2206 { 2208 {
@@ -2211,9 +2213,9 @@ namespace OpenSim.Region.Environment.Scenes
2211 float f = 1.0f; 2213 float f = 1.0f;
2212 float a = 1.0f; 2214 float a = 1.0f;
2213 2215
2214 if(part.PhysActor != null && part.PhysActor.IsPhysical) 2216 if (part.PhysActor != null && part.PhysActor.IsPhysical)
2215 { 2217 {
2216 if(oldSize.X*x > m_scene.m_maxPhys) 2218 if (oldSize.X*x > m_scene.m_maxPhys)
2217 { 2219 {
2218 f = m_scene.m_maxPhys / oldSize.X; 2220 f = m_scene.m_maxPhys / oldSize.X;
2219 a = f / x; 2221 a = f / x;
@@ -2221,7 +2223,7 @@ namespace OpenSim.Region.Environment.Scenes
2221 y *= a; 2223 y *= a;
2222 z *= a; 2224 z *= a;
2223 } 2225 }
2224 if(oldSize.Y*y > m_scene.m_maxPhys) 2226 if (oldSize.Y*y > m_scene.m_maxPhys)
2225 { 2227 {
2226 f = m_scene.m_maxPhys / oldSize.Y; 2228 f = m_scene.m_maxPhys / oldSize.Y;
2227 a = f / y; 2229 a = f / y;
@@ -2229,7 +2231,7 @@ namespace OpenSim.Region.Environment.Scenes
2229 y *= a; 2231 y *= a;
2230 z *= a; 2232 z *= a;
2231 } 2233 }
2232 if(oldSize.Z*z > m_scene.m_maxPhys) 2234 if (oldSize.Z*z > m_scene.m_maxPhys)
2233 { 2235 {
2234 f = m_scene.m_maxPhys / oldSize.Z; 2236 f = m_scene.m_maxPhys / oldSize.Z;
2235 a = f / z; 2237 a = f / z;
@@ -2240,7 +2242,7 @@ namespace OpenSim.Region.Environment.Scenes
2240 } 2242 }
2241 else 2243 else
2242 { 2244 {
2243 if(oldSize.X*x > m_scene.m_maxNonphys) 2245 if (oldSize.X*x > m_scene.m_maxNonphys)
2244 { 2246 {
2245 f = m_scene.m_maxNonphys / oldSize.X; 2247 f = m_scene.m_maxNonphys / oldSize.X;
2246 a = f / x; 2248 a = f / x;
@@ -2248,7 +2250,7 @@ namespace OpenSim.Region.Environment.Scenes
2248 y *= a; 2250 y *= a;
2249 z *= a; 2251 z *= a;
2250 } 2252 }
2251 if(oldSize.Y*y > m_scene.m_maxNonphys) 2253 if (oldSize.Y*y > m_scene.m_maxNonphys)
2252 { 2254 {
2253 f = m_scene.m_maxNonphys / oldSize.Y; 2255 f = m_scene.m_maxNonphys / oldSize.Y;
2254 a = f / y; 2256 a = f / y;
@@ -2256,7 +2258,7 @@ namespace OpenSim.Region.Environment.Scenes
2256 y *= a; 2258 y *= a;
2257 z *= a; 2259 z *= a;
2258 } 2260 }
2259 if(oldSize.Z*z > m_scene.m_maxNonphys) 2261 if (oldSize.Z*z > m_scene.m_maxNonphys)
2260 { 2262 {
2261 f = m_scene.m_maxNonphys / oldSize.Z; 2263 f = m_scene.m_maxNonphys / oldSize.Z;
2262 a = f / z; 2264 a = f / z;
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 156310b..ac7e8a2 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -2245,7 +2245,7 @@ namespace OpenSim.Region.Environment.Scenes
2245 public void SetAvatarOnSitTarget(LLUUID avatarID) 2245 public void SetAvatarOnSitTarget(LLUUID avatarID)
2246 { 2246 {
2247 m_sitTargetAvatar = avatarID; 2247 m_sitTargetAvatar = avatarID;
2248 if(ParentGroup != null) 2248 if (ParentGroup != null)
2249 ParentGroup.TriggerScriptChangedEvent(Changed.LINK); 2249 ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
2250 } 2250 }
2251 2251