From: Chris Yeoh <cyeoh@au1.ibm.com>
The attached patch implements llPassTouches. It has been added to the export/import XML along with the flag for AllowedInventoryDrop. The MySQL backend has been updated as well, though I haven't done one of those before so could do with a check. I added the migration mysql file as well. The other data backends need updating as well.0.6.6-post-fixes
parent
9e37e291b0
commit
901fdca13b
|
@ -196,6 +196,7 @@ namespace OpenSim.Data.MySQL
|
||||||
"ColorR, ColorG, ColorB, ColorA, "+
|
"ColorR, ColorG, ColorB, ColorA, "+
|
||||||
"ParticleSystem, ClickAction, Material, "+
|
"ParticleSystem, ClickAction, Material, "+
|
||||||
"CollisionSound, CollisionSoundVolume, "+
|
"CollisionSound, CollisionSoundVolume, "+
|
||||||
|
"PassTouches, "+
|
||||||
"LinkNumber) values (" + "?UUID, "+
|
"LinkNumber) values (" + "?UUID, "+
|
||||||
"?CreationDate, ?Name, ?Text, "+
|
"?CreationDate, ?Name, ?Text, "+
|
||||||
"?Description, ?SitName, ?TouchName, "+
|
"?Description, ?SitName, ?TouchName, "+
|
||||||
|
@ -227,7 +228,7 @@ namespace OpenSim.Data.MySQL
|
||||||
"?SaleType, ?ColorR, ?ColorG, "+
|
"?SaleType, ?ColorR, ?ColorG, "+
|
||||||
"?ColorB, ?ColorA, ?ParticleSystem, "+
|
"?ColorB, ?ColorA, ?ParticleSystem, "+
|
||||||
"?ClickAction, ?Material, ?CollisionSound, "+
|
"?ClickAction, ?Material, ?CollisionSound, "+
|
||||||
"?CollisionSoundVolume, ?LinkNumber)";
|
"?CollisionSoundVolume, ?PassTouches, ?LinkNumber)";
|
||||||
|
|
||||||
FillPrimCommand(cmd, prim, obj.UUID, regionUUID);
|
FillPrimCommand(cmd, prim, obj.UUID, regionUUID);
|
||||||
|
|
||||||
|
@ -950,6 +951,9 @@ namespace OpenSim.Data.MySQL
|
||||||
|
|
||||||
prim.CollisionSound = new UUID(row["CollisionSound"].ToString());
|
prim.CollisionSound = new UUID(row["CollisionSound"].ToString());
|
||||||
prim.CollisionSoundVolume = Convert.ToSingle(row["CollisionSoundVolume"]);
|
prim.CollisionSoundVolume = Convert.ToSingle(row["CollisionSoundVolume"]);
|
||||||
|
|
||||||
|
if (Convert.ToInt16(row["PassTouches"]) != 0)
|
||||||
|
prim.PassTouches = true;
|
||||||
prim.LinkNum = Convert.ToInt32(row["LinkNumber"]);
|
prim.LinkNum = Convert.ToInt32(row["LinkNumber"]);
|
||||||
|
|
||||||
return prim;
|
return prim;
|
||||||
|
@ -1272,6 +1276,12 @@ namespace OpenSim.Data.MySQL
|
||||||
|
|
||||||
cmd.Parameters.AddWithValue("CollisionSound", prim.CollisionSound.ToString());
|
cmd.Parameters.AddWithValue("CollisionSound", prim.CollisionSound.ToString());
|
||||||
cmd.Parameters.AddWithValue("CollisionSoundVolume", prim.CollisionSoundVolume);
|
cmd.Parameters.AddWithValue("CollisionSoundVolume", prim.CollisionSoundVolume);
|
||||||
|
|
||||||
|
if (prim.PassTouches)
|
||||||
|
cmd.Parameters.AddWithValue("PassTouches", 1);
|
||||||
|
else
|
||||||
|
cmd.Parameters.AddWithValue("PassTouches", 0);
|
||||||
|
|
||||||
cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum);
|
cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
BEGIN;
|
||||||
|
|
||||||
|
ALTER TABLE prims ADD COLUMN PassTouches tinyint not null default 0;
|
||||||
|
|
||||||
|
COMMIT;
|
|
@ -253,8 +253,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// If not, deliver to root prim
|
// If not, deliver to root prim
|
||||||
if ((part.ScriptEvents & scriptEvents.touch_start) != 0)
|
if ((part.ScriptEvents & scriptEvents.touch_start) != 0)
|
||||||
EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
|
EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
|
||||||
else
|
// Deliver to the root prim if the touched prim doesn't handle touches
|
||||||
|
// or if we're meant to pass on touches anyway. Don't send to root prim
|
||||||
|
// if prim touched is the root prim as we just did it
|
||||||
|
if (((part.ScriptEvents & scriptEvents.touch_start) == 0) ||
|
||||||
|
(part.PassTouches && (part.LocalId != obj.RootPart.LocalId)))
|
||||||
|
{
|
||||||
EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
|
EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
#region Fields
|
#region Fields
|
||||||
|
|
||||||
[XmlIgnore]
|
|
||||||
public bool AllowedDrop = false;
|
public bool AllowedDrop = false;
|
||||||
|
|
||||||
[XmlIgnore]
|
[XmlIgnore]
|
||||||
|
@ -216,6 +215,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
private readonly UndoStack<UndoState> m_undo = new UndoStack<UndoState>(5);
|
private readonly UndoStack<UndoState> m_undo = new UndoStack<UndoState>(5);
|
||||||
private UUID _creatorID;
|
private UUID _creatorID;
|
||||||
|
|
||||||
|
|
||||||
|
private bool m_passTouches = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Only used internally to schedule client updates.
|
/// Only used internally to schedule client updates.
|
||||||
/// 0 - no update is scheduled
|
/// 0 - no update is scheduled
|
||||||
|
@ -431,6 +433,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool PassTouches
|
||||||
|
{
|
||||||
|
get { return m_passTouches; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
m_passTouches = value;
|
||||||
|
if (ParentGroup != null)
|
||||||
|
ParentGroup.HasGroupChanged = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public ulong RegionHandle
|
public ulong RegionHandle
|
||||||
{
|
{
|
||||||
get { return m_regionHandle; }
|
get { return m_regionHandle; }
|
||||||
|
|
|
@ -3705,7 +3705,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public void llPassTouches(int pass)
|
public void llPassTouches(int pass)
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
NotImplemented("llPassTouches");
|
if (pass != 0)
|
||||||
|
m_host.PassTouches = true;
|
||||||
|
else
|
||||||
|
m_host.PassTouches = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LSL_String llRequestAgentData(string id, int data)
|
public LSL_String llRequestAgentData(string id, int data)
|
||||||
|
|
Loading…
Reference in New Issue