aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorlbsa712007-09-20 05:22:18 +0000
committerlbsa712007-09-20 05:22:18 +0000
commit3c7161d12884e1d13db6261bea087e16541e376e (patch)
tree546f790e74463c3d962ea7cb8269b0e31ba10b51 /OpenSim
parent* Added TryGetAvatar to SceneManager (diff)
downloadopensim-SC-3c7161d12884e1d13db6261bea087e16541e376e.zip
opensim-SC-3c7161d12884e1d13db6261bea087e16541e376e.tar.gz
opensim-SC-3c7161d12884e1d13db6261bea087e16541e376e.tar.bz2
opensim-SC-3c7161d12884e1d13db6261bea087e16541e376e.tar.xz
* Rewired Touch to route to group/part (Still triggering EventManager as well)
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs14
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneEvents.cs2
-rw-r--r--OpenSim/Region/Examples/SimpleApp/MyWorld.cs23
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs6
4 files changed, 19 insertions, 26 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 5a7dda5..efd682f 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -516,6 +516,20 @@ namespace OpenSim.Region.Environment.Scenes
516 public virtual void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) 516 public virtual void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
517 { 517 {
518 EventManager.TriggerObjectGrab(localID, offsetPos, remoteClient); 518 EventManager.TriggerObjectGrab(localID, offsetPos, remoteClient);
519
520 foreach (EntityBase ent in Entities.Values)
521 {
522 if (ent is SceneObjectGroup)
523 {
524 SceneObjectGroup obj = ent as SceneObjectGroup;
525
526 if( obj.HasChildPrim( localID ) )
527 {
528 obj.ObjectGrabHandler(localID, offsetPos, remoteClient);
529 return;
530 }
531 }
532 }
519 } 533 }
520 } 534 }
521} \ No newline at end of file 535} \ No newline at end of file
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
index a5d8667..8e8e9a7 100644
--- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -133,7 +133,9 @@ namespace OpenSim.Region.Environment.Scenes
133 public void TriggerObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) 133 public void TriggerObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
134 { 134 {
135 if (OnObjectGrab != null) 135 if (OnObjectGrab != null)
136 {
136 OnObjectGrab(localID, offsetPos, remoteClient); 137 OnObjectGrab(localID, offsetPos, remoteClient);
138 }
137 } 139 }
138 140
139 public void TriggerRezScript(uint localID, LLUUID itemID, string script) 141 public void TriggerRezScript(uint localID, LLUUID itemID, string script)
diff --git a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
index 1f62c88..e4b033d 100644
--- a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
@@ -41,27 +41,6 @@ namespace SimpleApp
41 this.CreateTerrainTexture(); 41 this.CreateTerrainTexture();
42 } 42 }
43 43
44 public override void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
45 {
46 foreach (EntityBase ent in Entities.Values)
47 {
48 if (ent is SceneObjectGroup)
49 {
50 SceneObjectGroup obj = ent as SceneObjectGroup;
51
52 if( obj.HasChildPrim( localID ) )
53 {
54 obj.ObjectGrabHandler(localID, offsetPos, remoteClient);
55 return;
56 }
57 }
58 }
59
60 base.ProcessObjectGrab(localID, offsetPos, remoteClient);
61 }
62
63 #region IWorld Members
64
65 override public void AddNewClient(IClientAPI client, bool child) 44 override public void AddNewClient(IClientAPI client, bool child)
66 { 45 {
67 SubscribeToClientEvents(client); 46 SubscribeToClientEvents(client);
@@ -79,7 +58,5 @@ namespace SimpleApp
79 58
80 client.SendRegionHandshake(m_regInfo); 59 client.SendRegionHandshake(m_regInfo);
81 } 60 }
82
83 #endregion
84 } 61 }
85} 62}
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs
index d4f0327..ef0ddff 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs
@@ -52,9 +52,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
52 52
53 // Hook up a test event to our test form 53 // Hook up a test event to our test form
54 myScriptEngine.Log.Verbose("ScriptEngine", "Hooking up to server events"); 54 myScriptEngine.Log.Verbose("ScriptEngine", "Hooking up to server events");
55 myScriptEngine.World.EventManager.OnObjectGrab += new OpenSim.Region.Environment.Scenes.EventManager.ObjectGrabDelegate(touch_start); 55 myScriptEngine.World.EventManager.OnObjectGrab += touch_start;
56 myScriptEngine.World.EventManager.OnRezScript += new OpenSim.Region.Environment.Scenes.EventManager.NewRezScript(OnRezScript); 56 myScriptEngine.World.EventManager.OnRezScript += OnRezScript;
57 myScriptEngine.World.EventManager.OnRemoveScript += new OpenSim.Region.Environment.Scenes.EventManager.RemoveScript(OnRemoveScript); 57 myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript;
58 58
59 } 59 }
60 60