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.
Sugilite
MW 2007-07-09 15:59:35 +00:00
parent e8acf1cca9
commit 93f3ef7e0d
13 changed files with 63 additions and 67 deletions

View File

@ -104,11 +104,11 @@ namespace OpenSim.Framework.Interfaces
event GenericCall7 OnObjectName; event GenericCall7 OnObjectName;
event UpdatePrimFlags OnUpdatePrimFlags; event UpdatePrimFlags OnUpdatePrimFlags;
event UpdatePrimTexture OnUpdatePrimTexture; event UpdatePrimTexture OnUpdatePrimTexture;
event UpdateVector OnUpdatePrimPosition; event UpdateVector OnUpdatePrimGroupPosition;
event UpdateVector OnUpdatePrimSinglePosition; event UpdateVector OnUpdatePrimSinglePosition;
event UpdatePrimRotation OnUpdatePrimRotation; event UpdatePrimRotation OnUpdatePrimGroupRotation;
event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
event UpdatePrimGroupRotation OnUpdatePrimGroupRotation; event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
event UpdateVector OnUpdatePrimScale; event UpdateVector OnUpdatePrimScale;
event StatusChange OnChildAgentStatus; event StatusChange OnChildAgentStatus;
event GenericCall2 OnStopMovement; event GenericCall2 OnStopMovement;

View File

@ -125,7 +125,7 @@ namespace OpenSim.Region.Capabilities
string capsBaseUrl = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + "/CAPS/" + m_capsObjectPath; string capsBaseUrl = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + "/CAPS/" + m_capsObjectPath;
caps.MapLayer = capsBaseUrl + m_mapLayerPath; caps.MapLayer = capsBaseUrl + m_mapLayerPath;
caps.NewFileAgentInventory = capsBaseUrl + m_newInventory; // caps.NewFileAgentInventory = capsBaseUrl + m_newInventory;
return caps; return caps;
} }

View File

@ -4,7 +4,7 @@ namespace OpenSim.Region.Capabilities
public class LLSDCapsDetails public class LLSDCapsDetails
{ {
public string MapLayer = ""; public string MapLayer = "";
public string NewFileAgentInventory = ""; //public string NewFileAgentInventory = "";
//public string EventQueueGet = ""; //public string EventQueueGet = "";
public LLSDCapsDetails() public LLSDCapsDetails()

View File

@ -64,11 +64,11 @@ namespace OpenSim.Region.ClientStack
public event GenericCall7 OnObjectName; public event GenericCall7 OnObjectName;
public event UpdatePrimFlags OnUpdatePrimFlags; public event UpdatePrimFlags OnUpdatePrimFlags;
public event UpdatePrimTexture OnUpdatePrimTexture; public event UpdatePrimTexture OnUpdatePrimTexture;
public event UpdateVector OnUpdatePrimPosition; public event UpdateVector OnUpdatePrimGroupPosition;
public event UpdateVector OnUpdatePrimSinglePosition; public event UpdateVector OnUpdatePrimSinglePosition;
public event UpdatePrimRotation OnUpdatePrimRotation; public event UpdatePrimRotation OnUpdatePrimGroupRotation;
public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
public event UpdatePrimGroupRotation OnUpdatePrimGroupRotation; public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
public event UpdateVector OnUpdatePrimScale; public event UpdateVector OnUpdatePrimScale;
public event StatusChange OnChildAgentStatus; public event StatusChange OnChildAgentStatus;
public event GenericCall2 OnStopMovement; public event GenericCall2 OnStopMovement;

View File

@ -107,10 +107,10 @@ namespace OpenSim.Region.ClientStack
#region position #region position
if (multipleupdate.ObjectData[i].Type == 9) //change position if (multipleupdate.ObjectData[i].Type == 9) //change position
{ {
if (OnUpdatePrimPosition != null) if (OnUpdatePrimGroupPosition != null)
{ {
LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 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 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); libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
// Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); // 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 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.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); 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 position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
// Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); // 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 #endregion

View File

@ -83,12 +83,12 @@ namespace OpenSim.Region.Environment.Scenes
{ {
if (this._physActor != null) if (this._physActor != null)
{ {
velocity.X = _physActor.Velocity.X; m_velocity.X = _physActor.Velocity.X;
velocity.Y = _physActor.Velocity.Y; m_velocity.Y = _physActor.Velocity.Y;
velocity.Z = _physActor.Velocity.Z; m_velocity.Z = _physActor.Velocity.Z;
} }
return velocity; return m_velocity;
} }
set set
{ {
@ -108,7 +108,7 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
velocity = value; m_velocity = value;
} }
} }
} }

View File

@ -38,7 +38,7 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
public LLVector3 velocity; public LLVector3 m_velocity;
/// <summary> /// <summary>
/// ///
@ -47,25 +47,25 @@ namespace OpenSim.Region.Environment.Scenes
{ {
get get
{ {
return velocity; return m_velocity;
} }
set 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 public virtual Quaternion rotation
{ {
get get
{ {
return _rotation; return m_rotation;
} }
set set
{ {
_rotation = value; m_rotation = value;
} }
} }
@ -85,7 +85,7 @@ namespace OpenSim.Region.Environment.Scenes
uuid = new LLUUID(); uuid = new LLUUID();
m_pos = new LLVector3(); m_pos = new LLVector3();
velocity = new LLVector3(); m_velocity = new LLVector3();
rotation = new Quaternion(); rotation = new Quaternion();
m_name = "(basic entity)"; m_name = "(basic entity)";
children = new List<EntityBase>(); children = new List<EntityBase>();

View File

@ -16,11 +16,11 @@ namespace OpenSim.Region.Environment.Scenes
private LLVector3 positionLastFrame = new LLVector3(0, 0, 0); private LLVector3 positionLastFrame = new LLVector3(0, 0, 0);
private ulong m_regionHandle; private ulong m_regionHandle;
private byte updateFlag = 0; 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<LLUUID, InventoryItem> inventoryItems; private Dictionary<LLUUID, InventoryItem> inventoryItems;
private string description = ""; private string m_description = "";
public string SitName = ""; public string SitName = "";
public string TouchName = ""; public string TouchName = "";
@ -42,19 +42,19 @@ namespace OpenSim.Region.Environment.Scenes
private PrimitiveBaseShape m_Shape; private PrimitiveBaseShape m_Shape;
public SceneObject m_RootParent; public SceneObject m_RootParent;
public bool isRootPrim; public bool m_isRootPrim;
public EntityBase m_Parent; public EntityBase m_Parent;
#region Properties #region Properties
/// <summary> /// <summary>
/// If rootprim will return world position /// If rootprim, will return world position
/// otherwise will return local offset from rootprim /// otherwise will return local offset from rootprim
/// </summary> /// </summary>
public override LLVector3 Pos public override LLVector3 Pos
{ {
get get
{ {
if (isRootPrim) if (m_isRootPrim)
{ {
//if we are rootprim then our offset should be zero //if we are rootprim then our offset should be zero
return this.m_pos + m_Parent.Pos; return this.m_pos + m_Parent.Pos;
@ -66,7 +66,7 @@ namespace OpenSim.Region.Environment.Scenes
} }
set set
{ {
if (isRootPrim) if (m_isRootPrim)
{ {
m_Parent.Pos = value; m_Parent.Pos = value;
} }
@ -79,7 +79,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
get get
{ {
if (!this.isRootPrim) if (!this.m_isRootPrim)
{ {
Primitive parentPrim = (Primitive)this.m_Parent; Primitive parentPrim = (Primitive)this.m_Parent;
Axiom.Math.Vector3 offsetPos = new Vector3(this.m_pos.X, this.m_pos.Y, this.m_pos.Z); 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 get
{ {
return this.description; return this.m_description;
} }
set set
{ {
this.description = value; this.m_description = value;
} }
} }
@ -136,7 +136,7 @@ namespace OpenSim.Region.Environment.Scenes
m_world = world; m_world = world;
inventoryItems = new Dictionary<LLUUID, InventoryItem>(); inventoryItems = new Dictionary<LLUUID, InventoryItem>();
this.m_Parent = parent; this.m_Parent = parent;
this.isRootPrim = isRoot; this.m_isRootPrim = isRoot;
this.m_RootParent = rootObject; this.m_RootParent = rootObject;
this.CreateFromPacket(addPacket, ownerID, localID); this.CreateFromPacket(addPacket, ownerID, localID);
this.rotation = Axiom.Math.Quaternion.Identity; this.rotation = Axiom.Math.Quaternion.Identity;
@ -271,7 +271,7 @@ namespace OpenSim.Region.Environment.Scenes
public void SetNewParent(Primitive newParent, SceneObject rootParent) public void SetNewParent(Primitive newParent, SceneObject rootParent)
{ {
LLVector3 oldPos = new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z); 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.m_Parent = newParent;
this.ParentID = newParent.LocalId; this.ParentID = newParent.LocalId;
this.m_RootParent = rootParent; this.m_RootParent = rootParent;
@ -305,7 +305,7 @@ namespace OpenSim.Region.Environment.Scenes
oldPos = new LLVector3(axOldPos.x, axOldPos.y, axOldPos.z); oldPos = new LLVector3(axOldPos.x, axOldPos.y, axOldPos.z);
oldPos += oldParentPosition; oldPos += oldParentPosition;
Axiom.Math.Quaternion oldRot = new Quaternion(this.rotation.w, this.rotation.x, this.rotation.y, this.rotation.z); 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.m_Parent = newParent;
this.ParentID = newParent.LocalId; this.ParentID = newParent.LocalId;
newParent.AddToChildrenList(this); newParent.AddToChildrenList(this);
@ -359,7 +359,7 @@ namespace OpenSim.Region.Environment.Scenes
offset.X /= 2; offset.X /= 2;
offset.Y /= 2; offset.Y /= 2;
offset.Z /= 2; offset.Z /= 2;
if (this.isRootPrim) if (this.m_isRootPrim)
{ {
this.m_Parent.Pos += offset; this.m_Parent.Pos += offset;
} }
@ -380,7 +380,7 @@ namespace OpenSim.Region.Environment.Scenes
/// ///
/// </summary> /// </summary>
/// <param name="pos"></param> /// <param name="pos"></param>
public void UpdatePosition(LLVector3 pos) public void UpdateGroupPosition(LLVector3 pos)
{ {
LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
@ -395,7 +395,7 @@ namespace OpenSim.Region.Environment.Scenes
public void UpdateSinglePosition(LLVector3 pos) public void UpdateSinglePosition(LLVector3 pos)
{ {
// Console.WriteLine("updating single prim position"); // Console.WriteLine("updating single prim position");
if (this.isRootPrim) if (this.m_isRootPrim)
{ {
LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
LLVector3 oldPos = 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
/// ///
/// </summary> /// </summary>
/// <param name="rot"></param> /// <param name="rot"></param>
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.rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z);
this.updateFlag = 2; this.updateFlag = 2;
}
/// <summary>
///
/// </summary>
/// <param name="pos"></param>
/// <param name="rot"></param>
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;
} }
/// <summary> /// <summary>
@ -457,19 +470,6 @@ namespace OpenSim.Region.Environment.Scenes
} }
this.updateFlag = 2; this.updateFlag = 2;
} }
/// <summary>
///
/// </summary>
/// <param name="pos"></param>
/// <param name="rot"></param>
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 #endregion
#region Shape #region Shape
@ -530,7 +530,7 @@ namespace OpenSim.Region.Environment.Scenes
LLQuaternion lRot; LLQuaternion lRot;
lRot = new LLQuaternion(this.rotation.x, this.rotation.y, this.rotation.z, this.rotation.w); 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);
} }
/// <summary> /// <summary>

View File

@ -438,7 +438,7 @@ namespace OpenSim.Region.Environment.Scenes
prim = ((SceneObject)ent).HasChildPrim(localID); prim = ((SceneObject)ent).HasChildPrim(localID);
if (prim != null) if (prim != null)
{ {
prim.UpdatePosition(pos); prim.UpdateGroupPosition(pos);
break; break;
} }
} }
@ -502,7 +502,7 @@ namespace OpenSim.Region.Environment.Scenes
prim = ((SceneObject)ent).HasChildPrim(localID); prim = ((SceneObject)ent).HasChildPrim(localID);
if (prim != null) if (prim != null)
{ {
prim.UpdateRotation(rot); prim.UpdateGroupRotation(rot);
break; break;
} }
} }

View File

@ -469,10 +469,10 @@ namespace OpenSim.Region.Environment.Scenes
client.OnInstantMessage += this.InstantMessage; client.OnInstantMessage += this.InstantMessage;
client.OnRequestWearables += this.InformClientOfNeighbours; client.OnRequestWearables += this.InformClientOfNeighbours;
client.OnAddPrim += this.AddNewPrim; client.OnAddPrim += this.AddNewPrim;
client.OnUpdatePrimPosition += this.UpdatePrimPosition; client.OnUpdatePrimGroupPosition += this.UpdatePrimPosition;
client.OnUpdatePrimSinglePosition += this.UpdatePrimSinglePosition; client.OnUpdatePrimSinglePosition += this.UpdatePrimSinglePosition;
client.OnUpdatePrimRotation += this.UpdatePrimRotation;
client.OnUpdatePrimGroupRotation += this.UpdatePrimRotation; client.OnUpdatePrimGroupRotation += this.UpdatePrimRotation;
client.OnUpdatePrimGroupMouseRotation += this.UpdatePrimRotation;
client.OnUpdatePrimSingleRotation += this.UpdatePrimSingleRotation; client.OnUpdatePrimSingleRotation += this.UpdatePrimSingleRotation;
client.OnUpdatePrimScale += this.UpdatePrimScale; client.OnUpdatePrimScale += this.UpdatePrimScale;
client.OnUpdatePrimShape += this.UpdatePrimShape; client.OnUpdatePrimShape += this.UpdatePrimShape;

View File

@ -216,8 +216,6 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="client"></param> /// <param name="client"></param>
public void GetProperites(IClientAPI client) public void GetProperites(IClientAPI client)
{ {
//needs changing
ObjectPropertiesPacket proper = new ObjectPropertiesPacket(); ObjectPropertiesPacket proper = new ObjectPropertiesPacket();
proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1]; proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1];
proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock(); proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock();
@ -243,8 +241,6 @@ namespace OpenSim.Region.Environment.Scenes
proper.ObjectData[0].BaseMask = this.rootPrimitive.BaseMask; proper.ObjectData[0].BaseMask = this.rootPrimitive.BaseMask;
client.OutPacket(proper); client.OutPacket(proper);
}
}
} }
} }

View File

@ -472,7 +472,7 @@ namespace OpenSim.Region.Environment.Scenes
newpos.Y = 1; newpos.Y = 1;
} }
LLVector3 vel = this.velocity; LLVector3 vel = this.m_velocity;
ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * 256), (uint)(neighboury * 256)); ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * 256), (uint)(neighboury * 256));
RegionInfo neighbourRegion = this.m_world.RequestNeighbouringRegionInfo(neighbourHandle); RegionInfo neighbourRegion = this.m_world.RequestNeighbouringRegionInfo(neighbourHandle);
if (neighbourRegion != null) if (neighbourRegion != null)

View File

@ -54,7 +54,7 @@ namespace SimpleApp
client.OnRequestWearables += SendWearables; client.OnRequestWearables += SendWearables;
client.OnAddPrim += AddNewPrim; client.OnAddPrim += AddNewPrim;
client.OnUpdatePrimPosition += this.UpdatePrimPosition; client.OnUpdatePrimGroupPosition += this.UpdatePrimPosition;
client.OnRequestMapBlocks += this.RequestMapBlocks; client.OnRequestMapBlocks += this.RequestMapBlocks;
client.OnTeleportLocationRequest += this.RequestTeleportLocation; client.OnTeleportLocationRequest += this.RequestTeleportLocation;
client.OnGrapUpdate += this.MoveObject; client.OnGrapUpdate += this.MoveObject;