aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorMW2007-07-09 15:59:35 +0000
committerMW2007-07-09 15:59:35 +0000
commit93f3ef7e0d1c7d8b9c578ffdf4e45d9c0d2dde6c (patch)
tree1b37d82af9a545e32922fff52c33b046bb6accb4 /OpenSim/Region/Environment/Scenes
parent* Begun work on Primitive Duplication. Not hooked up yet, but theoretically c... (diff)
downloadopensim-SC_OLD-93f3ef7e0d1c7d8b9c578ffdf4e45d9c0d2dde6c.zip
opensim-SC_OLD-93f3ef7e0d1c7d8b9c578ffdf4e45d9c0d2dde6c.tar.gz
opensim-SC_OLD-93f3ef7e0d1c7d8b9c578ffdf4e45d9c0d2dde6c.tar.bz2
opensim-SC_OLD-93f3ef7e0d1c7d8b9c578ffdf4e45d9c0d2dde6c.tar.xz
Done a little bit of renaming in primitive.cs and on a few events in IClientAPI.
Disabled CAPS asset uploading as it seems it now crashes the server.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Entity.cs10
-rw-r--r--OpenSim/Region/Environment/Scenes/EntityBase.cs14
-rw-r--r--OpenSim/Region/Environment/Scenes/Primitive.cs60
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObject.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs2
7 files changed, 48 insertions, 52 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Entity.cs b/OpenSim/Region/Environment/Scenes/Entity.cs
index c697faa..084c9ab 100644
--- a/OpenSim/Region/Environment/Scenes/Entity.cs
+++ b/OpenSim/Region/Environment/Scenes/Entity.cs
@@ -83,12 +83,12 @@ namespace OpenSim.Region.Environment.Scenes
83 { 83 {
84 if (this._physActor != null) 84 if (this._physActor != null)
85 { 85 {
86 velocity.X = _physActor.Velocity.X; 86 m_velocity.X = _physActor.Velocity.X;
87 velocity.Y = _physActor.Velocity.Y; 87 m_velocity.Y = _physActor.Velocity.Y;
88 velocity.Z = _physActor.Velocity.Z; 88 m_velocity.Z = _physActor.Velocity.Z;
89 } 89 }
90 90
91 return velocity; 91 return m_velocity;
92 } 92 }
93 set 93 set
94 { 94 {
@@ -108,7 +108,7 @@ namespace OpenSim.Region.Environment.Scenes
108 } 108 }
109 } 109 }
110 110
111 velocity = value; 111 m_velocity = value;
112 } 112 }
113 } 113 }
114 } 114 }
diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs
index 7914bab..6360ae1 100644
--- a/OpenSim/Region/Environment/Scenes/EntityBase.cs
+++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs
@@ -38,7 +38,7 @@ namespace OpenSim.Region.Environment.Scenes
38 } 38 }
39 } 39 }
40 40
41 public LLVector3 velocity; 41 public LLVector3 m_velocity;
42 42
43 /// <summary> 43 /// <summary>
44 /// 44 ///
@@ -47,25 +47,25 @@ namespace OpenSim.Region.Environment.Scenes
47 { 47 {
48 get 48 get
49 { 49 {
50 return velocity; 50 return m_velocity;
51 } 51 }
52 set 52 set
53 { 53 {
54 velocity = value; 54 m_velocity = value;
55 } 55 }
56 } 56 }
57 57
58 public Quaternion _rotation = new Quaternion(0,0,1,0); 58 protected Quaternion m_rotation = new Quaternion(0,0,1,0);
59 59
60 public virtual Quaternion rotation 60 public virtual Quaternion rotation
61 { 61 {
62 get 62 get
63 { 63 {
64 return _rotation; 64 return m_rotation;
65 } 65 }
66 set 66 set
67 { 67 {
68 _rotation = value; 68 m_rotation = value;
69 } 69 }
70 } 70 }
71 71
@@ -85,7 +85,7 @@ namespace OpenSim.Region.Environment.Scenes
85 uuid = new LLUUID(); 85 uuid = new LLUUID();
86 86
87 m_pos = new LLVector3(); 87 m_pos = new LLVector3();
88 velocity = new LLVector3(); 88 m_velocity = new LLVector3();
89 rotation = new Quaternion(); 89 rotation = new Quaternion();
90 m_name = "(basic entity)"; 90 m_name = "(basic entity)";
91 children = new List<EntityBase>(); 91 children = new List<EntityBase>();
diff --git a/OpenSim/Region/Environment/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive.cs
index 8d31d63..05bb1f9 100644
--- a/OpenSim/Region/Environment/Scenes/Primitive.cs
+++ b/OpenSim/Region/Environment/Scenes/Primitive.cs
@@ -16,11 +16,11 @@ namespace OpenSim.Region.Environment.Scenes
16 private LLVector3 positionLastFrame = new LLVector3(0, 0, 0); 16 private LLVector3 positionLastFrame = new LLVector3(0, 0, 0);
17 private ulong m_regionHandle; 17 private ulong m_regionHandle;
18 private byte updateFlag = 0; 18 private byte updateFlag = 0;
19 private uint flags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456 + 128; 19 private uint m_flags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456 + 128;
20 20
21 private Dictionary<LLUUID, InventoryItem> inventoryItems; 21 private Dictionary<LLUUID, InventoryItem> inventoryItems;
22 22
23 private string description = ""; 23 private string m_description = "";
24 24
25 public string SitName = ""; 25 public string SitName = "";
26 public string TouchName = ""; 26 public string TouchName = "";
@@ -42,19 +42,19 @@ namespace OpenSim.Region.Environment.Scenes
42 private PrimitiveBaseShape m_Shape; 42 private PrimitiveBaseShape m_Shape;
43 43
44 public SceneObject m_RootParent; 44 public SceneObject m_RootParent;
45 public bool isRootPrim; 45 public bool m_isRootPrim;
46 public EntityBase m_Parent; 46 public EntityBase m_Parent;
47 47
48 #region Properties 48 #region Properties
49 /// <summary> 49 /// <summary>
50 /// If rootprim will return world position 50 /// If rootprim, will return world position
51 /// otherwise will return local offset from rootprim 51 /// otherwise will return local offset from rootprim
52 /// </summary> 52 /// </summary>
53 public override LLVector3 Pos 53 public override LLVector3 Pos
54 { 54 {
55 get 55 get
56 { 56 {
57 if (isRootPrim) 57 if (m_isRootPrim)
58 { 58 {
59 //if we are rootprim then our offset should be zero 59 //if we are rootprim then our offset should be zero
60 return this.m_pos + m_Parent.Pos; 60 return this.m_pos + m_Parent.Pos;
@@ -66,7 +66,7 @@ namespace OpenSim.Region.Environment.Scenes
66 } 66 }
67 set 67 set
68 { 68 {
69 if (isRootPrim) 69 if (m_isRootPrim)
70 { 70 {
71 m_Parent.Pos = value; 71 m_Parent.Pos = value;
72 } 72 }
@@ -79,7 +79,7 @@ namespace OpenSim.Region.Environment.Scenes
79 { 79 {
80 get 80 get
81 { 81 {
82 if (!this.isRootPrim) 82 if (!this.m_isRootPrim)
83 { 83 {
84 Primitive parentPrim = (Primitive)this.m_Parent; 84 Primitive parentPrim = (Primitive)this.m_Parent;
85 Axiom.Math.Vector3 offsetPos = new Vector3(this.m_pos.X, this.m_pos.Y, this.m_pos.Z); 85 Axiom.Math.Vector3 offsetPos = new Vector3(this.m_pos.X, this.m_pos.Y, this.m_pos.Z);
@@ -97,11 +97,11 @@ namespace OpenSim.Region.Environment.Scenes
97 { 97 {
98 get 98 get
99 { 99 {
100 return this.description; 100 return this.m_description;
101 } 101 }
102 set 102 set
103 { 103 {
104 this.description = value; 104 this.m_description = value;
105 } 105 }
106 } 106 }
107 107
@@ -136,7 +136,7 @@ namespace OpenSim.Region.Environment.Scenes
136 m_world = world; 136 m_world = world;
137 inventoryItems = new Dictionary<LLUUID, InventoryItem>(); 137 inventoryItems = new Dictionary<LLUUID, InventoryItem>();
138 this.m_Parent = parent; 138 this.m_Parent = parent;
139 this.isRootPrim = isRoot; 139 this.m_isRootPrim = isRoot;
140 this.m_RootParent = rootObject; 140 this.m_RootParent = rootObject;
141 this.CreateFromPacket(addPacket, ownerID, localID); 141 this.CreateFromPacket(addPacket, ownerID, localID);
142 this.rotation = Axiom.Math.Quaternion.Identity; 142 this.rotation = Axiom.Math.Quaternion.Identity;
@@ -271,7 +271,7 @@ namespace OpenSim.Region.Environment.Scenes
271 public void SetNewParent(Primitive newParent, SceneObject rootParent) 271 public void SetNewParent(Primitive newParent, SceneObject rootParent)
272 { 272 {
273 LLVector3 oldPos = new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z); 273 LLVector3 oldPos = new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z);
274 this.isRootPrim = false; 274 this.m_isRootPrim = false;
275 this.m_Parent = newParent; 275 this.m_Parent = newParent;
276 this.ParentID = newParent.LocalId; 276 this.ParentID = newParent.LocalId;
277 this.m_RootParent = rootParent; 277 this.m_RootParent = rootParent;
@@ -305,7 +305,7 @@ namespace OpenSim.Region.Environment.Scenes
305 oldPos = new LLVector3(axOldPos.x, axOldPos.y, axOldPos.z); 305 oldPos = new LLVector3(axOldPos.x, axOldPos.y, axOldPos.z);
306 oldPos += oldParentPosition; 306 oldPos += oldParentPosition;
307 Axiom.Math.Quaternion oldRot = new Quaternion(this.rotation.w, this.rotation.x, this.rotation.y, this.rotation.z); 307 Axiom.Math.Quaternion oldRot = new Quaternion(this.rotation.w, this.rotation.x, this.rotation.y, this.rotation.z);
308 this.isRootPrim = false; 308 this.m_isRootPrim = false;
309 this.m_Parent = newParent; 309 this.m_Parent = newParent;
310 this.ParentID = newParent.LocalId; 310 this.ParentID = newParent.LocalId;
311 newParent.AddToChildrenList(this); 311 newParent.AddToChildrenList(this);
@@ -359,7 +359,7 @@ namespace OpenSim.Region.Environment.Scenes
359 offset.X /= 2; 359 offset.X /= 2;
360 offset.Y /= 2; 360 offset.Y /= 2;
361 offset.Z /= 2; 361 offset.Z /= 2;
362 if (this.isRootPrim) 362 if (this.m_isRootPrim)
363 { 363 {
364 this.m_Parent.Pos += offset; 364 this.m_Parent.Pos += offset;
365 } 365 }
@@ -380,7 +380,7 @@ namespace OpenSim.Region.Environment.Scenes
380 /// 380 ///
381 /// </summary> 381 /// </summary>
382 /// <param name="pos"></param> 382 /// <param name="pos"></param>
383 public void UpdatePosition(LLVector3 pos) 383 public void UpdateGroupPosition(LLVector3 pos)
384 { 384 {
385 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); 385 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
386 386
@@ -395,7 +395,7 @@ namespace OpenSim.Region.Environment.Scenes
395 public void UpdateSinglePosition(LLVector3 pos) 395 public void UpdateSinglePosition(LLVector3 pos)
396 { 396 {
397 // Console.WriteLine("updating single prim position"); 397 // Console.WriteLine("updating single prim position");
398 if (this.isRootPrim) 398 if (this.m_isRootPrim)
399 { 399 {
400 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); 400 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
401 LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z); 401 LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z);
@@ -429,10 +429,23 @@ namespace OpenSim.Region.Environment.Scenes
429 /// 429 ///
430 /// </summary> 430 /// </summary>
431 /// <param name="rot"></param> 431 /// <param name="rot"></param>
432 public void UpdateRotation(LLQuaternion rot) 432 public void UpdateGroupRotation(LLQuaternion rot)
433 { 433 {
434 this.rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z); 434 this.rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z);
435 this.updateFlag = 2; 435 this.updateFlag = 2;
436
437 }
438
439 /// <summary>
440 ///
441 /// </summary>
442 /// <param name="pos"></param>
443 /// <param name="rot"></param>
444 public void UpdateGroupMouseRotation(LLVector3 pos, LLQuaternion rot)
445 {
446 this.rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z);
447 this.Pos = pos;
448 this.updateFlag = 2;
436 } 449 }
437 450
438 /// <summary> 451 /// <summary>
@@ -457,19 +470,6 @@ namespace OpenSim.Region.Environment.Scenes
457 } 470 }
458 this.updateFlag = 2; 471 this.updateFlag = 2;
459 } 472 }
460
461 /// <summary>
462 ///
463 /// </summary>
464 /// <param name="pos"></param>
465 /// <param name="rot"></param>
466 public void UpdateGroupMouseRotation(LLVector3 pos, LLQuaternion rot)
467 {
468 this.rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z);
469 this.Pos = pos;
470 this.updateFlag = 2;
471 }
472
473 #endregion 473 #endregion
474 474
475 #region Shape 475 #region Shape
@@ -530,7 +530,7 @@ namespace OpenSim.Region.Environment.Scenes
530 LLQuaternion lRot; 530 LLQuaternion lRot;
531 lRot = new LLQuaternion(this.rotation.x, this.rotation.y, this.rotation.z, this.rotation.w); 531 lRot = new LLQuaternion(this.rotation.x, this.rotation.y, this.rotation.z, this.rotation.w);
532 532
533 remoteClient.SendPrimitiveToClient(this.m_regionHandle, 64096, this.LocalId, this.m_Shape, lPos, lRot, new LLUUID("00000000-0000-0000-9999-000000000005"), this.flags, this.uuid, this.OwnerID, this.Text, this.ParentID); 533 remoteClient.SendPrimitiveToClient(this.m_regionHandle, 64096, this.LocalId, this.m_Shape, lPos, lRot, new LLUUID("00000000-0000-0000-9999-000000000005"), this.m_flags, this.uuid, this.OwnerID, this.Text, this.ParentID);
534 } 534 }
535 535
536 /// <summary> 536 /// <summary>
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 35e0ea6..6dc9968 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -438,7 +438,7 @@ namespace OpenSim.Region.Environment.Scenes
438 prim = ((SceneObject)ent).HasChildPrim(localID); 438 prim = ((SceneObject)ent).HasChildPrim(localID);
439 if (prim != null) 439 if (prim != null)
440 { 440 {
441 prim.UpdatePosition(pos); 441 prim.UpdateGroupPosition(pos);
442 break; 442 break;
443 } 443 }
444 } 444 }
@@ -502,7 +502,7 @@ namespace OpenSim.Region.Environment.Scenes
502 prim = ((SceneObject)ent).HasChildPrim(localID); 502 prim = ((SceneObject)ent).HasChildPrim(localID);
503 if (prim != null) 503 if (prim != null)
504 { 504 {
505 prim.UpdateRotation(rot); 505 prim.UpdateGroupRotation(rot);
506 break; 506 break;
507 } 507 }
508 } 508 }
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 1798cba..5e08d53 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -469,10 +469,10 @@ namespace OpenSim.Region.Environment.Scenes
469 client.OnInstantMessage += this.InstantMessage; 469 client.OnInstantMessage += this.InstantMessage;
470 client.OnRequestWearables += this.InformClientOfNeighbours; 470 client.OnRequestWearables += this.InformClientOfNeighbours;
471 client.OnAddPrim += this.AddNewPrim; 471 client.OnAddPrim += this.AddNewPrim;
472 client.OnUpdatePrimPosition += this.UpdatePrimPosition; 472 client.OnUpdatePrimGroupPosition += this.UpdatePrimPosition;
473 client.OnUpdatePrimSinglePosition += this.UpdatePrimSinglePosition; 473 client.OnUpdatePrimSinglePosition += this.UpdatePrimSinglePosition;
474 client.OnUpdatePrimRotation += this.UpdatePrimRotation;
475 client.OnUpdatePrimGroupRotation += this.UpdatePrimRotation; 474 client.OnUpdatePrimGroupRotation += this.UpdatePrimRotation;
475 client.OnUpdatePrimGroupMouseRotation += this.UpdatePrimRotation;
476 client.OnUpdatePrimSingleRotation += this.UpdatePrimSingleRotation; 476 client.OnUpdatePrimSingleRotation += this.UpdatePrimSingleRotation;
477 client.OnUpdatePrimScale += this.UpdatePrimScale; 477 client.OnUpdatePrimScale += this.UpdatePrimScale;
478 client.OnUpdatePrimShape += this.UpdatePrimShape; 478 client.OnUpdatePrimShape += this.UpdatePrimShape;
diff --git a/OpenSim/Region/Environment/Scenes/SceneObject.cs b/OpenSim/Region/Environment/Scenes/SceneObject.cs
index 2b80d57..ecd2dee 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObject.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObject.cs
@@ -216,8 +216,6 @@ namespace OpenSim.Region.Environment.Scenes
216 /// <param name="client"></param> 216 /// <param name="client"></param>
217 public void GetProperites(IClientAPI client) 217 public void GetProperites(IClientAPI client)
218 { 218 {
219
220 //needs changing
221 ObjectPropertiesPacket proper = new ObjectPropertiesPacket(); 219 ObjectPropertiesPacket proper = new ObjectPropertiesPacket();
222 proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1]; 220 proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1];
223 proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock(); 221 proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock();
@@ -242,9 +240,7 @@ namespace OpenSim.Region.Environment.Scenes
242 proper.ObjectData[0].EveryoneMask = this.rootPrimitive.EveryoneMask; 240 proper.ObjectData[0].EveryoneMask = this.rootPrimitive.EveryoneMask;
243 proper.ObjectData[0].BaseMask = this.rootPrimitive.BaseMask; 241 proper.ObjectData[0].BaseMask = this.rootPrimitive.BaseMask;
244 242
245 client.OutPacket(proper); 243 client.OutPacket(proper);
246
247 } 244 }
248
249 } 245 }
250} 246}
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 14b7b2f..d335699 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -472,7 +472,7 @@ namespace OpenSim.Region.Environment.Scenes
472 newpos.Y = 1; 472 newpos.Y = 1;
473 } 473 }
474 474
475 LLVector3 vel = this.velocity; 475 LLVector3 vel = this.m_velocity;
476 ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * 256), (uint)(neighboury * 256)); 476 ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * 256), (uint)(neighboury * 256));
477 RegionInfo neighbourRegion = this.m_world.RequestNeighbouringRegionInfo(neighbourHandle); 477 RegionInfo neighbourRegion = this.m_world.RequestNeighbouringRegionInfo(neighbourHandle);
478 if (neighbourRegion != null) 478 if (neighbourRegion != null)