From cead87005bbcb7a4f19440a3bb7876252a7b77ac Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 21 Nov 2011 18:06:04 +0000
Subject: Have ODECharacter and ODEPrim both use PhysicsActor.Name instead of
maintaining their own properties
---
OpenSim/Region/Physics/Manager/PhysicsActor.cs | 9 +++++++++
OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 13 +++++--------
OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 1 -
3 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
index c213e6a..c2acf97 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
@@ -161,6 +161,15 @@ namespace OpenSim.Region.Physics.Manager
public abstract bool Selected { set; }
///
+ /// Name of this actor.
+ ///
+ ///
+ /// XXX: Bizarrely, this cannot be "Terrain" or "Water" right now unless it really is simulating terrain or
+ /// water. This is not a problem due to the formatting of names given by prims and avatars.
+ ///
+ public string Name { get; protected set; }
+
+ ///
/// This is being used by ODE joint code.
///
public string SOPName;
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index c37d588..20bc7f6 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -123,9 +123,6 @@ namespace OpenSim.Region.Physics.OdePlugin
private float m_buoyancy = 0f;
// private CollisionLocker ode;
-
- private string m_name = String.Empty;
-
private bool[] m_colliderarr = new bool[11];
private bool[] m_colliderGroundarr = new bool[11];
@@ -212,7 +209,7 @@ namespace OpenSim.Region.Physics.OdePlugin
_parent_scene.AddPhysicsActorTaint(this);
- m_name = avName;
+ Name = avName;
}
public override int PhysicsActorType
@@ -1068,7 +1065,7 @@ namespace OpenSim.Region.Physics.OdePlugin
_parent_scene.BadCharacter(this);
newPos = new d.Vector3(_position.X, _position.Y, _position.Z);
base.RaiseOutOfBounds(_position); // Tells ScenePresence that there's a problem!
- m_log.WarnFormat("[ODEPLUGIN]: Avatar Null reference for Avatar {0}, physical actor {1}", m_name, m_uuid);
+ m_log.WarnFormat("[ODEPLUGIN]: Avatar Null reference for Avatar {0}, physical actor {1}", Name, m_uuid);
}
// kluge to keep things in bounds. ODE lets dead avatars drift away (they should be removed!)
@@ -1284,8 +1281,8 @@ namespace OpenSim.Region.Physics.OdePlugin
}
AvatarGeomAndBodyCreation(_position.X, _position.Y, _position.Z, m_tensor);
- _parent_scene.geom_name_map[Shell] = m_name;
- _parent_scene.actor_name_map[Shell] = (PhysicsActor)this;
+ _parent_scene.geom_name_map[Shell] = Name;
+ _parent_scene.actor_name_map[Shell] = this;
_parent_scene.AddCharacter(this);
}
else
@@ -1320,7 +1317,7 @@ namespace OpenSim.Region.Physics.OdePlugin
// appear to stall initial region crossings when done here. Being done for consistency.
// Velocity = Vector3.Zero;
- _parent_scene.geom_name_map[Shell] = m_name;
+ _parent_scene.geom_name_map[Shell] = Name;
_parent_scene.actor_name_map[Shell] = (PhysicsActor)this;
}
else
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 1ba7ef7..5f21c9d 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -184,7 +184,6 @@ namespace OpenSim.Region.Physics.OdePlugin
private bool m_lastUpdateSent;
public IntPtr Body = IntPtr.Zero;
- public String Name { get; private set; }
private Vector3 _target_velocity;
private d.Mass pMass;
--
cgit v1.1