Merge branch 'avination' into careminster
commit
b62cc3ce0a
|
@ -229,12 +229,14 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public class ControllerData
|
public class ControllerData
|
||||||
{
|
{
|
||||||
|
public UUID ObjectID;
|
||||||
public UUID ItemID;
|
public UUID ItemID;
|
||||||
public uint IgnoreControls;
|
public uint IgnoreControls;
|
||||||
public uint EventControls;
|
public uint EventControls;
|
||||||
|
|
||||||
public ControllerData(UUID item, uint ignore, uint ev)
|
public ControllerData(UUID obj, UUID item, uint ignore, uint ev)
|
||||||
{
|
{
|
||||||
|
ObjectID = obj;
|
||||||
ItemID = item;
|
ItemID = item;
|
||||||
IgnoreControls = ignore;
|
IgnoreControls = ignore;
|
||||||
EventControls = ev;
|
EventControls = ev;
|
||||||
|
@ -248,6 +250,7 @@ namespace OpenSim.Framework
|
||||||
public OSDMap PackUpdateMessage()
|
public OSDMap PackUpdateMessage()
|
||||||
{
|
{
|
||||||
OSDMap controldata = new OSDMap();
|
OSDMap controldata = new OSDMap();
|
||||||
|
controldata["object"] = OSD.FromUUID(ObjectID);
|
||||||
controldata["item"] = OSD.FromUUID(ItemID);
|
controldata["item"] = OSD.FromUUID(ItemID);
|
||||||
controldata["ignore"] = OSD.FromInteger(IgnoreControls);
|
controldata["ignore"] = OSD.FromInteger(IgnoreControls);
|
||||||
controldata["event"] = OSD.FromInteger(EventControls);
|
controldata["event"] = OSD.FromInteger(EventControls);
|
||||||
|
@ -258,6 +261,8 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public void UnpackUpdateMessage(OSDMap args)
|
public void UnpackUpdateMessage(OSDMap args)
|
||||||
{
|
{
|
||||||
|
if (args["object"] != null)
|
||||||
|
ObjectID = args["object"].AsUUID();
|
||||||
if (args["item"] != null)
|
if (args["item"] != null)
|
||||||
ItemID = args["item"].AsUUID();
|
ItemID = args["item"].AsUUID();
|
||||||
if (args["ignore"] != null)
|
if (args["ignore"] != null)
|
||||||
|
@ -306,6 +311,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public AgentGroupData[] Groups;
|
public AgentGroupData[] Groups;
|
||||||
public Animation[] Anims;
|
public Animation[] Anims;
|
||||||
|
public Animation DefaultAnim = null;
|
||||||
|
|
||||||
public UUID GranterID;
|
public UUID GranterID;
|
||||||
public UUID ParentPart;
|
public UUID ParentPart;
|
||||||
|
@ -392,6 +398,11 @@ namespace OpenSim.Framework
|
||||||
args["animations"] = anims;
|
args["animations"] = anims;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (DefaultAnim != null)
|
||||||
|
{
|
||||||
|
args["default_animation"] = DefaultAnim.PackUpdateMessage();
|
||||||
|
}
|
||||||
|
|
||||||
if (Appearance != null)
|
if (Appearance != null)
|
||||||
args["packed_appearance"] = Appearance.Pack();
|
args["packed_appearance"] = Appearance.Pack();
|
||||||
|
|
||||||
|
@ -589,6 +600,18 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (args["default_animation"] != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
DefaultAnim = new Animation((OSDMap)args["default_animation"]);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
DefaultAnim = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//if ((args["agent_textures"] != null) && (args["agent_textures"]).Type == OSDType.Array)
|
//if ((args["agent_textures"] != null) && (args["agent_textures"]).Type == OSDType.Array)
|
||||||
//{
|
//{
|
||||||
// OSDArray textures = (OSDArray)(args["agent_textures"]);
|
// OSDArray textures = (OSDArray)(args["agent_textures"]);
|
||||||
|
|
|
@ -465,7 +465,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0));
|
return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private struct avtocrossInfo
|
||||||
|
{
|
||||||
|
public ScenePresence av;
|
||||||
|
public uint ParentID;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The absolute position of this scene object in the scene
|
/// The absolute position of this scene object in the scene
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -517,15 +525,24 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
// We unparent the SP quietly so that it won't
|
// We unparent the SP quietly so that it won't
|
||||||
// be made to stand up
|
// be made to stand up
|
||||||
|
|
||||||
|
List<avtocrossInfo> avsToCross = new List<avtocrossInfo>();
|
||||||
|
|
||||||
foreach (ScenePresence av in m_linkedAvatars)
|
foreach (ScenePresence av in m_linkedAvatars)
|
||||||
{
|
{
|
||||||
|
avtocrossInfo avinfo = new avtocrossInfo();
|
||||||
SceneObjectPart parentPart = m_scene.GetSceneObjectPart(av.ParentID);
|
SceneObjectPart parentPart = m_scene.GetSceneObjectPart(av.ParentID);
|
||||||
if (parentPart != null)
|
if (parentPart != null)
|
||||||
av.ParentUUID = parentPart.UUID;
|
av.ParentUUID = parentPart.UUID;
|
||||||
|
|
||||||
|
avinfo.av = av;
|
||||||
|
avinfo.ParentID = av.ParentID;
|
||||||
|
avsToCross.Add(avinfo);
|
||||||
|
|
||||||
av.ParentID = 0;
|
av.ParentID = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// m_linkedAvatars.Clear();
|
||||||
m_scene.CrossPrimGroupIntoNewRegion(val, this, true);
|
m_scene.CrossPrimGroupIntoNewRegion(val, this, true);
|
||||||
|
|
||||||
// Normalize
|
// Normalize
|
||||||
|
@ -541,18 +558,37 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// If it's deleted, crossing was successful
|
// If it's deleted, crossing was successful
|
||||||
if (IsDeleted)
|
if (IsDeleted)
|
||||||
{
|
{
|
||||||
foreach (ScenePresence av in m_linkedAvatars)
|
// foreach (ScenePresence av in m_linkedAvatars)
|
||||||
|
foreach (avtocrossInfo avinfo in avsToCross)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[SCENE OBJECT]: Crossing avatar {0} to {1}", av.Name, val);
|
ScenePresence av = avinfo.av;
|
||||||
|
if (!av.IsInTransit) // just in case...
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[SCENE OBJECT]: Crossing avatar {0} to {1}", av.Name, val);
|
||||||
|
|
||||||
av.IsInTransit = true;
|
av.IsInTransit = true;
|
||||||
|
|
||||||
CrossAgentToNewRegionDelegate d = entityTransfer.CrossAgentToNewRegionAsync;
|
CrossAgentToNewRegionDelegate d = entityTransfer.CrossAgentToNewRegionAsync;
|
||||||
d.BeginInvoke(av, val, x, y, destination, av.Flying, version, CrossAgentToNewRegionCompleted, d);
|
d.BeginInvoke(av, val, x, y, destination, av.Flying, version, CrossAgentToNewRegionCompleted, d);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
m_log.DebugFormat("[SCENE OBJECT]: Crossing avatar alreasy in transit {0} to {1}", av.Name, val);
|
||||||
}
|
}
|
||||||
|
avsToCross.Clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else // cross failed, put avas back ??
|
||||||
|
{
|
||||||
|
foreach (avtocrossInfo avinfo in avsToCross)
|
||||||
|
{
|
||||||
|
ScenePresence av = avinfo.av;
|
||||||
|
av.ParentUUID = UUID.Zero;
|
||||||
|
av.ParentID = avinfo.ParentID;
|
||||||
|
// m_linkedAvatars.Add(av);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
avsToCross.Clear();
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (RootPart.PhysActor != null)
|
else if (RootPart.PhysActor != null)
|
||||||
{
|
{
|
||||||
|
@ -565,6 +601,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
val.Z = Util.Clamp<float>(oldp.Z, 0.5f, 4096.0f);
|
val.Z = Util.Clamp<float>(oldp.Z, 0.5f, 4096.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* don't see the need but worse don't see where is restored to false if things stay in
|
/* don't see the need but worse don't see where is restored to false if things stay in
|
||||||
foreach (SceneObjectPart part in m_parts.GetArray())
|
foreach (SceneObjectPart part in m_parts.GetArray())
|
||||||
{
|
{
|
||||||
|
@ -640,9 +677,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
agent.ParentPart = null;
|
agent.ParentPart = null;
|
||||||
agent.ParentPosition = Vector3.Zero;
|
agent.ParentPosition = Vector3.Zero;
|
||||||
|
// agent.ParentUUID = UUID.Zero;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
agent.ParentUUID = UUID.Zero;
|
||||||
|
|
||||||
// agent.Reset();
|
// agent.Reset();
|
||||||
// else // Not successful
|
// else // Not successful
|
||||||
// agent.RestoreInCurrentScene();
|
// agent.RestoreInCurrentScene();
|
||||||
|
@ -1779,15 +1819,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
part.ClearUpdateSchedule();
|
part.ClearUpdateSchedule();
|
||||||
if (part == m_rootPart)
|
if (part == m_rootPart)
|
||||||
{
|
{
|
||||||
if (!IsAttachment || (AttachedAvatar == avatar.ControllingClient.AgentId) ||
|
if (!IsAttachment || (AttachedAvatar == avatar.ControllingClient.AgentId) ||
|
||||||
(AttachmentPoint < 31) || (AttachmentPoint > 38))
|
(AttachmentPoint < 31) || (AttachmentPoint > 38))
|
||||||
avatar.ControllingClient.SendKillObject(m_regionHandle, new List<uint> { part.LocalId });
|
avatar.ControllingClient.SendKillObject(m_regionHandle, new List<uint> { part.LocalId });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddScriptLPS(int count)
|
public void AddScriptLPS(int count)
|
||||||
|
@ -2069,6 +2108,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
dupe.m_isBackedUp = false;
|
dupe.m_isBackedUp = false;
|
||||||
dupe.m_parts = new MapAndArray<OpenMetaverse.UUID, SceneObjectPart>();
|
dupe.m_parts = new MapAndArray<OpenMetaverse.UUID, SceneObjectPart>();
|
||||||
|
|
||||||
|
// new group as no sitting avatars
|
||||||
|
dupe.m_linkedAvatars = new List<ScenePresence>();
|
||||||
|
|
||||||
// Warning, The following code related to previousAttachmentStatus is needed so that clones of
|
// Warning, The following code related to previousAttachmentStatus is needed so that clones of
|
||||||
// attachments do not bordercross while they're being duplicated. This is hacktastic!
|
// attachments do not bordercross while they're being duplicated. This is hacktastic!
|
||||||
// Normally, setting AbsolutePosition will bordercross a prim if it's outside the region!
|
// Normally, setting AbsolutePosition will bordercross a prim if it's outside the region!
|
||||||
|
|
|
@ -63,6 +63,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
struct ScriptControllers
|
struct ScriptControllers
|
||||||
{
|
{
|
||||||
|
public UUID objectID;
|
||||||
public UUID itemID;
|
public UUID itemID;
|
||||||
public ScriptControlled ignoreControls;
|
public ScriptControlled ignoreControls;
|
||||||
public ScriptControlled eventControls;
|
public ScriptControlled eventControls;
|
||||||
|
@ -756,7 +757,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_movementAnimationUpdateCounter = 0;
|
m_movementAnimationUpdateCounter = 0;
|
||||||
if (Animator != null)
|
if (Animator != null)
|
||||||
{
|
{
|
||||||
if(ParentID == 0 && !SitGround) // skip it if sitting
|
// If the parentID == 0 we are not sitting
|
||||||
|
// if !SitGournd then we are not sitting on the ground
|
||||||
|
// Fairly straightforward, now here comes the twist
|
||||||
|
// if ParentUUID is NOT UUID.Zero, we are looking to
|
||||||
|
// be sat on an object that isn't there yet. Should
|
||||||
|
// be treated as if sat.
|
||||||
|
if(ParentID == 0 && !SitGround && ParentUUID == UUID.Zero) // skip it if sitting
|
||||||
Animator.UpdateMovementAnimations();
|
Animator.UpdateMovementAnimations();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -923,7 +930,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
AbsolutePosition = pos;
|
AbsolutePosition = pos;
|
||||||
|
|
||||||
AddToPhysicalScene(isFlying);
|
if (m_teleportFlags == TeleportFlags.Default)
|
||||||
|
{
|
||||||
|
Vector3 vel = Velocity;
|
||||||
|
AddToPhysicalScene(isFlying);
|
||||||
|
if (PhysicsActor != null)
|
||||||
|
PhysicsActor.SetMomentum(vel);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
AddToPhysicalScene(isFlying);
|
||||||
|
|
||||||
if (ForceFly)
|
if (ForceFly)
|
||||||
{
|
{
|
||||||
|
@ -974,6 +989,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// If we don't reset the movement flag here, an avatar that crosses to a neighbouring sim and returns will
|
// If we don't reset the movement flag here, an avatar that crosses to a neighbouring sim and returns will
|
||||||
// stall on the border crossing since the existing child agent will still have the last movement
|
// stall on the border crossing since the existing child agent will still have the last movement
|
||||||
// recorded, which stops the input from being processed.
|
// recorded, which stops the input from being processed.
|
||||||
|
|
||||||
MovementFlag = 0;
|
MovementFlag = 0;
|
||||||
|
|
||||||
m_scene.EventManager.TriggerOnMakeRootAgent(this);
|
m_scene.EventManager.TriggerOnMakeRootAgent(this);
|
||||||
|
@ -1014,6 +1030,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// as teleporting back
|
// as teleporting back
|
||||||
TeleportFlags = TeleportFlags.Default;
|
TeleportFlags = TeleportFlags.Default;
|
||||||
|
|
||||||
|
MovementFlag = 0;
|
||||||
|
|
||||||
// It looks like Animator is set to null somewhere, and MakeChild
|
// It looks like Animator is set to null somewhere, and MakeChild
|
||||||
// is called after that. Probably in aborted teleports.
|
// is called after that. Probably in aborted teleports.
|
||||||
if (Animator == null)
|
if (Animator == null)
|
||||||
|
@ -1021,6 +1039,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
else
|
else
|
||||||
Animator.ResetAnimations();
|
Animator.ResetAnimations();
|
||||||
|
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[SCENE PRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}",
|
// "[SCENE PRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}",
|
||||||
// Name, UUID, m_scene.RegionInfo.RegionName);
|
// Name, UUID, m_scene.RegionInfo.RegionName);
|
||||||
|
@ -1047,9 +1066,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
// PhysicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients;
|
// PhysicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients;
|
||||||
PhysicsActor.OnOutOfBounds -= OutOfBoundsCall;
|
PhysicsActor.OnOutOfBounds -= OutOfBoundsCall;
|
||||||
m_scene.PhysicsScene.RemoveAvatar(PhysicsActor);
|
|
||||||
PhysicsActor.UnSubscribeEvents();
|
|
||||||
PhysicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate;
|
PhysicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate;
|
||||||
|
PhysicsActor.UnSubscribeEvents();
|
||||||
|
m_scene.PhysicsScene.RemoveAvatar(PhysicsActor);
|
||||||
PhysicsActor = null;
|
PhysicsActor = null;
|
||||||
}
|
}
|
||||||
// else
|
// else
|
||||||
|
@ -1885,6 +1904,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (ParentID != 0)
|
if (ParentID != 0)
|
||||||
{
|
{
|
||||||
SceneObjectPart part = ParentPart;
|
SceneObjectPart part = ParentPart;
|
||||||
|
UnRegisterSeatControls(part.ParentGroup.UUID);
|
||||||
|
|
||||||
TaskInventoryDictionary taskIDict = part.TaskInventory;
|
TaskInventoryDictionary taskIDict = part.TaskInventory;
|
||||||
if (taskIDict != null)
|
if (taskIDict != null)
|
||||||
{
|
{
|
||||||
|
@ -3212,7 +3233,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
foreach (ScriptControllers c in scriptedcontrols.Values)
|
foreach (ScriptControllers c in scriptedcontrols.Values)
|
||||||
{
|
{
|
||||||
controls[i++] = new ControllerData(c.itemID, (uint)c.ignoreControls, (uint)c.eventControls);
|
controls[i++] = new ControllerData(c.objectID, c.itemID, (uint)c.ignoreControls, (uint)c.eventControls);
|
||||||
}
|
}
|
||||||
cAgent.Controllers = controls;
|
cAgent.Controllers = controls;
|
||||||
}
|
}
|
||||||
|
@ -3223,6 +3244,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
cAgent.Anims = Animator.Animations.ToArray();
|
cAgent.Anims = Animator.Animations.ToArray();
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
|
cAgent.DefaultAnim = Animator.Animations.DefaultAnimation;
|
||||||
|
|
||||||
// Attachment objects
|
// Attachment objects
|
||||||
List<SceneObjectGroup> attachments = GetAttachments();
|
List<SceneObjectGroup> attachments = GetAttachments();
|
||||||
|
@ -3302,6 +3324,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
foreach (ControllerData c in cAgent.Controllers)
|
foreach (ControllerData c in cAgent.Controllers)
|
||||||
{
|
{
|
||||||
ScriptControllers sc = new ScriptControllers();
|
ScriptControllers sc = new ScriptControllers();
|
||||||
|
sc.objectID = c.ObjectID;
|
||||||
sc.itemID = c.ItemID;
|
sc.itemID = c.ItemID;
|
||||||
sc.ignoreControls = (ScriptControlled)c.IgnoreControls;
|
sc.ignoreControls = (ScriptControlled)c.IgnoreControls;
|
||||||
sc.eventControls = (ScriptControlled)c.EventControls;
|
sc.eventControls = (ScriptControlled)c.EventControls;
|
||||||
|
@ -3316,6 +3339,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// FIXME: Why is this null check necessary? Where are the cases where we get a null Anims object?
|
// FIXME: Why is this null check necessary? Where are the cases where we get a null Anims object?
|
||||||
if (cAgent.Anims != null)
|
if (cAgent.Anims != null)
|
||||||
Animator.Animations.FromArray(cAgent.Anims);
|
Animator.Animations.FromArray(cAgent.Anims);
|
||||||
|
if (cAgent.DefaultAnim != null)
|
||||||
|
Animator.Animations.SetDefaultAnimation(cAgent.DefaultAnim.AnimID, cAgent.DefaultAnim.SequenceNum, UUID.Zero);
|
||||||
|
|
||||||
if (cAgent.AttachmentObjects != null && cAgent.AttachmentObjects.Count > 0)
|
if (cAgent.AttachmentObjects != null && cAgent.AttachmentObjects.Count > 0)
|
||||||
{
|
{
|
||||||
|
@ -3791,10 +3816,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public void RegisterControlEventsToScript(int controls, int accept, int pass_on, uint Obj_localID, UUID Script_item_UUID)
|
public void RegisterControlEventsToScript(int controls, int accept, int pass_on, uint Obj_localID, UUID Script_item_UUID)
|
||||||
{
|
{
|
||||||
|
SceneObjectPart p = m_scene.GetSceneObjectPart(Obj_localID);
|
||||||
|
if (p == null)
|
||||||
|
return;
|
||||||
|
|
||||||
ScriptControllers obj = new ScriptControllers();
|
ScriptControllers obj = new ScriptControllers();
|
||||||
obj.ignoreControls = ScriptControlled.CONTROL_ZERO;
|
obj.ignoreControls = ScriptControlled.CONTROL_ZERO;
|
||||||
obj.eventControls = ScriptControlled.CONTROL_ZERO;
|
obj.eventControls = ScriptControlled.CONTROL_ZERO;
|
||||||
|
|
||||||
|
obj.objectID = p.ParentGroup.UUID;
|
||||||
obj.itemID = Script_item_UUID;
|
obj.itemID = Script_item_UUID;
|
||||||
if (pass_on == 0 && accept == 0)
|
if (pass_on == 0 && accept == 0)
|
||||||
{
|
{
|
||||||
|
@ -3843,6 +3873,21 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ControllingClient.SendTakeControls(int.MaxValue, false, false);
|
ControllingClient.SendTakeControls(int.MaxValue, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void UnRegisterSeatControls(UUID obj)
|
||||||
|
{
|
||||||
|
List<UUID> takers = new List<UUID>();
|
||||||
|
|
||||||
|
foreach (ScriptControllers c in scriptedcontrols.Values)
|
||||||
|
{
|
||||||
|
if (c.objectID == obj)
|
||||||
|
takers.Add(c.itemID);
|
||||||
|
}
|
||||||
|
foreach (UUID t in takers)
|
||||||
|
{
|
||||||
|
UnRegisterControlEventsToScript(0, t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void UnRegisterControlEventsToScript(uint Obj_localID, UUID Script_item_UUID)
|
public void UnRegisterControlEventsToScript(uint Obj_localID, UUID Script_item_UUID)
|
||||||
{
|
{
|
||||||
ScriptControllers takecontrols;
|
ScriptControllers takecontrols;
|
||||||
|
|
|
@ -168,6 +168,10 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
m_density = density;
|
m_density = density;
|
||||||
m_mass = 80f; // sure we have a default
|
m_mass = 80f; // sure we have a default
|
||||||
|
|
||||||
|
// force lower density for testing
|
||||||
|
m_density = 3.0f;
|
||||||
|
|
||||||
|
|
||||||
mu = parent_scene.AvatarFriction;
|
mu = parent_scene.AvatarFriction;
|
||||||
|
|
||||||
walkDivisor = walk_divisor;
|
walkDivisor = walk_divisor;
|
||||||
|
@ -1184,7 +1188,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
// destroy avatar capsule and related ODE data
|
// destroy avatar capsule and related ODE data
|
||||||
AvatarGeomAndBodyDestroy();
|
AvatarGeomAndBodyDestroy();
|
||||||
}
|
}
|
||||||
|
m_freemove = false;
|
||||||
m_isPhysical = NewStatus;
|
m_isPhysical = NewStatus;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1236,7 +1240,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
+ (Amotor == IntPtr.Zero ? "Amotor " : ""));
|
+ (Amotor == IntPtr.Zero ? "Amotor " : ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
m_freemove = false;
|
||||||
m_pidControllerActive = true;
|
m_pidControllerActive = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1250,6 +1254,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
if (Body != IntPtr.Zero)
|
if (Body != IntPtr.Zero)
|
||||||
d.BodySetPosition(Body, newPos.X, newPos.Y, newPos.Z);
|
d.BodySetPosition(Body, newPos.X, newPos.Y, newPos.Z);
|
||||||
_position = newPos;
|
_position = newPos;
|
||||||
|
m_freemove = false;
|
||||||
m_pidControllerActive = true;
|
m_pidControllerActive = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1260,6 +1265,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
private void changeVelocity(Vector3 newVel)
|
private void changeVelocity(Vector3 newVel)
|
||||||
{
|
{
|
||||||
m_pidControllerActive = true;
|
m_pidControllerActive = true;
|
||||||
|
m_freemove = false;
|
||||||
_target_velocity = newVel;
|
_target_velocity = newVel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue