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/Capabilities/Caps.cs | 2 +-
OpenSim/Region/Capabilities/LLSDCapsDetails.cs | 2 +-
OpenSim/Region/ClientStack/ClientView.API.cs | 6 +--
.../ClientStack/ClientView.PacketHandlers.cs | 12 ++---
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 +-
OpenSim/Region/Examples/SimpleApp/MyWorld.cs | 2 +-
12 files changed, 60 insertions(+), 64 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Capabilities/Caps.cs b/OpenSim/Region/Capabilities/Caps.cs
index 6206f65..fdc21cf 100644
--- a/OpenSim/Region/Capabilities/Caps.cs
+++ b/OpenSim/Region/Capabilities/Caps.cs
@@ -125,7 +125,7 @@ namespace OpenSim.Region.Capabilities
string capsBaseUrl = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + "/CAPS/" + m_capsObjectPath;
caps.MapLayer = capsBaseUrl + m_mapLayerPath;
- caps.NewFileAgentInventory = capsBaseUrl + m_newInventory;
+ // caps.NewFileAgentInventory = capsBaseUrl + m_newInventory;
return caps;
}
diff --git a/OpenSim/Region/Capabilities/LLSDCapsDetails.cs b/OpenSim/Region/Capabilities/LLSDCapsDetails.cs
index 1522559..1f8b242 100644
--- a/OpenSim/Region/Capabilities/LLSDCapsDetails.cs
+++ b/OpenSim/Region/Capabilities/LLSDCapsDetails.cs
@@ -4,7 +4,7 @@ namespace OpenSim.Region.Capabilities
public class LLSDCapsDetails
{
public string MapLayer = "";
- public string NewFileAgentInventory = "";
+ //public string NewFileAgentInventory = "";
//public string EventQueueGet = "";
public LLSDCapsDetails()
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs
index 3c1df75..5866b45 100644
--- a/OpenSim/Region/ClientStack/ClientView.API.cs
+++ b/OpenSim/Region/ClientStack/ClientView.API.cs
@@ -64,11 +64,11 @@ namespace OpenSim.Region.ClientStack
public event GenericCall7 OnObjectName;
public event UpdatePrimFlags OnUpdatePrimFlags;
public event UpdatePrimTexture OnUpdatePrimTexture;
- public event UpdateVector OnUpdatePrimPosition;
+ public event UpdateVector OnUpdatePrimGroupPosition;
public event UpdateVector OnUpdatePrimSinglePosition;
- public event UpdatePrimRotation OnUpdatePrimRotation;
+ public event UpdatePrimRotation OnUpdatePrimGroupRotation;
public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
- public event UpdatePrimGroupRotation OnUpdatePrimGroupRotation;
+ public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
public event UpdateVector OnUpdatePrimScale;
public event StatusChange OnChildAgentStatus;
public event GenericCall2 OnStopMovement;
diff --git a/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs b/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs
index 5cea28a..31ea3eb 100644
--- a/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs
+++ b/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs
@@ -107,10 +107,10 @@ namespace OpenSim.Region.ClientStack
#region position
if (multipleupdate.ObjectData[i].Type == 9) //change position
{
- if (OnUpdatePrimPosition != null)
+ if (OnUpdatePrimGroupPosition != null)
{
LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
- OnUpdatePrimPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
+ OnUpdatePrimGroupPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
}
}
@@ -145,22 +145,22 @@ namespace OpenSim.Region.ClientStack
}
else if (multipleupdate.ObjectData[i].Type == 10)//group rotation from object tab
{
- if (OnUpdatePrimRotation != null)
+ if (OnUpdatePrimGroupRotation != null)
{
libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
// Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
- OnUpdatePrimRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
+ OnUpdatePrimGroupRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
}
}
else if (multipleupdate.ObjectData[i].Type == 11)//group rotation from mouse
{
- if (OnUpdatePrimGroupRotation != null)
+ if (OnUpdatePrimGroupMouseRotation != null)
{
libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true);
//Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
// Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
- OnUpdatePrimGroupRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot, this);
+ OnUpdatePrimGroupMouseRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot, this);
}
}
#endregion
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)
diff --git a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
index 3245223..da1b43d 100644
--- a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
@@ -54,7 +54,7 @@ namespace SimpleApp
client.OnRequestWearables += SendWearables;
client.OnAddPrim += AddNewPrim;
- client.OnUpdatePrimPosition += this.UpdatePrimPosition;
+ client.OnUpdatePrimGroupPosition += this.UpdatePrimPosition;
client.OnRequestMapBlocks += this.RequestMapBlocks;
client.OnTeleportLocationRequest += this.RequestTeleportLocation;
client.OnGrapUpdate += this.MoveObject;
--
cgit v1.1