diff options
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 '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Primitive.cs | 60 |
1 files changed, 30 insertions, 30 deletions
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> |