From 93f3ef7e0d1c7d8b9c578ffdf4e45d9c0d2dde6c Mon Sep 17 00:00:00 2001
From: MW
Date: Mon, 9 Jul 2007 15:59:35 +0000
Subject: 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.
---
OpenSim/Region/Environment/Scenes/Entity.cs | 10 ++--
OpenSim/Region/Environment/Scenes/EntityBase.cs | 14 ++---
OpenSim/Region/Environment/Scenes/Primitive.cs | 60 +++++++++++-----------
.../Environment/Scenes/Scene.PacketHandlers.cs | 4 +-
OpenSim/Region/Environment/Scenes/Scene.cs | 4 +-
OpenSim/Region/Environment/Scenes/SceneObject.cs | 6 +--
OpenSim/Region/Environment/Scenes/ScenePresence.cs | 2 +-
7 files changed, 48 insertions(+), 52 deletions(-)
(limited to 'OpenSim/Region/Environment')
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
{
if (this._physActor != null)
{
- velocity.X = _physActor.Velocity.X;
- velocity.Y = _physActor.Velocity.Y;
- velocity.Z = _physActor.Velocity.Z;
+ m_velocity.X = _physActor.Velocity.X;
+ m_velocity.Y = _physActor.Velocity.Y;
+ m_velocity.Z = _physActor.Velocity.Z;
}
- return velocity;
+ return m_velocity;
}
set
{
@@ -108,7 +108,7 @@ namespace OpenSim.Region.Environment.Scenes
}
}
- velocity = value;
+ m_velocity = value;
}
}
}
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
}
}
- public LLVector3 velocity;
+ public LLVector3 m_velocity;
///
///
@@ -47,25 +47,25 @@ namespace OpenSim.Region.Environment.Scenes
{
get
{
- return velocity;
+ return m_velocity;
}
set
{
- velocity = value;
+ m_velocity = value;
}
}
- public Quaternion _rotation = new Quaternion(0,0,1,0);
+ protected Quaternion m_rotation = new Quaternion(0,0,1,0);
public virtual Quaternion rotation
{
get
{
- return _rotation;
+ return m_rotation;
}
set
{
- _rotation = value;
+ m_rotation = value;
}
}
@@ -85,7 +85,7 @@ namespace OpenSim.Region.Environment.Scenes
uuid = new LLUUID();
m_pos = new LLVector3();
- velocity = new LLVector3();
+ m_velocity = new LLVector3();
rotation = new Quaternion();
m_name = "(basic entity)";
children = new List();
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
private LLVector3 positionLastFrame = new LLVector3(0, 0, 0);
private ulong m_regionHandle;
private byte updateFlag = 0;
- private uint flags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456 + 128;
+ private uint m_flags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456 + 128;
private Dictionary inventoryItems;
- private string description = "";
+ private string m_description = "";
public string SitName = "";
public string TouchName = "";
@@ -42,19 +42,19 @@ namespace OpenSim.Region.Environment.Scenes
private PrimitiveBaseShape m_Shape;
public SceneObject m_RootParent;
- public bool isRootPrim;
+ public bool m_isRootPrim;
public EntityBase m_Parent;
#region Properties
///
- /// If rootprim will return world position
+ /// If rootprim, will return world position
/// otherwise will return local offset from rootprim
///
public override LLVector3 Pos
{
get
{
- if (isRootPrim)
+ if (m_isRootPrim)
{
//if we are rootprim then our offset should be zero
return this.m_pos + m_Parent.Pos;
@@ -66,7 +66,7 @@ namespace OpenSim.Region.Environment.Scenes
}
set
{
- if (isRootPrim)
+ if (m_isRootPrim)
{
m_Parent.Pos = value;
}
@@ -79,7 +79,7 @@ namespace OpenSim.Region.Environment.Scenes
{
get
{
- if (!this.isRootPrim)
+ if (!this.m_isRootPrim)
{
Primitive parentPrim = (Primitive)this.m_Parent;
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
{
get
{
- return this.description;
+ return this.m_description;
}
set
{
- this.description = value;
+ this.m_description = value;
}
}
@@ -136,7 +136,7 @@ namespace OpenSim.Region.Environment.Scenes
m_world = world;
inventoryItems = new Dictionary();
this.m_Parent = parent;
- this.isRootPrim = isRoot;
+ this.m_isRootPrim = isRoot;
this.m_RootParent = rootObject;
this.CreateFromPacket(addPacket, ownerID, localID);
this.rotation = Axiom.Math.Quaternion.Identity;
@@ -271,7 +271,7 @@ namespace OpenSim.Region.Environment.Scenes
public void SetNewParent(Primitive newParent, SceneObject rootParent)
{
LLVector3 oldPos = new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z);
- this.isRootPrim = false;
+ this.m_isRootPrim = false;
this.m_Parent = newParent;
this.ParentID = newParent.LocalId;
this.m_RootParent = rootParent;
@@ -305,7 +305,7 @@ namespace OpenSim.Region.Environment.Scenes
oldPos = new LLVector3(axOldPos.x, axOldPos.y, axOldPos.z);
oldPos += oldParentPosition;
Axiom.Math.Quaternion oldRot = new Quaternion(this.rotation.w, this.rotation.x, this.rotation.y, this.rotation.z);
- this.isRootPrim = false;
+ this.m_isRootPrim = false;
this.m_Parent = newParent;
this.ParentID = newParent.LocalId;
newParent.AddToChildrenList(this);
@@ -359,7 +359,7 @@ namespace OpenSim.Region.Environment.Scenes
offset.X /= 2;
offset.Y /= 2;
offset.Z /= 2;
- if (this.isRootPrim)
+ if (this.m_isRootPrim)
{
this.m_Parent.Pos += offset;
}
@@ -380,7 +380,7 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public void UpdatePosition(LLVector3 pos)
+ public void UpdateGroupPosition(LLVector3 pos)
{
LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
@@ -395,7 +395,7 @@ namespace OpenSim.Region.Environment.Scenes
public void UpdateSinglePosition(LLVector3 pos)
{
// Console.WriteLine("updating single prim position");
- if (this.isRootPrim)
+ if (this.m_isRootPrim)
{
LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z);
@@ -429,10 +429,23 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public void UpdateRotation(LLQuaternion rot)
+ public void UpdateGroupRotation(LLQuaternion rot)
{
this.rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z);
this.updateFlag = 2;
+
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void UpdateGroupMouseRotation(LLVector3 pos, LLQuaternion rot)
+ {
+ this.rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z);
+ this.Pos = pos;
+ this.updateFlag = 2;
}
///
@@ -457,19 +470,6 @@ namespace OpenSim.Region.Environment.Scenes
}
this.updateFlag = 2;
}
-
- ///
- ///
- ///
- ///
- ///
- public void UpdateGroupMouseRotation(LLVector3 pos, LLQuaternion rot)
- {
- this.rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z);
- this.Pos = pos;
- this.updateFlag = 2;
- }
-
#endregion
#region Shape
@@ -530,7 +530,7 @@ namespace OpenSim.Region.Environment.Scenes
LLQuaternion lRot;
lRot = new LLQuaternion(this.rotation.x, this.rotation.y, this.rotation.z, this.rotation.w);
- 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);
+ 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);
}
///
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
prim = ((SceneObject)ent).HasChildPrim(localID);
if (prim != null)
{
- prim.UpdatePosition(pos);
+ prim.UpdateGroupPosition(pos);
break;
}
}
@@ -502,7 +502,7 @@ namespace OpenSim.Region.Environment.Scenes
prim = ((SceneObject)ent).HasChildPrim(localID);
if (prim != null)
{
- prim.UpdateRotation(rot);
+ prim.UpdateGroupRotation(rot);
break;
}
}
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
client.OnInstantMessage += this.InstantMessage;
client.OnRequestWearables += this.InformClientOfNeighbours;
client.OnAddPrim += this.AddNewPrim;
- client.OnUpdatePrimPosition += this.UpdatePrimPosition;
+ client.OnUpdatePrimGroupPosition += this.UpdatePrimPosition;
client.OnUpdatePrimSinglePosition += this.UpdatePrimSinglePosition;
- client.OnUpdatePrimRotation += this.UpdatePrimRotation;
client.OnUpdatePrimGroupRotation += this.UpdatePrimRotation;
+ client.OnUpdatePrimGroupMouseRotation += this.UpdatePrimRotation;
client.OnUpdatePrimSingleRotation += this.UpdatePrimSingleRotation;
client.OnUpdatePrimScale += this.UpdatePrimScale;
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
///
public void GetProperites(IClientAPI client)
{
-
- //needs changing
ObjectPropertiesPacket proper = new ObjectPropertiesPacket();
proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1];
proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock();
@@ -242,9 +240,7 @@ namespace OpenSim.Region.Environment.Scenes
proper.ObjectData[0].EveryoneMask = this.rootPrimitive.EveryoneMask;
proper.ObjectData[0].BaseMask = this.rootPrimitive.BaseMask;
- client.OutPacket(proper);
-
+ client.OutPacket(proper);
}
-
}
}
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
newpos.Y = 1;
}
- LLVector3 vel = this.velocity;
+ LLVector3 vel = this.m_velocity;
ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * 256), (uint)(neighboury * 256));
RegionInfo neighbourRegion = this.m_world.RequestNeighbouringRegionInfo(neighbourHandle);
if (neighbourRegion != null)
--
cgit v1.1