diff options
author | lbsa71 | 2007-03-27 20:45:04 +0000 |
---|---|---|
committer | lbsa71 | 2007-03-27 20:45:04 +0000 |
commit | 7adbe756fbb1d1c4cd71df90bd12d7e3da60bdf8 (patch) | |
tree | d8dc563b7fef4ce9dcc34fbcc31c3fcc7d99d49f /OpenSim.RegionServer/world/Primitive.cs | |
parent | * Config should be loaded before login server startup... (diff) | |
download | opensim-SC-7adbe756fbb1d1c4cd71df90bd12d7e3da60bdf8.zip opensim-SC-7adbe756fbb1d1c4cd71df90bd12d7e3da60bdf8.tar.gz opensim-SC-7adbe756fbb1d1c4cd71df90bd12d7e3da60bdf8.tar.bz2 opensim-SC-7adbe756fbb1d1c4cd71df90bd12d7e3da60bdf8.tar.xz |
* Reverting todays work. It was worth a try.
Diffstat (limited to 'OpenSim.RegionServer/world/Primitive.cs')
-rw-r--r-- | OpenSim.RegionServer/world/Primitive.cs | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/OpenSim.RegionServer/world/Primitive.cs b/OpenSim.RegionServer/world/Primitive.cs index a185f0b..6ff66a3 100644 --- a/OpenSim.RegionServer/world/Primitive.cs +++ b/OpenSim.RegionServer/world/Primitive.cs | |||
@@ -22,9 +22,6 @@ namespace OpenSim.world | |||
22 | private PhysicsActor _physActor; | 22 | private PhysicsActor _physActor; |
23 | private bool physicsEnabled = false; | 23 | private bool physicsEnabled = false; |
24 | private bool physicstest = false; //just added for testing | 24 | private bool physicstest = false; //just added for testing |
25 | private Dictionary<uint, SimClient> m_clientThreads; | ||
26 | private ulong m_regionHandle; | ||
27 | private World m_world; | ||
28 | 25 | ||
29 | public bool PhysicsEnabled | 26 | public bool PhysicsEnabled |
30 | { | 27 | { |
@@ -68,14 +65,10 @@ namespace OpenSim.world | |||
68 | } | 65 | } |
69 | } | 66 | } |
70 | 67 | ||
71 | public Primitive(Dictionary<uint, SimClient> clientThreads, ulong regionHandle, World world) | 68 | public Primitive() |
72 | { | 69 | { |
73 | mesh_cutbegin = 0.0f; | 70 | mesh_cutbegin = 0.0f; |
74 | mesh_cutend = 1.0f; | 71 | mesh_cutend = 1.0f; |
75 | |||
76 | m_clientThreads = clientThreads; | ||
77 | m_regionHandle = regionHandle; | ||
78 | m_world = world; | ||
79 | } | 72 | } |
80 | 73 | ||
81 | public override Mesh getMesh() | 74 | public override Mesh getMesh() |
@@ -106,7 +99,7 @@ namespace OpenSim.world | |||
106 | { | 99 | { |
107 | if (this.newPrimFlag) | 100 | if (this.newPrimFlag) |
108 | { | 101 | { |
109 | foreach (SimClient client in m_clientThreads.Values) | 102 | foreach (SimClient client in OpenSimRoot.Instance.ClientThreads.Values) |
110 | { | 103 | { |
111 | client.OutPacket(OurPacket); | 104 | client.OutPacket(OurPacket); |
112 | } | 105 | } |
@@ -115,11 +108,11 @@ namespace OpenSim.world | |||
115 | else if (this.updateFlag) | 108 | else if (this.updateFlag) |
116 | { | 109 | { |
117 | ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); | 110 | ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); |
118 | terse.RegionData.RegionHandle = m_regionHandle; // FIXME | 111 | terse.RegionData.RegionHandle = OpenSimRoot.Instance.Cfg.RegionHandle; // FIXME |
119 | terse.RegionData.TimeDilation = 64096; | 112 | terse.RegionData.TimeDilation = 64096; |
120 | terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; | 113 | terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; |
121 | terse.ObjectData[0] = this.CreateImprovedBlock(); | 114 | terse.ObjectData[0] = this.CreateImprovedBlock(); |
122 | foreach (SimClient client in m_clientThreads.Values) | 115 | foreach (SimClient client in OpenSimRoot.Instance.ClientThreads.Values) |
123 | { | 116 | { |
124 | client.OutPacket(terse); | 117 | client.OutPacket(terse); |
125 | } | 118 | } |
@@ -127,7 +120,7 @@ namespace OpenSim.world | |||
127 | } | 120 | } |
128 | else if (this.dirtyFlag) | 121 | else if (this.dirtyFlag) |
129 | { | 122 | { |
130 | foreach (SimClient client in m_clientThreads.Values) | 123 | foreach (SimClient client in OpenSimRoot.Instance.ClientThreads.Values) |
131 | { | 124 | { |
132 | UpdateClient(client); | 125 | UpdateClient(client); |
133 | } | 126 | } |
@@ -138,11 +131,11 @@ namespace OpenSim.world | |||
138 | if (this._physActor != null && this.physicsEnabled) | 131 | if (this._physActor != null && this.physicsEnabled) |
139 | { | 132 | { |
140 | ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); | 133 | ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); |
141 | terse.RegionData.RegionHandle = m_regionHandle; // FIXME | 134 | terse.RegionData.RegionHandle = OpenSimRoot.Instance.Cfg.RegionHandle; // FIXME |
142 | terse.RegionData.TimeDilation = 64096; | 135 | terse.RegionData.TimeDilation = 64096; |
143 | terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; | 136 | terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; |
144 | terse.ObjectData[0] = this.CreateImprovedBlock(); | 137 | terse.ObjectData[0] = this.CreateImprovedBlock(); |
145 | foreach (SimClient client in m_clientThreads.Values) | 138 | foreach (SimClient client in OpenSimRoot.Instance.ClientThreads.Values) |
146 | { | 139 | { |
147 | client.OutPacket(terse); | 140 | client.OutPacket(terse); |
148 | } | 141 | } |
@@ -262,7 +255,7 @@ namespace OpenSim.world | |||
262 | public void CreateFromPacket(ObjectAddPacket addPacket, LLUUID agentID, uint localID) | 255 | public void CreateFromPacket(ObjectAddPacket addPacket, LLUUID agentID, uint localID) |
263 | { | 256 | { |
264 | ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); | 257 | ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); |
265 | objupdate.RegionData.RegionHandle = m_regionHandle; | 258 | objupdate.RegionData.RegionHandle = OpenSimRoot.Instance.Cfg.RegionHandle; |
266 | objupdate.RegionData.TimeDilation = 64096; | 259 | objupdate.RegionData.TimeDilation = 64096; |
267 | 260 | ||
268 | objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1]; | 261 | objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1]; |
@@ -330,7 +323,7 @@ namespace OpenSim.world | |||
330 | { | 323 | { |
331 | //need to clean this up as it shares a lot of code with CreateFromPacket() | 324 | //need to clean this up as it shares a lot of code with CreateFromPacket() |
332 | ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); | 325 | ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); |
333 | objupdate.RegionData.RegionHandle = m_regionHandle; | 326 | objupdate.RegionData.RegionHandle = OpenSimRoot.Instance.Cfg.RegionHandle; |
334 | objupdate.RegionData.TimeDilation = 64096; | 327 | objupdate.RegionData.TimeDilation = 64096; |
335 | objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1]; | 328 | objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1]; |
336 | 329 | ||
@@ -487,7 +480,7 @@ namespace OpenSim.world | |||
487 | this.primData.LocalID = this.localid; | 480 | this.primData.LocalID = this.localid; |
488 | this.primData.Position = this.position; | 481 | this.primData.Position = this.position; |
489 | this.primData.Rotation = new LLQuaternion(this.rotation.x, this.rotation.y, this.rotation.z, this.rotation.w); | 482 | this.primData.Rotation = new LLQuaternion(this.rotation.x, this.rotation.y, this.rotation.z, this.rotation.w); |
490 | m_world.localStorage.StorePrim(this.primData); | 483 | OpenSimRoot.Instance.LocalWorld.localStorage.StorePrim(this.primData); |
491 | } | 484 | } |
492 | } | 485 | } |
493 | 486 | ||