mirror of https://github.com/opensim/opensim.git
remove obsolete add physics taint
This commit is contained in:
parent
cc6a2d2e9e
commit
ef1b5a8a61
|
@ -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();
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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() { }
|
||||
|
||||
|
|
|
@ -1549,16 +1549,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
|||
ChangesQueue.Enqueue(item);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// </summary>
|
||||
/// <param name="prim"></param>
|
||||
public override void AddPhysicsActorTaint(PhysicsActor prim)
|
||||
{
|
||||
}
|
||||
|
||||
// does all pending changes generated during region load process
|
||||
public override void ProcessPreSimulation()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue