diff options
Diffstat (limited to 'OpenSim/Client/MXP/ClientStack/MXPClientView.cs')
-rw-r--r-- | OpenSim/Client/MXP/ClientStack/MXPClientView.cs | 22 |
1 files changed, 15 insertions, 7 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; | |||
42 | using MXP.Util; | 42 | using MXP.Util; |
43 | using MXP.Fragments; | 43 | using MXP.Fragments; |
44 | using MXP.Common.Proto; | 44 | using MXP.Common.Proto; |
45 | using OpenSim.Region.Framework.Scenes; | ||
45 | 46 | ||
46 | namespace OpenSim.Client.MXP.ClientStack | 47 | namespace 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 | ||