diff options
author | lbsa71 | 2007-07-26 14:55:42 +0000 |
---|---|---|
committer | lbsa71 | 2007-07-26 14:55:42 +0000 |
commit | 39b64564dca0e5cb57a2a8e1b60979ccaaf11ef6 (patch) | |
tree | 81ab89a9749577c6fa1a3a19c1ed09c1942ec201 /OpenSim/Region/Environment/Scenes | |
parent | Added the default shape to the OpenSim library. Now need to get the new ruth ... (diff) | |
download | opensim-SC_OLD-39b64564dca0e5cb57a2a8e1b60979ccaaf11ef6.zip opensim-SC_OLD-39b64564dca0e5cb57a2a8e1b60979ccaaf11ef6.tar.gz opensim-SC_OLD-39b64564dca0e5cb57a2a8e1b60979ccaaf11ef6.tar.bz2 opensim-SC_OLD-39b64564dca0e5cb57a2a8e1b60979ccaaf11ef6.tar.xz |
* Started renaming world to Scene
* Update and UpdateMovement now first stores array to avoid collection update exceptions
* Ignored some bins
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Entity.cs | 26 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/EntityBase.cs | 47 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Primitive.cs | 29 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 24 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneBase.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObject.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 22 |
7 files changed, 65 insertions, 95 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Entity.cs b/OpenSim/Region/Environment/Scenes/Entity.cs index 2456a4e..204b68f 100644 --- a/OpenSim/Region/Environment/Scenes/Entity.cs +++ b/OpenSim/Region/Environment/Scenes/Entity.cs | |||
@@ -31,8 +31,8 @@ using OpenSim.Physics.Manager; | |||
31 | 31 | ||
32 | namespace OpenSim.Region.Environment.Scenes | 32 | namespace OpenSim.Region.Environment.Scenes |
33 | { | 33 | { |
34 | public abstract class Entity :EntityBase //this class (Entity) will be phased out | 34 | public abstract class Entity : EntityBase //this class (Entity) will be phased out |
35 | { | 35 | { |
36 | protected PhysicsActor _physActor; | 36 | protected PhysicsActor _physActor; |
37 | 37 | ||
38 | /// <summary> | 38 | /// <summary> |
@@ -42,7 +42,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
42 | { | 42 | { |
43 | get | 43 | get |
44 | { | 44 | { |
45 | if (this._physActor != null) | 45 | if (_physActor != null) |
46 | { | 46 | { |
47 | m_pos.X = _physActor.Position.X; | 47 | m_pos.X = _physActor.Position.X; |
48 | m_pos.Y = _physActor.Position.Y; | 48 | m_pos.Y = _physActor.Position.Y; |
@@ -53,14 +53,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
53 | } | 53 | } |
54 | set | 54 | set |
55 | { | 55 | { |
56 | if (this._physActor != null) | 56 | if (_physActor != null) |
57 | { | 57 | { |
58 | try | 58 | try |
59 | { | 59 | { |
60 | lock (this.m_world.SyncRoot) | 60 | lock (m_scene.SyncRoot) |
61 | { | 61 | { |
62 | 62 | _physActor.Position = new PhysicsVector(value.X, value.Y, value.Z); | |
63 | this._physActor.Position = new PhysicsVector(value.X, value.Y, value.Z); | ||
64 | } | 63 | } |
65 | } | 64 | } |
66 | catch (Exception e) | 65 | catch (Exception e) |
@@ -73,7 +72,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
73 | } | 72 | } |
74 | } | 73 | } |
75 | 74 | ||
76 | 75 | ||
77 | /// <summary> | 76 | /// <summary> |
78 | /// | 77 | /// |
79 | /// </summary> | 78 | /// </summary> |
@@ -81,7 +80,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
81 | { | 80 | { |
82 | get | 81 | get |
83 | { | 82 | { |
84 | if (this._physActor != null) | 83 | if (_physActor != null) |
85 | { | 84 | { |
86 | m_velocity.X = _physActor.Velocity.X; | 85 | m_velocity.X = _physActor.Velocity.X; |
87 | m_velocity.Y = _physActor.Velocity.Y; | 86 | m_velocity.Y = _physActor.Velocity.Y; |
@@ -92,14 +91,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
92 | } | 91 | } |
93 | set | 92 | set |
94 | { | 93 | { |
95 | if (this._physActor != null) | 94 | if (_physActor != null) |
96 | { | 95 | { |
97 | try | 96 | try |
98 | { | 97 | { |
99 | lock (this.m_world.SyncRoot) | 98 | lock (m_scene.SyncRoot) |
100 | { | 99 | { |
101 | 100 | _physActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z); | |
102 | this._physActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z); | ||
103 | } | 101 | } |
104 | } | 102 | } |
105 | catch (Exception e) | 103 | catch (Exception e) |
@@ -112,4 +110,4 @@ namespace OpenSim.Region.Environment.Scenes | |||
112 | } | 110 | } |
113 | } | 111 | } |
114 | } | 112 | } |
115 | } | 113 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs index 0d1e3fc..08f13c2 100644 --- a/OpenSim/Region/Environment/Scenes/EntityBase.cs +++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs | |||
@@ -11,7 +11,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
11 | protected List<EntityBase> m_children; | 11 | protected List<EntityBase> m_children; |
12 | 12 | ||
13 | 13 | ||
14 | protected Scene m_world; | 14 | protected Scene m_scene; |
15 | protected string m_name; | 15 | protected string m_name; |
16 | 16 | ||
17 | /// <summary> | 17 | /// <summary> |
@@ -24,19 +24,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
24 | } | 24 | } |
25 | 25 | ||
26 | protected LLVector3 m_pos; | 26 | protected LLVector3 m_pos; |
27 | |||
27 | /// <summary> | 28 | /// <summary> |
28 | /// | 29 | /// |
29 | /// </summary> | 30 | /// </summary> |
30 | public virtual LLVector3 Pos | 31 | public virtual LLVector3 Pos |
31 | { | 32 | { |
32 | get | 33 | get { return m_pos; } |
33 | { | 34 | set { m_pos = value; } |
34 | return m_pos; | ||
35 | } | ||
36 | set | ||
37 | { | ||
38 | m_pos = value; | ||
39 | } | ||
40 | } | 35 | } |
41 | 36 | ||
42 | public LLVector3 m_velocity; | 37 | public LLVector3 m_velocity; |
@@ -46,28 +41,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
46 | /// </summary> | 41 | /// </summary> |
47 | public virtual LLVector3 Velocity | 42 | public virtual LLVector3 Velocity |
48 | { | 43 | { |
49 | get | 44 | get { return m_velocity; } |
50 | { | 45 | set { m_velocity = value; } |
51 | return m_velocity; | ||
52 | } | ||
53 | set | ||
54 | { | ||
55 | m_velocity = value; | ||
56 | } | ||
57 | } | 46 | } |
58 | 47 | ||
59 | protected Quaternion m_rotation = new Quaternion(0,0,1,0); | 48 | protected Quaternion m_rotation = new Quaternion(0, 0, 1, 0); |
60 | 49 | ||
61 | public virtual Quaternion Rotation | 50 | public virtual Quaternion Rotation |
62 | { | 51 | { |
63 | get | 52 | get { return m_rotation; } |
64 | { | 53 | set { m_rotation = value; } |
65 | return m_rotation; | ||
66 | } | ||
67 | set | ||
68 | { | ||
69 | m_rotation = value; | ||
70 | } | ||
71 | } | 54 | } |
72 | 55 | ||
73 | protected uint m_localId; | 56 | protected uint m_localId; |
@@ -91,19 +74,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
91 | m_name = "(basic entity)"; | 74 | m_name = "(basic entity)"; |
92 | 75 | ||
93 | m_children = new List<EntityBase>(); | 76 | m_children = new List<EntityBase>(); |
94 | |||
95 | } | 77 | } |
96 | 78 | ||
97 | /// <summary> | 79 | /// <summary> |
98 | /// | 80 | /// |
99 | /// </summary> | 81 | /// </summary> |
100 | public virtual void updateMovement() | 82 | public virtual void UpdateMovement() |
101 | { | 83 | { |
102 | |||
103 | foreach (EntityBase child in m_children) | 84 | foreach (EntityBase child in m_children) |
104 | 85 | ||
105 | { | 86 | { |
106 | child.updateMovement(); | 87 | child.UpdateMovement(); |
107 | } | 88 | } |
108 | } | 89 | } |
109 | 90 | ||
@@ -125,7 +106,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
125 | /// </summary> | 106 | /// </summary> |
126 | public virtual void BackUp() | 107 | public virtual void BackUp() |
127 | { | 108 | { |
128 | |||
129 | } | 109 | } |
130 | 110 | ||
131 | /// <summary> | 111 | /// <summary> |
@@ -134,7 +114,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
134 | /// <returns></returns> | 114 | /// <returns></returns> |
135 | public virtual EntityBase Copy() | 115 | public virtual EntityBase Copy() |
136 | { | 116 | { |
137 | return (EntityBase)this.MemberwiseClone(); | 117 | return (EntityBase) MemberwiseClone(); |
138 | } | 118 | } |
139 | 119 | ||
140 | /// <summary> | 120 | /// <summary> |
@@ -142,7 +122,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
142 | /// </summary> | 122 | /// </summary> |
143 | public virtual void LandRenegerated() | 123 | public virtual void LandRenegerated() |
144 | { | 124 | { |
145 | |||
146 | } | 125 | } |
147 | } | 126 | } |
148 | } | 127 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive.cs index 93e4959..ce5c327 100644 --- a/OpenSim/Region/Environment/Scenes/Primitive.cs +++ b/OpenSim/Region/Environment/Scenes/Primitive.cs | |||
@@ -138,22 +138,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
138 | 138 | ||
139 | #region Constructors | 139 | #region Constructors |
140 | 140 | ||
141 | /// <summary> | 141 | public Primitive(ulong regionHandle, Scene scene, LLUUID ownerID, uint localID, bool isRoot, EntityBase parent, |
142 | /// | ||
143 | /// </summary> | ||
144 | /// <param name="regionHandle"></param> | ||
145 | /// <param name="world"></param> | ||
146 | /// <param name="addPacket"></param> | ||
147 | /// <param name="ownerID"></param> | ||
148 | /// <param name="localID"></param> | ||
149 | /// <param name="isRoot"></param> | ||
150 | /// <param name="parent"></param> | ||
151 | /// <param name="rootObject"></param> | ||
152 | public Primitive(ulong regionHandle, Scene world, LLUUID ownerID, uint localID, bool isRoot, EntityBase parent, | ||
153 | SceneObject rootObject, PrimitiveBaseShape shape, LLVector3 pos) | 142 | SceneObject rootObject, PrimitiveBaseShape shape, LLVector3 pos) |
154 | { | 143 | { |
155 | m_regionHandle = regionHandle; | 144 | m_regionHandle = regionHandle; |
156 | m_world = world; | 145 | m_scene = scene; |
157 | m_inventoryItems = new Dictionary<LLUUID, InventoryItem>(); | 146 | m_inventoryItems = new Dictionary<LLUUID, InventoryItem>(); |
158 | m_Parent = parent; | 147 | m_Parent = parent; |
159 | m_isRootPrim = isRoot; | 148 | m_isRootPrim = isRoot; |
@@ -163,7 +152,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
163 | 152 | ||
164 | Rotation = Quaternion.Identity; | 153 | Rotation = Quaternion.Identity; |
165 | 154 | ||
166 | m_world.AcknowledgeNewPrim(this); | 155 | m_scene.AcknowledgeNewPrim(this); |
167 | 156 | ||
168 | OnPrimCountTainted(); | 157 | OnPrimCountTainted(); |
169 | } | 158 | } |
@@ -202,10 +191,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
202 | dupe.m_children = new List<EntityBase>(); | 191 | dupe.m_children = new List<EntityBase>(); |
203 | dupe.m_Shape = m_Shape.Copy(); | 192 | dupe.m_Shape = m_Shape.Copy(); |
204 | dupe.m_regionHandle = m_regionHandle; | 193 | dupe.m_regionHandle = m_regionHandle; |
205 | dupe.m_world = m_world; | 194 | dupe.m_scene = m_scene; |
206 | 195 | ||
207 | 196 | ||
208 | uint newLocalID = m_world.PrimIDAllocate(); | 197 | uint newLocalID = m_scene.PrimIDAllocate(); |
209 | dupe.m_uuid = LLUUID.Random(); | 198 | dupe.m_uuid = LLUUID.Random(); |
210 | dupe.LocalId = newLocalID; | 199 | dupe.LocalId = newLocalID; |
211 | 200 | ||
@@ -225,7 +214,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
225 | dupe.m_pos = new LLVector3(m_pos.X, m_pos.Y, m_pos.Z); | 214 | dupe.m_pos = new LLVector3(m_pos.X, m_pos.Y, m_pos.Z); |
226 | 215 | ||
227 | rootParent.AddChildToList(dupe); | 216 | rootParent.AddChildToList(dupe); |
228 | m_world.AcknowledgeNewPrim(dupe); | 217 | m_scene.AcknowledgeNewPrim(dupe); |
229 | dupe.TriggerOnPrimCountTainted(); | 218 | dupe.TriggerOnPrimCountTainted(); |
230 | 219 | ||
231 | 220 | ||
@@ -327,7 +316,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
327 | m_children.Add(linkObject.rootPrimitive); | 316 | m_children.Add(linkObject.rootPrimitive); |
328 | linkObject.rootPrimitive.SetNewParent(this, m_RootParent); | 317 | linkObject.rootPrimitive.SetNewParent(this, m_RootParent); |
329 | 318 | ||
330 | m_world.DeleteEntity(linkObject.rootUUID); | 319 | m_scene.DeleteEntity(linkObject.rootUUID); |
331 | linkObject.DeleteAllChildren(); | 320 | linkObject.DeleteAllChildren(); |
332 | 321 | ||
333 | OnPrimCountTainted(); | 322 | OnPrimCountTainted(); |
@@ -676,7 +665,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
676 | /// </summary> | 665 | /// </summary> |
677 | public void SendFullUpdateToAllClients() | 666 | public void SendFullUpdateToAllClients() |
678 | { | 667 | { |
679 | List<ScenePresence> avatars = m_world.RequestAvatarList(); | 668 | List<ScenePresence> avatars = m_scene.RequestAvatarList(); |
680 | for (int i = 0; i < avatars.Count; i++) | 669 | for (int i = 0; i < avatars.Count; i++) |
681 | { | 670 | { |
682 | SendFullUpdateToClient(avatars[i].ControllingClient); | 671 | SendFullUpdateToClient(avatars[i].ControllingClient); |
@@ -721,7 +710,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
721 | /// </summary> | 710 | /// </summary> |
722 | public void SendTerseUpdateToALLClients() | 711 | public void SendTerseUpdateToALLClients() |
723 | { | 712 | { |
724 | List<ScenePresence> avatars = m_world.RequestAvatarList(); | 713 | List<ScenePresence> avatars = m_scene.RequestAvatarList(); |
725 | for (int i = 0; i < avatars.Count; i++) | 714 | for (int i = 0; i < avatars.Count; i++) |
726 | { | 715 | { |
727 | SendTerseUpdateToClient(avatars[i].ControllingClient); | 716 | SendTerseUpdateToClient(avatars[i].ControllingClient); |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 0e25e54..39584ad 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -140,23 +140,23 @@ namespace OpenSim.Region.Environment.Scenes | |||
140 | m_eventManager = new EventManager(); | 140 | m_eventManager = new EventManager(); |
141 | 141 | ||
142 | m_eventManager.OnParcelPrimCountAdd += | 142 | m_eventManager.OnParcelPrimCountAdd += |
143 | new EventManager.OnParcelPrimCountAddDelegate(m_LandManager.addPrimToLandPrimCounts); | 143 | m_LandManager.addPrimToLandPrimCounts; |
144 | 144 | ||
145 | MainLog.Instance.Verbose("World.cs - creating new entitities instance"); | 145 | MainLog.Instance.Verbose("Creating new entitities instance"); |
146 | Entities = new Dictionary<LLUUID, EntityBase>(); | 146 | Entities = new Dictionary<LLUUID, EntityBase>(); |
147 | Avatars = new Dictionary<LLUUID, ScenePresence>(); | 147 | Avatars = new Dictionary<LLUUID, ScenePresence>(); |
148 | Prims = new Dictionary<LLUUID, SceneObject>(); | 148 | Prims = new Dictionary<LLUUID, SceneObject>(); |
149 | 149 | ||
150 | MainLog.Instance.Verbose("World.cs - loading objects from datastore"); | 150 | MainLog.Instance.Verbose("Loading objects from datastore"); |
151 | List<SceneObject> PrimsFromDB = storageManager.DataStore.LoadObjects(); | 151 | List<SceneObject> PrimsFromDB = storageManager.DataStore.LoadObjects(); |
152 | foreach (SceneObject prim in PrimsFromDB) | 152 | foreach (SceneObject prim in PrimsFromDB) |
153 | { | 153 | { |
154 | AddEntity(prim); | 154 | AddEntity(prim); |
155 | } | 155 | } |
156 | MainLog.Instance.Verbose("World.cs - loaded " + PrimsFromDB.Count.ToString() + " object(s)"); | 156 | MainLog.Instance.Verbose("Loaded " + PrimsFromDB.Count.ToString() + " object(s)"); |
157 | 157 | ||
158 | 158 | ||
159 | MainLog.Instance.Verbose("World.cs - creating LandMap"); | 159 | MainLog.Instance.Verbose("Creating LandMap"); |
160 | Terrain = new TerrainEngine(); | 160 | Terrain = new TerrainEngine(); |
161 | 161 | ||
162 | ScenePresence.LoadAnims(); | 162 | ScenePresence.LoadAnims(); |
@@ -198,7 +198,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
198 | } | 198 | } |
199 | 199 | ||
200 | /// <summary> | 200 | /// <summary> |
201 | /// Performs per-frame updates on the world, this should be the central world loop | 201 | /// Performs per-frame updates on the scene, this should be the central world loop |
202 | /// </summary> | 202 | /// </summary> |
203 | public override void Update() | 203 | public override void Update() |
204 | { | 204 | { |
@@ -210,9 +210,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
210 | phyScene.GetResults(); | 210 | phyScene.GetResults(); |
211 | } | 211 | } |
212 | 212 | ||
213 | foreach (LLUUID UUID in Entities.Keys) | 213 | List<EntityBase> moveEntities = new List<EntityBase>( Entities.Values ); |
214 | |||
215 | foreach (EntityBase entity in moveEntities) | ||
214 | { | 216 | { |
215 | Entities[UUID].updateMovement(); | 217 | entity.UpdateMovement(); |
216 | } | 218 | } |
217 | 219 | ||
218 | lock (m_syncRoot) | 220 | lock (m_syncRoot) |
@@ -220,9 +222,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
220 | phyScene.Simulate(timeStep); | 222 | phyScene.Simulate(timeStep); |
221 | } | 223 | } |
222 | 224 | ||
223 | foreach (LLUUID UUID in Entities.Keys) | 225 | List<EntityBase> updateEntities = new List<EntityBase>(Entities.Values); |
226 | |||
227 | foreach (EntityBase entity in updateEntities) | ||
224 | { | 228 | { |
225 | Entities[UUID].Update(); | 229 | entity.Update(); |
226 | } | 230 | } |
227 | 231 | ||
228 | // General purpose event manager | 232 | // General purpose event manager |
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index 76a8439..0038b39 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs | |||
@@ -38,7 +38,7 @@ using OpenSim.Framework; | |||
38 | 38 | ||
39 | namespace OpenSim.Region.Environment.Scenes | 39 | namespace OpenSim.Region.Environment.Scenes |
40 | { | 40 | { |
41 | public abstract class SceneBase : IWorld | 41 | public abstract class SceneBase : IScene |
42 | { | 42 | { |
43 | public Dictionary<LLUUID, EntityBase> Entities; | 43 | public Dictionary<LLUUID, EntityBase> Entities; |
44 | protected ulong m_regionHandle; | 44 | protected ulong m_regionHandle; |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObject.cs b/OpenSim/Region/Environment/Scenes/SceneObject.cs index d513634..03a7f55 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObject.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObject.cs | |||
@@ -86,7 +86,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
86 | public SceneObject(Scene world, EventManager eventManager, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape) | 86 | public SceneObject(Scene world, EventManager eventManager, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape) |
87 | { | 87 | { |
88 | m_regionHandle = world.RegionInfo.RegionHandle; | 88 | m_regionHandle = world.RegionInfo.RegionHandle; |
89 | m_world = world; | 89 | m_scene = world; |
90 | m_eventManager = eventManager; | 90 | m_eventManager = eventManager; |
91 | 91 | ||
92 | this.Pos = pos; | 92 | this.Pos = pos; |
@@ -102,7 +102,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
102 | /// <remarks>Need a null constructor for duplication</remarks> | 102 | /// <remarks>Need a null constructor for duplication</remarks> |
103 | public SceneObject() | 103 | public SceneObject() |
104 | { | 104 | { |
105 | 105 | ||
106 | } | 106 | } |
107 | 107 | ||
108 | public void registerEvents() | 108 | public void registerEvents() |
@@ -144,7 +144,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
144 | public void CreateRootFromShape(LLUUID agentID, uint localID, PrimitiveBaseShape shape, LLVector3 pos) | 144 | public void CreateRootFromShape(LLUUID agentID, uint localID, PrimitiveBaseShape shape, LLVector3 pos) |
145 | { | 145 | { |
146 | 146 | ||
147 | this.rootPrimitive = new Primitive(this.m_regionHandle, this.m_world, agentID, localID, true, this, this, shape, pos); | 147 | this.rootPrimitive = new Primitive(this.m_regionHandle, this.m_scene, agentID, localID, true, this, this, shape, pos); |
148 | this.m_children.Add(rootPrimitive); | 148 | this.m_children.Add(rootPrimitive); |
149 | 149 | ||
150 | this.ChildPrimitives.Add(this.rootUUID, this.rootPrimitive); | 150 | this.ChildPrimitives.Add(this.rootUUID, this.rootPrimitive); |
@@ -167,7 +167,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
167 | { | 167 | { |
168 | SceneObject dupe = new SceneObject(); | 168 | SceneObject dupe = new SceneObject(); |
169 | 169 | ||
170 | dupe.m_world = this.m_world; | 170 | dupe.m_scene = this.m_scene; |
171 | dupe.m_eventManager = this.m_eventManager; | 171 | dupe.m_eventManager = this.m_eventManager; |
172 | dupe.m_regionHandle = this.m_regionHandle; | 172 | dupe.m_regionHandle = this.m_regionHandle; |
173 | Primitive newRoot = this.rootPrimitive.Copy(dupe, dupe); | 173 | Primitive newRoot = this.rootPrimitive.Copy(dupe, dupe); |
@@ -176,7 +176,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
176 | dupe.m_children.Add(dupe.rootPrimitive); | 176 | dupe.m_children.Add(dupe.rootPrimitive); |
177 | dupe.rootPrimitive.Pos = this.Pos; | 177 | dupe.rootPrimitive.Pos = this.Pos; |
178 | dupe.Rotation = this.Rotation; | 178 | dupe.Rotation = this.Rotation; |
179 | dupe.LocalId = m_world.PrimIDAllocate(); | 179 | dupe.LocalId = m_scene.PrimIDAllocate(); |
180 | 180 | ||
181 | dupe.registerEvents(); | 181 | dupe.registerEvents(); |
182 | return dupe; | 182 | return dupe; |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index e81ac7b..b3255c4 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -120,7 +120,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
120 | public ScenePresence(IClientAPI theClient, Scene world, RegionInfo reginfo) | 120 | public ScenePresence(IClientAPI theClient, Scene world, RegionInfo reginfo) |
121 | { | 121 | { |
122 | 122 | ||
123 | m_world = world; | 123 | m_scene = world; |
124 | this.m_uuid = theClient.AgentId; | 124 | this.m_uuid = theClient.AgentId; |
125 | 125 | ||
126 | m_regionInfo = reginfo; | 126 | m_regionInfo = reginfo; |
@@ -129,7 +129,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
129 | ControllingClient = theClient; | 129 | ControllingClient = theClient; |
130 | this.firstname = ControllingClient.FirstName; | 130 | this.firstname = ControllingClient.FirstName; |
131 | this.lastname = ControllingClient.LastName; | 131 | this.lastname = ControllingClient.LastName; |
132 | m_localId = m_world.NextLocalId; | 132 | m_localId = m_scene.NextLocalId; |
133 | Pos = ControllingClient.StartPos; | 133 | Pos = ControllingClient.StartPos; |
134 | visualParams = new byte[218]; | 134 | visualParams = new byte[218]; |
135 | for (int i = 0; i < 218; i++) | 135 | for (int i = 0; i < 218; i++) |
@@ -394,7 +394,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
394 | /// </summary> | 394 | /// </summary> |
395 | public void SendTerseUpdateToALLClients() | 395 | public void SendTerseUpdateToALLClients() |
396 | { | 396 | { |
397 | List<ScenePresence> avatars = this.m_world.RequestAvatarList(); | 397 | List<ScenePresence> avatars = this.m_scene.RequestAvatarList(); |
398 | for (int i = 0; i < avatars.Count; i++) | 398 | for (int i = 0; i < avatars.Count; i++) |
399 | { | 399 | { |
400 | this.SendTerseUpdateToClient(avatars[i].ControllingClient); | 400 | this.SendTerseUpdateToClient(avatars[i].ControllingClient); |
@@ -412,8 +412,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
412 | 412 | ||
413 | public void SendFullUpdateToALLClients() | 413 | public void SendFullUpdateToALLClients() |
414 | { | 414 | { |
415 | List<ScenePresence> avatars = this.m_world.RequestAvatarList(); | 415 | List<ScenePresence> avatars = this.m_scene.RequestAvatarList(); |
416 | foreach (ScenePresence avatar in this.m_world.RequestAvatarList()) | 416 | foreach (ScenePresence avatar in this.m_scene.RequestAvatarList()) |
417 | { | 417 | { |
418 | this.SendFullUpdateToOtherClient(avatar); | 418 | this.SendFullUpdateToOtherClient(avatar); |
419 | avatar.SendFullUpdateToOtherClient(this); | 419 | avatar.SendFullUpdateToOtherClient(this); |
@@ -428,7 +428,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
428 | this.ControllingClient.SendAvatarData(m_regionInfo.RegionHandle, this.firstname, this.lastname, this.m_uuid, this.LocalId, this.Pos, DefaultTexture); | 428 | this.ControllingClient.SendAvatarData(m_regionInfo.RegionHandle, this.firstname, this.lastname, this.m_uuid, this.LocalId, this.Pos, DefaultTexture); |
429 | if (this.newAvatar) | 429 | if (this.newAvatar) |
430 | { | 430 | { |
431 | this.m_world.InformClientOfNeighbours(this.ControllingClient); | 431 | this.m_scene.InformClientOfNeighbours(this.ControllingClient); |
432 | this.newAvatar = false; | 432 | this.newAvatar = false; |
433 | } | 433 | } |
434 | } | 434 | } |
@@ -441,7 +441,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
441 | { | 441 | { |
442 | this.ControllingClient.SendWearables(this.Wearables); | 442 | this.ControllingClient.SendWearables(this.Wearables); |
443 | this.SendFullUpdateToALLClients(); | 443 | this.SendFullUpdateToALLClients(); |
444 | this.m_world.SendAllSceneObjectsToClient(this.ControllingClient); | 444 | this.m_scene.SendAllSceneObjectsToClient(this.ControllingClient); |
445 | } | 445 | } |
446 | 446 | ||
447 | /// <summary> | 447 | /// <summary> |
@@ -462,7 +462,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
462 | { | 462 | { |
463 | this.current_anim = animID; | 463 | this.current_anim = animID; |
464 | this.anim_seq = seq; | 464 | this.anim_seq = seq; |
465 | List<ScenePresence> avatars = this.m_world.RequestAvatarList(); | 465 | List<ScenePresence> avatars = this.m_scene.RequestAvatarList(); |
466 | for (int i = 0; i < avatars.Count; i++) | 466 | for (int i = 0; i < avatars.Count; i++) |
467 | { | 467 | { |
468 | avatars[i].ControllingClient.SendAnimation(animID, seq, this.ControllingClient.AgentId); | 468 | avatars[i].ControllingClient.SendAnimation(animID, seq, this.ControllingClient.AgentId); |
@@ -550,10 +550,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
550 | 550 | ||
551 | LLVector3 vel = this.m_velocity; | 551 | LLVector3 vel = this.m_velocity; |
552 | ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * 256), (uint)(neighboury * 256)); | 552 | ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * 256), (uint)(neighboury * 256)); |
553 | RegionInfo neighbourRegion = this.m_world.RequestNeighbouringRegionInfo(neighbourHandle); | 553 | RegionInfo neighbourRegion = this.m_scene.RequestNeighbouringRegionInfo(neighbourHandle); |
554 | if (neighbourRegion != null) | 554 | if (neighbourRegion != null) |
555 | { | 555 | { |
556 | bool res = this.m_world.InformNeighbourOfCrossing(neighbourHandle, this.ControllingClient.AgentId, newpos, this._physActor.Flying); | 556 | bool res = this.m_scene.InformNeighbourOfCrossing(neighbourHandle, this.ControllingClient.AgentId, newpos, this._physActor.Flying); |
557 | if (res) | 557 | if (res) |
558 | { | 558 | { |
559 | this.ControllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint); | 559 | this.ControllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint); |
@@ -574,7 +574,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
574 | /// <summary> | 574 | /// <summary> |
575 | /// | 575 | /// |
576 | /// </summary> | 576 | /// </summary> |
577 | public override void updateMovement() | 577 | public override void UpdateMovement() |
578 | { | 578 | { |
579 | newForce = false; | 579 | newForce = false; |
580 | lock (this.forcesList) | 580 | lock (this.forcesList) |