From a95f13a646e6c0ff07c765437011a29c3372f1b9 Mon Sep 17 00:00:00 2001
From: Adam Frisby
Date: Wed, 7 May 2008 20:31:48 +0000
Subject: * Removes references to libsecondlife.Packets from IClientAPI. BAD
PROGRAMMERS. NAUGHTY. * Thanks to Andrew (DeepThink) for working on this one.
---
.../Region/Environment/Scenes/AvatarAppearance.cs | 8 ++---
OpenSim/Region/Environment/Scenes/InnerScene.cs | 25 ++++++++++++++--
.../Environment/Scenes/Scene.PacketHandlers.cs | 16 +++++++++-
OpenSim/Region/Environment/Scenes/ScenePresence.cs | 34 +++++++++++-----------
4 files changed, 58 insertions(+), 25 deletions(-)
(limited to 'OpenSim/Region/Environment')
diff --git a/OpenSim/Region/Environment/Scenes/AvatarAppearance.cs b/OpenSim/Region/Environment/Scenes/AvatarAppearance.cs
index 8f29507..c482d94 100644
--- a/OpenSim/Region/Environment/Scenes/AvatarAppearance.cs
+++ b/OpenSim/Region/Environment/Scenes/AvatarAppearance.cs
@@ -26,6 +26,7 @@
*/
using System;
+using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Security.Permissions;
using libsecondlife;
@@ -102,15 +103,12 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam)
+ public void SetAppearance(byte[] texture, List visualParam)
{
LLObject.TextureEntry textureEnt = new LLObject.TextureEntry(texture, 0, texture.Length);
m_textureEntry = textureEnt;
- for (int i = 0; i < visualParam.Length; i++)
- {
- m_visualParams[i] = visualParam[i].ParamValue;
- }
+ m_visualParams = visualParam.ToArray();
// Teravus : Nifty AV Height Getting Maaaaagical formula. Oh how we love turning 0-255 into meters.
// (float)m_visualParams[25] = Height
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index f29e1f3..80e71c8 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -1275,14 +1275,35 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public void UpdatePrimShape(LLUUID agentID, uint primLocalID, ObjectShapePacket.ObjectDataBlock shapeBlock)
+ public void UpdatePrimShape(LLUUID agentID, uint primLocalID, UpdateShapeArgs shapeBlock)
{
SceneObjectGroup group = GetGroupByPrim(primLocalID);
if (group != null)
{
if (m_parentScene.Permissions.CanEditObjectPosition(agentID, group.GetPartsFullID(primLocalID)))
{
- group.UpdateShape(shapeBlock, primLocalID);
+ ObjectShapePacket.ObjectDataBlock shapeData = new ObjectShapePacket.ObjectDataBlock();
+ shapeData.ObjectLocalID = shapeBlock.ObjectLocalID;
+ shapeData.PathBegin = shapeBlock.PathBegin;
+ shapeData.PathCurve = shapeBlock.PathCurve;
+ shapeData.PathEnd = shapeBlock.PathEnd;
+ shapeData.PathRadiusOffset = shapeBlock.PathRadiusOffset;
+ shapeData.PathRevolutions = shapeBlock.PathRevolutions;
+ shapeData.PathScaleX = shapeBlock.PathScaleX;
+ shapeData.PathScaleY = shapeBlock.PathScaleY;
+ shapeData.PathShearX = shapeBlock.PathShearX;
+ shapeData.PathShearY = shapeBlock.PathShearY;
+ shapeData.PathSkew = shapeBlock.PathSkew;
+ shapeData.PathTaperX = shapeBlock.PathTaperX;
+ shapeData.PathTaperY = shapeBlock.PathTaperY;
+ shapeData.PathTwist = shapeBlock.PathTwist;
+ shapeData.PathTwistBegin = shapeBlock.PathTwistBegin;
+ shapeData.ProfileBegin = shapeBlock.ProfileBegin;
+ shapeData.ProfileCurve = shapeBlock.ProfileCurve;
+ shapeData.ProfileEnd = shapeBlock.ProfileEnd;
+ shapeData.ProfileHollow = shapeBlock.ProfileHollow;
+
+ group.UpdateShape(shapeData, primLocalID);
}
}
}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 0a4906a..623368a 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -245,7 +245,21 @@ namespace OpenSim.Region.Environment.Scenes
searchData = new AvatarPickerReplyPacket.DataBlock[0];
}
replyPacket.Data = searchData;
- client.SendAvatarPickerReply(replyPacket);
+
+ AvatarPickerReplyAgentDataArgs agent_data = new AvatarPickerReplyAgentDataArgs();
+ agent_data.AgentID = replyPacket.AgentData.AgentID;
+ agent_data.QueryID = replyPacket.AgentData.QueryID;
+
+ List data_args = new List();
+ for (i = 0; i < replyPacket.Data.Length; i++)
+ {
+ AvatarPickerReplyDataArgs data_arg = new AvatarPickerReplyDataArgs();
+ data_arg.AvatarID = replyPacket.Data[i].AvatarID;
+ data_arg.FirstName = replyPacket.Data[i].FirstName;
+ data_arg.LastName = replyPacket.Data[i].LastName;
+ data_args.Add(data_arg);
+ }
+ client.SendAvatarPickerReply(agent_data, data_args);
}
}
}
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 9343ad3..9732d05 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -754,7 +754,7 @@ namespace OpenSim.Region.Environment.Scenes
///
/// This is the event handler for client movement. If a client is moving, this event is triggering.
///
- public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdatePacket agentData)
+ public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData)
{
//if (m_isChildAgent)
//{
@@ -767,31 +767,31 @@ namespace OpenSim.Region.Environment.Scenes
m_perfMonMS = System.Environment.TickCount;
- uint flags = agentData.AgentData.ControlFlags;
- LLQuaternion bodyRotation = agentData.AgentData.BodyRotation;
+ uint flags = agentData.ControlFlags;
+ LLQuaternion bodyRotation = agentData.BodyRotation;
// Camera location in world. We'll need to raytrace
// from this location from time to time.
- m_CameraCenter.x = agentData.AgentData.CameraCenter.X;
- m_CameraCenter.y = agentData.AgentData.CameraCenter.Y;
- m_CameraCenter.z = agentData.AgentData.CameraCenter.Z;
+ m_CameraCenter.x = agentData.CameraCenter.X;
+ m_CameraCenter.y = agentData.CameraCenter.Y;
+ m_CameraCenter.z = agentData.CameraCenter.Z;
// Use these three vectors to figure out what the agent is looking at
// Convert it to a Matrix and/or Quaternion
- m_CameraAtAxis.x = agentData.AgentData.CameraAtAxis.X;
- m_CameraAtAxis.y = agentData.AgentData.CameraAtAxis.Y;
- m_CameraAtAxis.z = agentData.AgentData.CameraAtAxis.Z;
+ m_CameraAtAxis.x = agentData.CameraAtAxis.X;
+ m_CameraAtAxis.y = agentData.CameraAtAxis.Y;
+ m_CameraAtAxis.z = agentData.CameraAtAxis.Z;
- m_CameraLeftAxis.x = agentData.AgentData.CameraLeftAxis.X;
- m_CameraLeftAxis.y = agentData.AgentData.CameraLeftAxis.Y;
- m_CameraLeftAxis.z = agentData.AgentData.CameraLeftAxis.Z;
+ m_CameraLeftAxis.x = agentData.CameraLeftAxis.X;
+ m_CameraLeftAxis.y = agentData.CameraLeftAxis.Y;
+ m_CameraLeftAxis.z = agentData.CameraLeftAxis.Z;
- m_CameraUpAxis.x = agentData.AgentData.CameraUpAxis.X;
- m_CameraUpAxis.y = agentData.AgentData.CameraUpAxis.Y;
- m_CameraUpAxis.z = agentData.AgentData.CameraUpAxis.Z;
+ m_CameraUpAxis.x = agentData.CameraUpAxis.X;
+ m_CameraUpAxis.y = agentData.CameraUpAxis.Y;
+ m_CameraUpAxis.z = agentData.CameraUpAxis.Z;
// The Agent's Draw distance setting
- m_DrawDistance = agentData.AgentData.Far;
+ m_DrawDistance = agentData.Far;
if ((flags & (uint) AgentManager.ControlFlags.AGENT_CONTROL_STAND_UP) != 0)
{
@@ -1569,7 +1569,7 @@ namespace OpenSim.Region.Environment.Scenes
m_appearance.SendAppearanceToOtherAgent(avatar);
}
- public void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam)
+ public void SetAppearance(byte[] texture, List visualParam)
{
m_appearance.SetAppearance(texture, visualParam);
SetHeight(m_appearance.AvatarHeight);
--
cgit v1.1