aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs3
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs14
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs5
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs10
4 files changed, 21 insertions, 11 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index 1ea08e2..f609e73 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -289,6 +289,9 @@ namespace OpenSim.Region.Physics.Meshing
289 ManagedImage managedImage; // we never use this 289 ManagedImage managedImage; // we never use this
290 OpenJPEG.DecodeToImage(primShape.SculptData, out managedImage, out idata); 290 OpenJPEG.DecodeToImage(primShape.SculptData, out managedImage, out idata);
291 291
292 // Remove the reference to the encoded JPEG2000 data so it can be GCed
293 primShape.SculptData = Utils.EmptyBytes;
294
292 if (cacheSculptMaps) 295 if (cacheSculptMaps)
293 { 296 {
294 try { idata.Save(decodedSculptFileName, ImageFormat.MemoryBmp); } 297 try { idata.Save(decodedSculptFileName, ImageFormat.MemoryBmp); }
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 1fff846..71ace16 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -139,8 +139,14 @@ namespace OpenSim.Region.Physics.OdePlugin
139 public int m_eventsubscription = 0; 139 public int m_eventsubscription = 0;
140 private CollisionEventUpdate CollisionEventsThisFrame = new CollisionEventUpdate(); 140 private CollisionEventUpdate CollisionEventsThisFrame = new CollisionEventUpdate();
141 141
142 // unique UUID of this character object
143 public UUID m_uuid;
144 public bool bad = false;
145
142 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) 146 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)
143 { 147 {
148 m_uuid = UUID.Random();
149
144 // ode = dode; 150 // ode = dode;
145 _velocity = new PhysicsVector(); 151 _velocity = new PhysicsVector();
146 _target_velocity = new PhysicsVector(); 152 _target_velocity = new PhysicsVector();
@@ -225,11 +231,6 @@ namespace OpenSim.Region.Physics.OdePlugin
225 set { m_localID = value; } 231 set { m_localID = value; }
226 } 232 }
227 233
228 public override int GetHashCode()
229 {
230 return (int)m_localID;
231 }
232
233 public override bool Grabbed 234 public override bool Grabbed
234 { 235 {
235 set { return; } 236 set { return; }
@@ -1112,10 +1113,11 @@ namespace OpenSim.Region.Physics.OdePlugin
1112 } 1113 }
1113 catch (NullReferenceException) 1114 catch (NullReferenceException)
1114 { 1115 {
1116 bad = true;
1115 _parent_scene.BadCharacter(this); 1117 _parent_scene.BadCharacter(this);
1116 vec = new d.Vector3(_position.X, _position.Y, _position.Z); 1118 vec = new d.Vector3(_position.X, _position.Y, _position.Z);
1117 base.RaiseOutOfBounds(_position); // Tells ScenePresence that there's a problem! 1119 base.RaiseOutOfBounds(_position); // Tells ScenePresence that there's a problem!
1118 m_log.WarnFormat("[ODEPLUGIN]: Avatar Null reference for Avatar: {0}", m_name); 1120 m_log.WarnFormat("[ODEPLUGIN]: Avatar Null reference for Avatar {0}, physical actor {1}", m_name, m_uuid);
1119 } 1121 }
1120 1122
1121 1123
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 63bfc90..4581d22 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -259,11 +259,6 @@ namespace OpenSim.Region.Physics.OdePlugin
259 m_localID = value; } 259 m_localID = value; }
260 } 260 }
261 261
262 public override int GetHashCode()
263 {
264 return (int)m_localID;
265 }
266
267 public override bool Grabbed 262 public override bool Grabbed
268 { 263 {
269 set { return; } 264 set { return; }
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 92afe39..ba289f7 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -1664,6 +1664,8 @@ namespace OpenSim.Region.Physics.OdePlugin
1664 if (!_characters.Contains(chr)) 1664 if (!_characters.Contains(chr))
1665 { 1665 {
1666 _characters.Add(chr); 1666 _characters.Add(chr);
1667 if (chr.bad)
1668 m_log.DebugFormat("[PHYSICS] Added BAD actor {0} to characters list", chr.m_uuid);
1667 } 1669 }
1668 } 1670 }
1669 } 1671 }
@@ -2581,7 +2583,11 @@ namespace OpenSim.Region.Physics.OdePlugin
2581 lock (_taintedActors) 2583 lock (_taintedActors)
2582 { 2584 {
2583 if (!(_taintedActors.Contains(taintedchar))) 2585 if (!(_taintedActors.Contains(taintedchar)))
2586 {
2584 _taintedActors.Add(taintedchar); 2587 _taintedActors.Add(taintedchar);
2588 if (taintedchar.bad)
2589 m_log.DebugFormat("[PHYSICS]: Added BAD actor {0} to tainted actors", taintedchar.m_uuid);
2590 }
2585 } 2591 }
2586 } 2592 }
2587 } 2593 }
@@ -2980,7 +2986,11 @@ namespace OpenSim.Region.Physics.OdePlugin
2980 foreach (OdeCharacter actor in _characters) 2986 foreach (OdeCharacter actor in _characters)
2981 { 2987 {
2982 if (actor != null) 2988 if (actor != null)
2989 {
2990 if (actor.bad)
2991 m_log.WarnFormat("[PHYSICS]: BAD Actor {0} in _characters list was not removed?", actor.m_uuid);
2983 actor.UpdatePositionAndVelocity(); 2992 actor.UpdatePositionAndVelocity();
2993 }
2984 } 2994 }
2985 } 2995 }
2986 2996