aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDr Scofield2009-05-25 11:26:36 +0000
committerDr Scofield2009-05-25 11:26:36 +0000
commit0bff818d39617f9aa1a8146fc2ad9bc15efb4698 (patch)
treefdf92e47c2b84ac1b4369378f51744747243e056 /OpenSim
parentconverting CapabilitiesModule to new region module scheme (diff)
downloadopensim-SC_OLD-0bff818d39617f9aa1a8146fc2ad9bc15efb4698.zip
opensim-SC_OLD-0bff818d39617f9aa1a8146fc2ad9bc15efb4698.tar.gz
opensim-SC_OLD-0bff818d39617f9aa1a8146fc2ad9bc15efb4698.tar.bz2
opensim-SC_OLD-0bff818d39617f9aa1a8146fc2ad9bc15efb4698.tar.xz
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.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/MySQL/MySQLRegionData.cs14
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs15
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs5
4 files changed, 38 insertions, 6 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs
index b13813f..8a24fec 100644
--- a/OpenSim/Data/MySQL/MySQLRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLRegionData.cs
@@ -196,6 +196,7 @@ namespace OpenSim.Data.MySQL
196 "ColorR, ColorG, ColorB, ColorA, "+ 196 "ColorR, ColorG, ColorB, ColorA, "+
197 "ParticleSystem, ClickAction, Material, "+ 197 "ParticleSystem, ClickAction, Material, "+
198 "CollisionSound, CollisionSoundVolume, "+ 198 "CollisionSound, CollisionSoundVolume, "+
199 "PassTouches, "+
199 "LinkNumber) values (" + "?UUID, "+ 200 "LinkNumber) values (" + "?UUID, "+
200 "?CreationDate, ?Name, ?Text, "+ 201 "?CreationDate, ?Name, ?Text, "+
201 "?Description, ?SitName, ?TouchName, "+ 202 "?Description, ?SitName, ?TouchName, "+
@@ -227,7 +228,7 @@ namespace OpenSim.Data.MySQL
227 "?SaleType, ?ColorR, ?ColorG, "+ 228 "?SaleType, ?ColorR, ?ColorG, "+
228 "?ColorB, ?ColorA, ?ParticleSystem, "+ 229 "?ColorB, ?ColorA, ?ParticleSystem, "+
229 "?ClickAction, ?Material, ?CollisionSound, "+ 230 "?ClickAction, ?Material, ?CollisionSound, "+
230 "?CollisionSoundVolume, ?LinkNumber)"; 231 "?CollisionSoundVolume, ?PassTouches, ?LinkNumber)";
231 232
232 FillPrimCommand(cmd, prim, obj.UUID, regionUUID); 233 FillPrimCommand(cmd, prim, obj.UUID, regionUUID);
233 234
@@ -950,6 +951,9 @@ namespace OpenSim.Data.MySQL
950 951
951 prim.CollisionSound = new UUID(row["CollisionSound"].ToString()); 952 prim.CollisionSound = new UUID(row["CollisionSound"].ToString());
952 prim.CollisionSoundVolume = Convert.ToSingle(row["CollisionSoundVolume"]); 953 prim.CollisionSoundVolume = Convert.ToSingle(row["CollisionSoundVolume"]);
954
955 if (Convert.ToInt16(row["PassTouches"]) != 0)
956 prim.PassTouches = true;
953 prim.LinkNum = Convert.ToInt32(row["LinkNumber"]); 957 prim.LinkNum = Convert.ToInt32(row["LinkNumber"]);
954 958
955 return prim; 959 return prim;
@@ -1272,6 +1276,12 @@ namespace OpenSim.Data.MySQL
1272 1276
1273 cmd.Parameters.AddWithValue("CollisionSound", prim.CollisionSound.ToString()); 1277 cmd.Parameters.AddWithValue("CollisionSound", prim.CollisionSound.ToString());
1274 cmd.Parameters.AddWithValue("CollisionSoundVolume", prim.CollisionSoundVolume); 1278 cmd.Parameters.AddWithValue("CollisionSoundVolume", prim.CollisionSoundVolume);
1279
1280 if (prim.PassTouches)
1281 cmd.Parameters.AddWithValue("PassTouches", 1);
1282 else
1283 cmd.Parameters.AddWithValue("PassTouches", 0);
1284
1275 cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum); 1285 cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum);
1276 } 1286 }
1277 1287
@@ -1534,4 +1544,4 @@ namespace OpenSim.Data.MySQL
1534 } 1544 }
1535 } 1545 }
1536 } 1546 }
1537} \ No newline at end of file 1547}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 4c99873..8bf47e7 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -251,10 +251,16 @@ namespace OpenSim.Region.Framework.Scenes
251 251
252 // If the touched prim handles touches, deliver it 252 // If the touched prim handles touches, deliver it
253 // If not, deliver to root prim 253 // If not, deliver to root prim
254 if ((part.ScriptEvents & scriptEvents.touch_start) != 0) 254 if ((part.ScriptEvents & scriptEvents.touch_start) != 0)
255 EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg); 255 EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
256 else 256 // Deliver to the root prim if the touched prim doesn't handle touches
257 // or if we're meant to pass on touches anyway. Don't send to root prim
258 // if prim touched is the root prim as we just did it
259 if (((part.ScriptEvents & scriptEvents.touch_start) == 0) ||
260 (part.PassTouches && (part.LocalId != obj.RootPart.LocalId)))
261 {
257 EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg); 262 EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
263 }
258 264
259 return; 265 return;
260 } 266 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 9a455ae..719b028 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -102,7 +102,6 @@ namespace OpenSim.Region.Framework.Scenes
102 102
103 #region Fields 103 #region Fields
104 104
105 [XmlIgnore]
106 public bool AllowedDrop = false; 105 public bool AllowedDrop = false;
107 106
108 [XmlIgnore] 107 [XmlIgnore]
@@ -216,6 +215,9 @@ namespace OpenSim.Region.Framework.Scenes
216 private readonly UndoStack<UndoState> m_undo = new UndoStack<UndoState>(5); 215 private readonly UndoStack<UndoState> m_undo = new UndoStack<UndoState>(5);
217 private UUID _creatorID; 216 private UUID _creatorID;
218 217
218
219 private bool m_passTouches = false;
220
219 /// <summary> 221 /// <summary>
220 /// Only used internally to schedule client updates. 222 /// Only used internally to schedule client updates.
221 /// 0 - no update is scheduled 223 /// 0 - no update is scheduled
@@ -431,6 +433,17 @@ namespace OpenSim.Region.Framework.Scenes
431 } 433 }
432 } 434 }
433 435
436 public bool PassTouches
437 {
438 get { return m_passTouches; }
439 set
440 {
441 m_passTouches = value;
442 if (ParentGroup != null)
443 ParentGroup.HasGroupChanged = true;
444 }
445 }
446
434 public ulong RegionHandle 447 public ulong RegionHandle
435 { 448 {
436 get { return m_regionHandle; } 449 get { return m_regionHandle; }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index f932dbe..f4a944c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3705,7 +3705,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3705 public void llPassTouches(int pass) 3705 public void llPassTouches(int pass)
3706 { 3706 {
3707 m_host.AddScriptLPS(1); 3707 m_host.AddScriptLPS(1);
3708 NotImplemented("llPassTouches"); 3708 if (pass != 0)
3709 m_host.PassTouches = true;
3710 else
3711 m_host.PassTouches = false;
3709 } 3712 }
3710 3713
3711 public LSL_String llRequestAgentData(string id, int data) 3714 public LSL_String llRequestAgentData(string id, int data)