Merge branch 'master' into vehicles

This commit is contained in:
Melanie
2009-10-22 07:12:10 +01:00
160 changed files with 3496 additions and 10088 deletions

View File

@@ -289,6 +289,9 @@ namespace OpenSim.Region.Physics.Meshing
ManagedImage managedImage; // we never use this
OpenJPEG.DecodeToImage(primShape.SculptData, out managedImage, out idata);
// Remove the reference to the encoded JPEG2000 data so it can be GCed
primShape.SculptData = Utils.EmptyBytes;
if (cacheSculptMaps)
{
try { idata.Save(decodedSculptFileName, ImageFormat.MemoryBmp); }

View File

@@ -139,8 +139,14 @@ namespace OpenSim.Region.Physics.OdePlugin
public int m_eventsubscription = 0;
private CollisionEventUpdate CollisionEventsThisFrame = new CollisionEventUpdate();
// unique UUID of this character object
public UUID m_uuid;
public bool bad = false;
public OdeCharacter(String avName, OdeScene parent_scene, PhysicsVector pos, CollisionLocker dode, PhysicsVector size, float pid_d, float pid_p, float capsule_radius, float tensor, float density, float height_fudge_factor, float walk_divisor, float rundivisor)
{
m_uuid = UUID.Random();
// ode = dode;
_velocity = new PhysicsVector();
_target_velocity = new PhysicsVector();
@@ -225,11 +231,6 @@ namespace OpenSim.Region.Physics.OdePlugin
set { m_localID = value; }
}
public override int GetHashCode()
{
return (int)m_localID;
}
public override bool Grabbed
{
set { return; }
@@ -1112,10 +1113,11 @@ namespace OpenSim.Region.Physics.OdePlugin
}
catch (NullReferenceException)
{
bad = true;
_parent_scene.BadCharacter(this);
vec = 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}", m_name);
m_log.WarnFormat("[ODEPLUGIN]: Avatar Null reference for Avatar {0}, physical actor {1}", m_name, m_uuid);
}

View File

@@ -1665,6 +1665,8 @@ namespace OpenSim.Region.Physics.OdePlugin
if (!_characters.Contains(chr))
{
_characters.Add(chr);
if (chr.bad)
m_log.DebugFormat("[PHYSICS] Added BAD actor {0} to characters list", chr.m_uuid);
}
}
}
@@ -2587,7 +2589,11 @@ namespace OpenSim.Region.Physics.OdePlugin
lock (_taintedActors)
{
if (!(_taintedActors.Contains(taintedchar)))
{
_taintedActors.Add(taintedchar);
if (taintedchar.bad)
m_log.DebugFormat("[PHYSICS]: Added BAD actor {0} to tainted actors", taintedchar.m_uuid);
}
}
}
}
@@ -2992,7 +2998,11 @@ namespace OpenSim.Region.Physics.OdePlugin
foreach (OdeCharacter actor in _characters)
{
if (actor != null)
{
if (actor.bad)
m_log.WarnFormat("[PHYSICS]: BAD Actor {0} in _characters list was not removed?", actor.m_uuid);
actor.UpdatePositionAndVelocity();
}
}
}