diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 1fab9a5855..abf4f96bcf 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -2638,7 +2638,6 @@ namespace OpenSim.Region.Framework.Scenes
{
// false to be applied as a impulse
pa.AddForce(impulse, false);
- m_scene.PhysicsScene.AddPhysicsActorTaint(pa);
}
}
}
@@ -2652,7 +2651,6 @@ namespace OpenSim.Region.Framework.Scenes
{
// false to be applied as a impulse
pa.AddAngularForce(impulse, false);
- m_scene.PhysicsScene.AddPhysicsActorTaint(pa);
}
}
}
@@ -3271,7 +3269,6 @@ namespace OpenSim.Region.Framework.Scenes
if (linkPart.PhysActor is not null && m_rootPart.PhysActor is not null && m_rootPart.PhysActor.IsPhysical)
{
linkPart.PhysActor.link(m_rootPart.PhysActor);
- this.Scene.PhysicsScene.AddPhysicsActorTaint(linkPart.PhysActor);
}
linkPart.LinkNum = linkNum++;
@@ -3300,7 +3297,6 @@ namespace OpenSim.Region.Framework.Scenes
if (part.PhysActor is not null && m_rootPart.PhysActor is not null && m_rootPart.PhysActor.IsPhysical)
{
part.PhysActor.link(m_rootPart.PhysActor);
- this.Scene.PhysicsScene.AddPhysicsActorTaint(part.PhysActor);
}
}
part.ClearUndoState();
@@ -3688,7 +3684,6 @@ namespace OpenSim.Region.Framework.Scenes
Vector3 grabforce = pos - AbsolutePosition;
grabforce *= pa.Mass * 0.1f;
pa.AddForce(grabforce, false);
- m_scene.PhysicsScene.AddPhysicsActorTaint(pa);
}
else
{
@@ -3810,7 +3805,6 @@ namespace OpenSim.Region.Framework.Scenes
else
spinforce = spinforce * pa.Mass * -0.1f; // 0.1 is an arbitrary torque scaling
pa.AddAngularForce(spinforce,true);
- m_scene.PhysicsScene.AddPhysicsActorTaint(pa);
}
}
else
@@ -4041,15 +4035,7 @@ namespace OpenSim.Region.Framework.Scenes
public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock, uint localID)
{
SceneObjectPart part = GetPart(localID);
- if (part is not null)
- {
- part.UpdateShape(shapeBlock);
-
- PhysicsActor pa = m_rootPart.PhysActor;
-
- if (pa is not null)
- m_scene.PhysicsScene.AddPhysicsActorTaint(pa);
- }
+ part?.UpdateShape(shapeBlock);
InvalidBoundsRadius();
}
@@ -4513,7 +4499,6 @@ namespace OpenSim.Region.Framework.Scenes
if (actor is not null)
{
actor.Orientation = m_rootPart.RotationOffset;
- m_scene.PhysicsScene.AddPhysicsActorTaint(actor);
}
if (IsAttachment)
@@ -4600,7 +4585,6 @@ namespace OpenSim.Region.Framework.Scenes
if (pa is not null)
{
pa.Orientation = m_rootPart.RotationOffset;
- m_scene.PhysicsScene.AddPhysicsActorTaint(pa);
}
SceneObjectPart[] parts = m_parts.GetArray();
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 28c29cdc14..f939c6deb3 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -806,10 +806,6 @@ namespace OpenSim.Region.Framework.Scenes
actor.Position = GetWorldPosition();
actor.Orientation = GetWorldRotation();
}
-
- // Tell the physics engines that this prim changed.
- if (ParentGroup != null && ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene != null)
- ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
}
catch (Exception e)
{
@@ -842,10 +838,6 @@ namespace OpenSim.Region.Framework.Scenes
{
actor.Position = GetWorldPosition();
actor.Orientation = GetWorldRotation();
-
- // Tell the physics engines that this prim changed.
- if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene != null)
- ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
}
if (!m_parentGroup.m_dupeInProgress)
@@ -928,10 +920,6 @@ namespace OpenSim.Region.Framework.Scenes
actor.Orientation = resultingrotation;
//m_log.Info("[PART]: RO2:" + actor.Orientation.ToString());
}
-
- if (ParentGroup != null && ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene != null)
- ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
- //}
}
catch (Exception ex)
{
@@ -966,14 +954,8 @@ namespace OpenSim.Region.Framework.Scenes
m_velocity = value;
PhysicsActor actor = PhysActor;
- if (actor != null)
- {
- if (actor.IsPhysical)
- {
- actor.Velocity = m_velocity;
- ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
- }
- }
+ if (actor is not null && actor.IsPhysical)
+ actor.Velocity = m_velocity;
}
}
@@ -1120,21 +1102,20 @@ namespace OpenSim.Region.Framework.Scenes
get { return m_shape.Scale; }
set
{
- if (m_shape != null)
+ if (m_shape is not null)
{
Vector3 oldscale = m_shape.Scale;
m_shape.Scale = value;
- if (ParentGroup != null && ((value - oldscale).LengthSquared() >1.0f))
+ if (ParentGroup is not null && ((value - oldscale).LengthSquared() >1.0f))
ParentGroup.InvalidBoundsRadius();
PhysicsActor actor = PhysActor;
- if (actor != null)
+ if (actor is not null)
{
- if (ParentGroup.Scene != null)
+ if (ParentGroup.Scene is not null)
{
if (ParentGroup.Scene.PhysicsScene != null)
{
actor.Size = m_shape.Scale;
- ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
}
}
}
@@ -2318,8 +2299,6 @@ namespace OpenSim.Region.Framework.Scenes
else
pa.SetVolumeDetect(0);
}
-
- ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa);
}
}
@@ -3963,11 +3942,9 @@ namespace OpenSim.Region.Framework.Scenes
public void SetPhysicsAxisRotation()
{
PhysicsActor pa = PhysActor;
-
- if (pa != null)
+ if (pa is not null)
{
pa.LockAngularMotion(RotationAxisLocks);
- ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa);
}
}
@@ -4869,11 +4846,6 @@ namespace OpenSim.Region.Framework.Scenes
}
}
-// if (Shape.SculptEntry)
-// CheckSculptAndLoad();
-// else
- ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa);
-
if (!building)
pa.Building = false;
}
@@ -4951,12 +4923,8 @@ namespace OpenSim.Region.Framework.Scenes
m_shape.PathTwistBegin = shapeBlock.PathTwistBegin;
PhysicsActor pa = PhysActor;
-
- if (pa != null)
- {
+ if (pa is not null)
pa.Shape = m_shape;
- ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa);
- }
// This is what makes vehicle trailers work
// A script in a child prim re-issues
@@ -5012,7 +4980,6 @@ namespace OpenSim.Region.Framework.Scenes
if (updatePossiblyNeeded && PhysActor != null)
{
PhysActor.Shape = m_shape;
- ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
}
if (updatePossiblyNeeded)
{
diff --git a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs
index 0faca55387..583cc39fe6 100644
--- a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs
+++ b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs
@@ -155,10 +155,6 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics
_actors.Remove(act);
}
- public override void AddPhysicsActorTaint(PhysicsActor prim)
- {
- }
-
public override float Simulate(float timeStep)
{
// Console.WriteLine("Simulating");
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs
index d38861e171..48828b1a67 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs
@@ -623,11 +623,6 @@ namespace OpenSim.Region.PhysicsModule.BulletS
return prim;
}
- // This is a call from the simulator saying that some physical property has been updated.
- // The BulletSim driver senses the changing of relevant properties so this taint
- // information call is not needed.
- public override void AddPhysicsActorTaint(PhysicsActor prim) { }
-
#endregion // Prim and Avatar addition and removal
#region Simulation
diff --git a/OpenSim/Region/PhysicsModules/POS/POSScene.cs b/OpenSim/Region/PhysicsModules/POS/POSScene.cs
index 3e278f7144..746f82e2e9 100644
--- a/OpenSim/Region/PhysicsModules/POS/POSScene.cs
+++ b/OpenSim/Region/PhysicsModules/POS/POSScene.cs
@@ -184,10 +184,6 @@ namespace OpenSim.Region.PhysicsModule.POS
return false;
}
- public override void AddPhysicsActorTaint(PhysicsActor prim)
- {
- }
-
public override float Simulate(float timeStep)
{
float fps = 0;
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs b/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs
index 335e9bddbd..33443f0651 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs
@@ -74,10 +74,6 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
return PhysicsActor.Null;
}
- public override void AddPhysicsActorTaint(PhysicsActor prim)
- {
- }
-
public override float Simulate(float timeStep)
{
m_workIndicator = (m_workIndicator + 1) % 10;
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs
index e3b5d8bd1b..69a075ecc4 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs
@@ -220,7 +220,8 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
get { return 1.0f; }
}
- public abstract void AddPhysicsActorTaint(PhysicsActor prim);
+ //legacy for any modules that may still call it
+ public virtual void AddPhysicsActorTaint(PhysicsActor prim) { }
public virtual void ProcessPreSimulation() { }
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
index 3ccad99157..656934e7be 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
@@ -1549,16 +1549,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
ChangesQueue.Enqueue(item);
}
- ///
- /// Called after our prim properties are set Scale, position etc.
- /// We use this event queue like method to keep changes to the physical scene occuring in the threadlocked mutex
- /// This assures us that we have no race conditions
- ///
- ///
- public override void AddPhysicsActorTaint(PhysicsActor prim)
- {
- }
-
// does all pending changes generated during region load process
public override void ProcessPreSimulation()
{