aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Client/MXP/ClientStack/MXPClientView.cs22
-rw-r--r--OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs8
2 files changed, 20 insertions, 10 deletions
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
index 5a7accf..30820d3 100644
--- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
+++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
@@ -42,6 +42,7 @@ using MXP.Extentions.OpenMetaverseFragments.Proto;
42using MXP.Util; 42using MXP.Util;
43using MXP.Fragments; 43using MXP.Fragments;
44using MXP.Common.Proto; 44using MXP.Common.Proto;
45using OpenSim.Region.Framework.Scenes;
45 46
46namespace OpenSim.Client.MXP.ClientStack 47namespace OpenSim.Client.MXP.ClientStack
47{ 48{
@@ -303,11 +304,18 @@ namespace OpenSim.Client.MXP.ClientStack
303 String typeName = ToOmType(primShape.PCode); 304 String typeName = ToOmType(primShape.PCode);
304 m_log.Info("[MXP ClientStack] Transmitting Primitive" + typeName); 305 m_log.Info("[MXP ClientStack] Transmitting Primitive" + typeName);
305 306
306 PerceptionEventMessage pe = new PerceptionEventMessage(); 307 PerceptionEventMessage pe = new PerceptionEventMessage();
307
308 pe.ObjectFragment.ObjectId = objectID.Guid; 308 pe.ObjectFragment.ObjectId = objectID.Guid;
309 // TODO Resolve ParentID 309
310 pe.ObjectFragment.ParentObjectId = Guid.Empty; 310 pe.ObjectFragment.ParentObjectId = Guid.Empty;
311
312 // Resolving parent UUID.
313 OpenSim.Region.Framework.Scenes.Scene scene = (OpenSim.Region.Framework.Scenes.Scene)Scene;
314 if (scene.Entities.ContainsKey(parentID))
315 {
316 pe.ObjectFragment.ParentObjectId = scene.Entities[parentID].UUID.Guid;
317 }
318
311 pe.ObjectFragment.ObjectIndex = localID; 319 pe.ObjectFragment.ObjectIndex = localID;
312 pe.ObjectFragment.ObjectName = typeName + " Object"; 320 pe.ObjectFragment.ObjectName = typeName + " Object";
313 pe.ObjectFragment.OwnerId = ownerID.Guid; 321 pe.ObjectFragment.OwnerId = ownerID.Guid;
@@ -387,7 +395,6 @@ namespace OpenSim.Client.MXP.ClientStack
387 PerceptionEventMessage pe = new PerceptionEventMessage(); 395 PerceptionEventMessage pe = new PerceptionEventMessage();
388 396
389 pe.ObjectFragment.ObjectId = avatarID.Guid; 397 pe.ObjectFragment.ObjectId = avatarID.Guid;
390 // TODO Resolve ParentID
391 pe.ObjectFragment.ParentObjectId = parentId.Guid; 398 pe.ObjectFragment.ParentObjectId = parentId.Guid;
392 pe.ObjectFragment.ObjectIndex = avatarLocalID; 399 pe.ObjectFragment.ObjectIndex = avatarLocalID;
393 pe.ObjectFragment.ObjectName = participantName; 400 pe.ObjectFragment.ObjectName = participantName;
@@ -397,7 +404,8 @@ namespace OpenSim.Client.MXP.ClientStack
397 pe.ObjectFragment.Acceleration = new MsdVector3f(); 404 pe.ObjectFragment.Acceleration = new MsdVector3f();
398 pe.ObjectFragment.AngularAcceleration = new MsdQuaternion4f(); 405 pe.ObjectFragment.AngularAcceleration = new MsdQuaternion4f();
399 pe.ObjectFragment.AngularVelocity = new MsdQuaternion4f(); 406 pe.ObjectFragment.AngularVelocity = new MsdQuaternion4f();
400 pe.ObjectFragment.BoundingSphereRadius = 1; // TODO Fill in appropriate value 407
408 pe.ObjectFragment.BoundingSphereRadius = 1.0f; // TODO Fill in appropriate value
401 409
402 pe.ObjectFragment.Location = ToOmVector(position); 410 pe.ObjectFragment.Location = ToOmVector(position);
403 411
@@ -425,11 +433,11 @@ namespace OpenSim.Client.MXP.ClientStack
425 pe.ObjectFragment.Acceleration = new MsdVector3f(); 433 pe.ObjectFragment.Acceleration = new MsdVector3f();
426 pe.ObjectFragment.AngularAcceleration = new MsdQuaternion4f(); 434 pe.ObjectFragment.AngularAcceleration = new MsdQuaternion4f();
427 pe.ObjectFragment.AngularVelocity = new MsdQuaternion4f(); 435 pe.ObjectFragment.AngularVelocity = new MsdQuaternion4f();
428 pe.ObjectFragment.BoundingSphereRadius = 1; // TODO Fill in appropriate value 436 pe.ObjectFragment.BoundingSphereRadius = 128f;
429 437
430 pe.ObjectFragment.Location = new MsdVector3f(); 438 pe.ObjectFragment.Location = new MsdVector3f();
431 439
432 pe.ObjectFragment.Mass = 1.0f; // TODO Fill in appropriate value 440 pe.ObjectFragment.Mass = 1.0f;
433 pe.ObjectFragment.Orientation = new MsdQuaternion4f(); 441 pe.ObjectFragment.Orientation = new MsdQuaternion4f();
434 pe.ObjectFragment.Velocity = new MsdVector3f(); 442 pe.ObjectFragment.Velocity = new MsdVector3f();
435 443
diff --git a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
index bb04955..ec9f8e1 100644
--- a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
+++ b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
@@ -233,6 +233,7 @@ namespace OpenSim.Client.MXP.PacketHandler
233 233
234 foreach (MXPClientView clientView in m_sessionsToRemove) 234 foreach (MXPClientView clientView in m_sessionsToRemove)
235 { 235 {
236 clientView.Scene.RemoveClient(clientView.AgentId);
236 clientView.OnClean(); 237 clientView.OnClean();
237 m_clients.Remove(clientView); 238 m_clients.Remove(clientView);
238 m_sessions.Remove(clientView.Session); 239 m_sessions.Remove(clientView.Session);
@@ -393,7 +394,7 @@ namespace OpenSim.Client.MXP.PacketHandler
393 } 394 }
394 395
395 m_log.Info("[MXP ClientStack] Removing Client from Scene"); 396 m_log.Info("[MXP ClientStack] Removing Client from Scene");
396 clientView.Scene.RemoveClient(clientView.AgentId); 397 //clientView.Scene.RemoveClient(clientView.AgentId);
397 } 398 }
398 if (message.GetType() == typeof(LeaveResponseMessage)) 399 if (message.GetType() == typeof(LeaveResponseMessage))
399 { 400 {
@@ -407,7 +408,7 @@ namespace OpenSim.Client.MXP.PacketHandler
407 } 408 }
408 409
409 m_log.Info("[MXP ClientStack] Removing Client from Scene"); 410 m_log.Info("[MXP ClientStack] Removing Client from Scene");
410 clientView.Scene.RemoveClient(clientView.AgentId); 411 //clientView.Scene.RemoveClient(clientView.AgentId);
411 } 412 }
412 else 413 else
413 { 414 {
@@ -490,6 +491,7 @@ namespace OpenSim.Client.MXP.PacketHandler
490 lastName = nameParts[1]; 491 lastName = nameParts[1];
491 492
492 userProfile = m_scenes[sceneId].CommsManager.UserService.GetUserProfile(firstName, lastName); 493 userProfile = m_scenes[sceneId].CommsManager.UserService.GetUserProfile(firstName, lastName);
494
493 if (userProfile == null && !m_accountsAuthenticate) 495 if (userProfile == null && !m_accountsAuthenticate)
494 { 496 {
495 userId = ((UserManagerBase)m_scenes[sceneId].CommsManager.UserService).AddUser(firstName, lastName, "test", "", 1000, 1000); 497 userId = ((UserManagerBase)m_scenes[sceneId].CommsManager.UserService).AddUser(firstName, lastName, "test", "", 1000, 1000);
@@ -498,7 +500,7 @@ namespace OpenSim.Client.MXP.PacketHandler
498 { 500 {
499 if (userProfile == null) 501 if (userProfile == null)
500 { 502 {
501 m_log.Info("Login failed as user was not found: " + participantName); 503 m_log.Info("[MXP ClientStack] Login failed as user was not found: " + participantName);
502 return false; 504 return false;
503 } 505 }
504 userId = userProfile.ID; 506 userId = userProfile.ID;