diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim.RegionServer/world/Primitive.cs | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/OpenSim.RegionServer/world/Primitive.cs b/OpenSim.RegionServer/world/Primitive.cs index 156bbfb..8ff66f9 100644 --- a/OpenSim.RegionServer/world/Primitive.cs +++ b/OpenSim.RegionServer/world/Primitive.cs | |||
@@ -19,13 +19,11 @@ namespace OpenSim.world | |||
19 | protected bool updateFlag = false; | 19 | protected bool updateFlag = false; |
20 | protected bool dirtyFlag = false; | 20 | protected bool dirtyFlag = false; |
21 | private ObjectUpdatePacket OurPacket; | 21 | private ObjectUpdatePacket OurPacket; |
22 | private PhysicsActor _physActor; | ||
23 | private bool physicsEnabled = false; | 22 | private bool physicsEnabled = false; |
24 | private bool physicstest = false; | 23 | private bool physicstest = false; |
25 | private LLVector3 positionLastFrame = new LLVector3(0, 0, 0); | 24 | private LLVector3 positionLastFrame = new LLVector3(0, 0, 0); |
26 | private Dictionary<uint, SimClient> m_clientThreads; | 25 | private Dictionary<uint, SimClient> m_clientThreads; |
27 | private ulong m_regionHandle; | 26 | private ulong m_regionHandle; |
28 | private World m_world; | ||
29 | private const uint FULL_MASK_PERMISSIONS = 2147483647; | 27 | private const uint FULL_MASK_PERMISSIONS = 2147483647; |
30 | 28 | ||
31 | public bool PhysicsEnabled | 29 | public bool PhysicsEnabled |
@@ -130,7 +128,7 @@ namespace OpenSim.world | |||
130 | 128 | ||
131 | public void UpdatePosition(LLVector3 pos) | 129 | public void UpdatePosition(LLVector3 pos) |
132 | { | 130 | { |
133 | this.position = pos; | 131 | this.Pos = pos; |
134 | if (this._physActor != null) // && this.physicsEnabled) | 132 | if (this._physActor != null) // && this.physicsEnabled) |
135 | { | 133 | { |
136 | try | 134 | try |
@@ -208,7 +206,7 @@ namespace OpenSim.world | |||
208 | 206 | ||
209 | if (this.physicstest) | 207 | if (this.physicstest) |
210 | { | 208 | { |
211 | LLVector3 pos = this.position; | 209 | LLVector3 pos = this.Pos; |
212 | pos.Z += 0.0001f; | 210 | pos.Z += 0.0001f; |
213 | this.UpdatePosition(pos); | 211 | this.UpdatePosition(pos); |
214 | this.physicstest = false; | 212 | this.physicstest = false; |
@@ -226,7 +224,7 @@ namespace OpenSim.world | |||
226 | } | 224 | } |
227 | else | 225 | else |
228 | { | 226 | { |
229 | lPos = this.position; | 227 | lPos = this.Pos; |
230 | } | 228 | } |
231 | byte[] pb = lPos.GetBytes(); | 229 | byte[] pb = lPos.GetBytes(); |
232 | Array.Copy(pb, 0, OurPacket.ObjectData[0].ObjectData, 0, pb.Length); | 230 | Array.Copy(pb, 0, OurPacket.ObjectData[0].ObjectData, 0, pb.Length); |
@@ -300,7 +298,7 @@ namespace OpenSim.world | |||
300 | this.physicsEnabled = pack.AgentData.UsePhysics; | 298 | this.physicsEnabled = pack.AgentData.UsePhysics; |
301 | if (this._physActor.Kinematic == false) | 299 | if (this._physActor.Kinematic == false) |
302 | { | 300 | { |
303 | LLVector3 pos = this.position; | 301 | LLVector3 pos = this.Pos; |
304 | this.UpdatePosition(pos); | 302 | this.UpdatePosition(pos); |
305 | pos.Z += 0.000001f; | 303 | pos.Z += 0.000001f; |
306 | this.UpdatePosition(pos); | 304 | this.UpdatePosition(pos); |
@@ -310,7 +308,7 @@ namespace OpenSim.world | |||
310 | { | 308 | { |
311 | PhysicsVector vec = this._physActor.Position; | 309 | PhysicsVector vec = this._physActor.Position; |
312 | LLVector3 pos = new LLVector3(vec.X, vec.Y, vec.Z); | 310 | LLVector3 pos = new LLVector3(vec.X, vec.Y, vec.Z); |
313 | this.position = pos; | 311 | this.Pos = pos; |
314 | this.updateFlag = true; | 312 | this.updateFlag = true; |
315 | } | 313 | } |
316 | } | 314 | } |
@@ -319,7 +317,7 @@ namespace OpenSim.world | |||
319 | public void MakeParent(Primitive prim) | 317 | public void MakeParent(Primitive prim) |
320 | { | 318 | { |
321 | this.primData.ParentID = prim.localid; | 319 | this.primData.ParentID = prim.localid; |
322 | this.position -= prim.position; | 320 | this.Pos -= prim.Pos; |
323 | this.dirtyFlag = true; | 321 | this.dirtyFlag = true; |
324 | } | 322 | } |
325 | 323 | ||
@@ -385,7 +383,7 @@ namespace OpenSim.world | |||
385 | this.newPrimFlag = true; | 383 | this.newPrimFlag = true; |
386 | this.primData.FullID = this.uuid = objupdate.ObjectData[0].FullID; | 384 | this.primData.FullID = this.uuid = objupdate.ObjectData[0].FullID; |
387 | this.localid = objupdate.ObjectData[0].ID; | 385 | this.localid = objupdate.ObjectData[0].ID; |
388 | this.primData.Position = this.position = pos1; | 386 | this.primData.Position = this.Pos = pos1; |
389 | this.OurPacket = objupdate; | 387 | this.OurPacket = objupdate; |
390 | } | 388 | } |
391 | 389 | ||
@@ -466,7 +464,7 @@ namespace OpenSim.world | |||
466 | 464 | ||
467 | this.uuid = objupdate.ObjectData[0].FullID; | 465 | this.uuid = objupdate.ObjectData[0].FullID; |
468 | this.localid = objupdate.ObjectData[0].ID; | 466 | this.localid = objupdate.ObjectData[0].ID; |
469 | this.position = pos1; | 467 | this.Pos = pos1; |
470 | this.OurPacket = objupdate; | 468 | this.OurPacket = objupdate; |
471 | if (newprim) | 469 | if (newprim) |
472 | { | 470 | { |
@@ -501,7 +499,7 @@ namespace OpenSim.world | |||
501 | } | 499 | } |
502 | else | 500 | else |
503 | { | 501 | { |
504 | lPos = this.position; | 502 | lPos = this.Pos; |
505 | lRot = this.rotation; | 503 | lRot = this.rotation; |
506 | } | 504 | } |
507 | byte[] pb = lPos.GetBytes(); | 505 | byte[] pb = lPos.GetBytes(); |
@@ -557,10 +555,9 @@ namespace OpenSim.world | |||
557 | { | 555 | { |
558 | this.primData.FullID = this.uuid; | 556 | this.primData.FullID = this.uuid; |
559 | this.primData.LocalID = this.localid; | 557 | this.primData.LocalID = this.localid; |
560 | this.primData.Position = this.position; | 558 | this.primData.Position = this.Pos; |
561 | this.primData.Rotation = new LLQuaternion(this.rotation.x, this.rotation.y, this.rotation.z, this.rotation.w); | 559 | this.primData.Rotation = new LLQuaternion(this.rotation.x, this.rotation.y, this.rotation.z, this.rotation.w); |
562 | this.m_world.localStorage.StorePrim(this.primData); | 560 | this.m_world.localStorage.StorePrim(this.primData); |
563 | } | 561 | } |
564 | } | 562 | } |
565 | |||
566 | } | 563 | } |