aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-07-12 21:03:12 +0000
committerJustin Clarke Casey2008-07-12 21:03:12 +0000
commit000d5e8b93c865f7be21717a52a5a897b0ce3344 (patch)
tree742cb284ff2fb3f20fa158fc0258fdd4e9b9e41f /OpenSim/Region/Environment
parent* refactor: Move xml/archive loading and saving code into separate methods re... (diff)
downloadopensim-SC-000d5e8b93c865f7be21717a52a5a897b0ce3344.zip
opensim-SC-000d5e8b93c865f7be21717a52a5a897b0ce3344.tar.gz
opensim-SC-000d5e8b93c865f7be21717a52a5a897b0ce3344.tar.bz2
opensim-SC-000d5e8b93c865f7be21717a52a5a897b0ce3344.tar.xz
* minor: just some null guards and name changes to make it clearer that prim count is actually a prim local id dispenser
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs15
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs1
3 files changed, 12 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index d6bbb1f..a0df9a1 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -72,8 +72,12 @@ namespace OpenSim.Region.Environment.Scenes
72 72
73 public InnerScene m_innerScene; 73 public InnerScene m_innerScene;
74 74
75 // private Random Rand = new Random(); 75 /// <summary>
76 private uint _primCount = 720000; 76 /// The last allocated local prim id. When a new local id is requested, the next number in the sequence is
77 /// dispenced.
78 /// </summary>
79 private uint m_localId = 720000;
80
77 private readonly Mutex _primAllocateMutex = new Mutex(false); 81 private readonly Mutex _primAllocateMutex = new Mutex(false);
78 82
79 private int m_timePhase = 24; 83 private int m_timePhase = 24;
@@ -1493,16 +1497,15 @@ namespace OpenSim.Region.Environment.Scenes
1493 } 1497 }
1494 1498
1495 /// <summary> 1499 /// <summary>
1496 /// Returns a new unallocated primitive ID 1500 /// Returns a new unallocated local primitive ID
1497 /// </summary> 1501 /// </summary>
1498 /// <returns>A brand new primitive ID</returns> 1502 /// <returns>A brand new local primitive ID</returns>
1499 public uint PrimIDAllocate() 1503 public uint PrimIDAllocate()
1500 { 1504 {
1501 uint myID; 1505 uint myID;
1502 1506
1503 _primAllocateMutex.WaitOne(); 1507 _primAllocateMutex.WaitOne();
1504 ++_primCount; 1508 myID = ++m_localId;
1505 myID = _primCount;
1506 _primAllocateMutex.ReleaseMutex(); 1509 _primAllocateMutex.ReleaseMutex();
1507 1510
1508 return myID; 1511 return myID;
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index 0b48464..005d872 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -182,10 +182,10 @@ namespace OpenSim.Region.Environment.Scenes
182 } 182 }
183 else 183 else
184 { 184 {
185 m_taskInventory[item.ItemID].PermsMask = 0; 185 m_taskInventory[item.ItemID].PermsMask = 0;
186 m_taskInventory[item.ItemID].PermsGranter = LLUUID.Zero; 186 m_taskInventory[item.ItemID].PermsGranter = LLUUID.Zero;
187 string script = Helpers.FieldToUTF8String(asset.Data); 187 string script = Helpers.FieldToUTF8String(asset.Data);
188 m_parentGroup.Scene.EventManager.TriggerRezScript(LocalId,item.ItemID,script, startParam, postOnRez); 188 m_parentGroup.Scene.EventManager.TriggerRezScript(LocalId, item.ItemID,script, startParam, postOnRez);
189 m_parentGroup.AddActiveScriptCount(1); 189 m_parentGroup.AddActiveScriptCount(1);
190 ScheduleFullUpdate(); 190 ScheduleFullUpdate();
191 } 191 }
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 685a3d5..8bf8575 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -141,7 +141,6 @@ namespace OpenSim.Region.Environment.Scenes
141 public uint m_attachmentPoint = (byte)0; 141 public uint m_attachmentPoint = (byte)0;
142 [XmlIgnore] 142 [XmlIgnore]
143 public PhysicsVector m_rotationAxis = new PhysicsVector(1f,1f,1f); 143 public PhysicsVector m_rotationAxis = new PhysicsVector(1f,1f,1f);
144
145 144
146 [XmlIgnore] 145 [XmlIgnore]
147 public bool m_undoing = false; 146 public bool m_undoing = false;