Mantis#3306: Thanks tlaukkan for a patch that
adds primitive hierarchies support to MXP and improves client disconnect handling.0.6.5-rc1
parent
74adf547cf
commit
66f0445173
|
@ -42,6 +42,7 @@ using MXP.Extentions.OpenMetaverseFragments.Proto;
|
||||||
using MXP.Util;
|
using MXP.Util;
|
||||||
using MXP.Fragments;
|
using MXP.Fragments;
|
||||||
using MXP.Common.Proto;
|
using MXP.Common.Proto;
|
||||||
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Client.MXP.ClientStack
|
namespace OpenSim.Client.MXP.ClientStack
|
||||||
{
|
{
|
||||||
|
@ -303,11 +304,18 @@ namespace OpenSim.Client.MXP.ClientStack
|
||||||
String typeName = ToOmType(primShape.PCode);
|
String typeName = ToOmType(primShape.PCode);
|
||||||
m_log.Info("[MXP ClientStack] Transmitting Primitive" + typeName);
|
m_log.Info("[MXP ClientStack] Transmitting Primitive" + typeName);
|
||||||
|
|
||||||
PerceptionEventMessage pe = new PerceptionEventMessage();
|
PerceptionEventMessage pe = new PerceptionEventMessage();
|
||||||
|
|
||||||
pe.ObjectFragment.ObjectId = objectID.Guid;
|
pe.ObjectFragment.ObjectId = objectID.Guid;
|
||||||
// TODO Resolve ParentID
|
|
||||||
pe.ObjectFragment.ParentObjectId = Guid.Empty;
|
pe.ObjectFragment.ParentObjectId = Guid.Empty;
|
||||||
|
|
||||||
|
// Resolving parent UUID.
|
||||||
|
OpenSim.Region.Framework.Scenes.Scene scene = (OpenSim.Region.Framework.Scenes.Scene)Scene;
|
||||||
|
if (scene.Entities.ContainsKey(parentID))
|
||||||
|
{
|
||||||
|
pe.ObjectFragment.ParentObjectId = scene.Entities[parentID].UUID.Guid;
|
||||||
|
}
|
||||||
|
|
||||||
pe.ObjectFragment.ObjectIndex = localID;
|
pe.ObjectFragment.ObjectIndex = localID;
|
||||||
pe.ObjectFragment.ObjectName = typeName + " Object";
|
pe.ObjectFragment.ObjectName = typeName + " Object";
|
||||||
pe.ObjectFragment.OwnerId = ownerID.Guid;
|
pe.ObjectFragment.OwnerId = ownerID.Guid;
|
||||||
|
@ -387,7 +395,6 @@ namespace OpenSim.Client.MXP.ClientStack
|
||||||
PerceptionEventMessage pe = new PerceptionEventMessage();
|
PerceptionEventMessage pe = new PerceptionEventMessage();
|
||||||
|
|
||||||
pe.ObjectFragment.ObjectId = avatarID.Guid;
|
pe.ObjectFragment.ObjectId = avatarID.Guid;
|
||||||
// TODO Resolve ParentID
|
|
||||||
pe.ObjectFragment.ParentObjectId = parentId.Guid;
|
pe.ObjectFragment.ParentObjectId = parentId.Guid;
|
||||||
pe.ObjectFragment.ObjectIndex = avatarLocalID;
|
pe.ObjectFragment.ObjectIndex = avatarLocalID;
|
||||||
pe.ObjectFragment.ObjectName = participantName;
|
pe.ObjectFragment.ObjectName = participantName;
|
||||||
|
@ -397,7 +404,8 @@ namespace OpenSim.Client.MXP.ClientStack
|
||||||
pe.ObjectFragment.Acceleration = new MsdVector3f();
|
pe.ObjectFragment.Acceleration = new MsdVector3f();
|
||||||
pe.ObjectFragment.AngularAcceleration = new MsdQuaternion4f();
|
pe.ObjectFragment.AngularAcceleration = new MsdQuaternion4f();
|
||||||
pe.ObjectFragment.AngularVelocity = new MsdQuaternion4f();
|
pe.ObjectFragment.AngularVelocity = new MsdQuaternion4f();
|
||||||
pe.ObjectFragment.BoundingSphereRadius = 1; // TODO Fill in appropriate value
|
|
||||||
|
pe.ObjectFragment.BoundingSphereRadius = 1.0f; // TODO Fill in appropriate value
|
||||||
|
|
||||||
pe.ObjectFragment.Location = ToOmVector(position);
|
pe.ObjectFragment.Location = ToOmVector(position);
|
||||||
|
|
||||||
|
@ -425,11 +433,11 @@ namespace OpenSim.Client.MXP.ClientStack
|
||||||
pe.ObjectFragment.Acceleration = new MsdVector3f();
|
pe.ObjectFragment.Acceleration = new MsdVector3f();
|
||||||
pe.ObjectFragment.AngularAcceleration = new MsdQuaternion4f();
|
pe.ObjectFragment.AngularAcceleration = new MsdQuaternion4f();
|
||||||
pe.ObjectFragment.AngularVelocity = new MsdQuaternion4f();
|
pe.ObjectFragment.AngularVelocity = new MsdQuaternion4f();
|
||||||
pe.ObjectFragment.BoundingSphereRadius = 1; // TODO Fill in appropriate value
|
pe.ObjectFragment.BoundingSphereRadius = 128f;
|
||||||
|
|
||||||
pe.ObjectFragment.Location = new MsdVector3f();
|
pe.ObjectFragment.Location = new MsdVector3f();
|
||||||
|
|
||||||
pe.ObjectFragment.Mass = 1.0f; // TODO Fill in appropriate value
|
pe.ObjectFragment.Mass = 1.0f;
|
||||||
pe.ObjectFragment.Orientation = new MsdQuaternion4f();
|
pe.ObjectFragment.Orientation = new MsdQuaternion4f();
|
||||||
pe.ObjectFragment.Velocity = new MsdVector3f();
|
pe.ObjectFragment.Velocity = new MsdVector3f();
|
||||||
|
|
||||||
|
|
|
@ -233,6 +233,7 @@ namespace OpenSim.Client.MXP.PacketHandler
|
||||||
|
|
||||||
foreach (MXPClientView clientView in m_sessionsToRemove)
|
foreach (MXPClientView clientView in m_sessionsToRemove)
|
||||||
{
|
{
|
||||||
|
clientView.Scene.RemoveClient(clientView.AgentId);
|
||||||
clientView.OnClean();
|
clientView.OnClean();
|
||||||
m_clients.Remove(clientView);
|
m_clients.Remove(clientView);
|
||||||
m_sessions.Remove(clientView.Session);
|
m_sessions.Remove(clientView.Session);
|
||||||
|
@ -393,7 +394,7 @@ namespace OpenSim.Client.MXP.PacketHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.Info("[MXP ClientStack] Removing Client from Scene");
|
m_log.Info("[MXP ClientStack] Removing Client from Scene");
|
||||||
clientView.Scene.RemoveClient(clientView.AgentId);
|
//clientView.Scene.RemoveClient(clientView.AgentId);
|
||||||
}
|
}
|
||||||
if (message.GetType() == typeof(LeaveResponseMessage))
|
if (message.GetType() == typeof(LeaveResponseMessage))
|
||||||
{
|
{
|
||||||
|
@ -407,7 +408,7 @@ namespace OpenSim.Client.MXP.PacketHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.Info("[MXP ClientStack] Removing Client from Scene");
|
m_log.Info("[MXP ClientStack] Removing Client from Scene");
|
||||||
clientView.Scene.RemoveClient(clientView.AgentId);
|
//clientView.Scene.RemoveClient(clientView.AgentId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -490,6 +491,7 @@ namespace OpenSim.Client.MXP.PacketHandler
|
||||||
lastName = nameParts[1];
|
lastName = nameParts[1];
|
||||||
|
|
||||||
userProfile = m_scenes[sceneId].CommsManager.UserService.GetUserProfile(firstName, lastName);
|
userProfile = m_scenes[sceneId].CommsManager.UserService.GetUserProfile(firstName, lastName);
|
||||||
|
|
||||||
if (userProfile == null && !m_accountsAuthenticate)
|
if (userProfile == null && !m_accountsAuthenticate)
|
||||||
{
|
{
|
||||||
userId = ((UserManagerBase)m_scenes[sceneId].CommsManager.UserService).AddUser(firstName, lastName, "test", "", 1000, 1000);
|
userId = ((UserManagerBase)m_scenes[sceneId].CommsManager.UserService).AddUser(firstName, lastName, "test", "", 1000, 1000);
|
||||||
|
@ -498,7 +500,7 @@ namespace OpenSim.Client.MXP.PacketHandler
|
||||||
{
|
{
|
||||||
if (userProfile == null)
|
if (userProfile == null)
|
||||||
{
|
{
|
||||||
m_log.Info("Login failed as user was not found: " + participantName);
|
m_log.Info("[MXP ClientStack] Login failed as user was not found: " + participantName);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
userId = userProfile.ID;
|
userId = userProfile.ID;
|
||||||
|
|
Loading…
Reference in New Issue