mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Merge branch 'ubitwork' into avination
This commit is contained in:
@@ -1095,9 +1095,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
actor.Size = m_shape.Scale;
|
||||
|
||||
if (Shape.SculptEntry)
|
||||
CheckSculptAndLoad();
|
||||
else
|
||||
// if (Shape.SculptEntry)
|
||||
// CheckSculptAndLoad();
|
||||
// else
|
||||
ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
|
||||
}
|
||||
}
|
||||
@@ -1583,7 +1583,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
float cost = 0.1f;
|
||||
if (PhysActor != null)
|
||||
// cost += PhysActor.Cost;
|
||||
cost = PhysActor.PhysicsCost;
|
||||
else
|
||||
cost = 0.1f;
|
||||
|
||||
if ((Flags & PrimFlags.Physics) != 0)
|
||||
cost *= (1.0f + 0.01333f * Scale.LengthSquared()); // 0.01333 == 0.04/3
|
||||
@@ -1596,9 +1598,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
|
||||
return 0.1f;
|
||||
float cost;
|
||||
if (PhysActor != null)
|
||||
cost = PhysActor.StreamCost;
|
||||
else
|
||||
cost = 1.0f;
|
||||
return 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1654,8 +1659,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
else
|
||||
{
|
||||
PhysActor.PhysicsShapeType = m_physicsShapeType;
|
||||
if (Shape.SculptEntry)
|
||||
CheckSculptAndLoad();
|
||||
// if (Shape.SculptEntry)
|
||||
// CheckSculptAndLoad();
|
||||
}
|
||||
|
||||
if (ParentGroup != null)
|
||||
@@ -2115,12 +2120,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
if (userExposed)
|
||||
{
|
||||
/*
|
||||
if (dupe.m_shape.SculptEntry && dupe.m_shape.SculptTexture != UUID.Zero)
|
||||
{
|
||||
ParentGroup.Scene.AssetService.Get(
|
||||
dupe.m_shape.SculptTexture.ToString(), dupe, dupe.AssetReceived);
|
||||
}
|
||||
|
||||
*/
|
||||
bool UsePhysics = ((dupe.Flags & PrimFlags.Physics) != 0);
|
||||
dupe.DoPhysicsPropertyUpdate(UsePhysics, true);
|
||||
// dupe.UpdatePhysicsSubscribedEvents(); // not sure...
|
||||
@@ -2142,6 +2148,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <param name="id">ID of asset received</param>
|
||||
/// <param name="sender">Register</param>
|
||||
/// <param name="asset"></param>
|
||||
/*
|
||||
protected void AssetReceived(string id, Object sender, AssetBase asset)
|
||||
{
|
||||
if (asset != null)
|
||||
@@ -2151,7 +2158,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// "[SCENE OBJECT PART]: Part {0} {1} requested mesh/sculpt data for asset id {2} from asset service but received no data",
|
||||
// Name, UUID, id);
|
||||
}
|
||||
|
||||
*/
|
||||
/// <summary>
|
||||
/// Do a physics property update for a NINJA joint.
|
||||
/// </summary>
|
||||
@@ -2341,9 +2348,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
// If this part is a sculpt then delay the physics update until we've asynchronously loaded the
|
||||
// mesh data.
|
||||
if (Shape.SculptEntry)
|
||||
CheckSculptAndLoad();
|
||||
else
|
||||
// if (Shape.SculptEntry)
|
||||
// CheckSculptAndLoad();
|
||||
// else
|
||||
ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa);
|
||||
}
|
||||
}
|
||||
@@ -3125,6 +3132,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// Set sculpt and mesh data, and tell the physics engine to process the change.
|
||||
/// </summary>
|
||||
/// <param name="texture">The mesh itself.</param>
|
||||
/*
|
||||
public void SculptTextureCallback(AssetBase texture)
|
||||
{
|
||||
if (m_shape.SculptEntry)
|
||||
@@ -3152,7 +3160,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
/// <summary>
|
||||
/// Send a full update to the client for the given part
|
||||
/// </summary>
|
||||
@@ -4377,7 +4385,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
public void UpdateExtraParam(ushort type, bool inUse, byte[] data)
|
||||
{
|
||||
m_shape.ReadInUpdateExtraParam(type, inUse, data);
|
||||
|
||||
/*
|
||||
if (type == 0x30)
|
||||
{
|
||||
if (m_shape.SculptEntry && m_shape.SculptTexture != UUID.Zero)
|
||||
@@ -4385,7 +4393,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
ParentGroup.Scene.AssetService.Get(m_shape.SculptTexture.ToString(), this, AssetReceived);
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
if (ParentGroup != null)
|
||||
{
|
||||
ParentGroup.HasGroupChanged = true;
|
||||
@@ -4793,9 +4801,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
if (Shape.SculptEntry)
|
||||
CheckSculptAndLoad();
|
||||
else
|
||||
// if (Shape.SculptEntry)
|
||||
// CheckSculptAndLoad();
|
||||
// else
|
||||
ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa);
|
||||
|
||||
if (!building)
|
||||
@@ -4898,10 +4906,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <remarks>
|
||||
/// When the physics engine has finished with it, the sculpt data is discarded to save memory.
|
||||
/// </remarks>
|
||||
/*
|
||||
public void CheckSculptAndLoad()
|
||||
{
|
||||
// m_log.DebugFormat("Processing CheckSculptAndLoad for {0} {1}", Name, LocalId);
|
||||
|
||||
return;
|
||||
|
||||
if (ParentGroup.IsDeleted)
|
||||
return;
|
||||
|
||||
@@ -4923,7 +4934,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
/// <summary>
|
||||
/// Update the texture entry for this part.
|
||||
/// </summary>
|
||||
@@ -5191,6 +5202,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
|
||||
Quaternion rot = Quaternion.Slerp(RotationOffset,APIDTarget,1.0f/(float)m_APIDIterations);
|
||||
rot.Normalize();
|
||||
UpdateRotation(rot);
|
||||
|
||||
m_APIDIterations--;
|
||||
|
||||
Reference in New Issue
Block a user