mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
Modifications for prim movement. For now only in Mod. BulletX, but i think it can be easy to add to ODE. Enjoy kick the prims and be careful with the falling ones ;D
This commit is contained in:
@@ -55,6 +55,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
public bool HasChanged = false;
|
||||
|
||||
private LLVector3 lastPhysGroupPos;
|
||||
private LLQuaternion lastPhysGroupRot;
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
@@ -490,6 +493,25 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
/// </summary>
|
||||
public override void Update()
|
||||
{
|
||||
if (lastPhysGroupPos.GetDistanceTo(AbsolutePosition) > 0.02)
|
||||
{
|
||||
foreach (SceneObjectPart part in m_parts.Values)
|
||||
{
|
||||
if (part.UpdateFlag == 0) part.UpdateFlag = 1;
|
||||
}
|
||||
lastPhysGroupPos = AbsolutePosition;
|
||||
}
|
||||
if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1)
|
||||
|| (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1)
|
||||
|| (Math.Abs(lastPhysGroupRot.Y - GroupRotation.Y) > 0.1)
|
||||
|| (Math.Abs(lastPhysGroupRot.Z - GroupRotation.Z) > 0.1))
|
||||
{
|
||||
foreach (SceneObjectPart part in m_parts.Values)
|
||||
{
|
||||
if (part.UpdateFlag == 0) part.UpdateFlag = 1;
|
||||
}
|
||||
lastPhysGroupRot = GroupRotation;
|
||||
}
|
||||
foreach (SceneObjectPart part in m_parts.Values)
|
||||
{
|
||||
part.SendScheduledUpdates();
|
||||
|
||||
Reference in New Issue
Block a user