diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs index b35b5a3..59c54f0 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | |||
@@ -79,8 +79,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
79 | { | 79 | { |
80 | // Add to queue for all scripts in ObjectID object | 80 | // Add to queue for all scripts in ObjectID object |
81 | XDetectParams[] det = new XDetectParams[1]; | 81 | XDetectParams[] det = new XDetectParams[1]; |
82 | det[0] = new XDetectParams(); | ||
82 | det[0].Key = remoteClient.AgentId; | 83 | det[0].Key = remoteClient.AgentId; |
83 | 84 | ||
85 | SceneObjectPart part = myScriptEngine.World.GetSceneObjectPart( | ||
86 | localID); | ||
87 | if(part == null) | ||
88 | return; | ||
89 | |||
90 | det[0].LinkNum = 0; | ||
91 | if(part.ParentGroup.Children.Count > 0) | ||
92 | det[0].LinkNum = part.LinkNum + 1; | ||
93 | |||
84 | myScriptEngine.PostObjectEvent(localID, new XEventParams( | 94 | myScriptEngine.PostObjectEvent(localID, new XEventParams( |
85 | "touch_start", new Object[] { new LSL_Types.LSLInteger(1) }, | 95 | "touch_start", new Object[] { new LSL_Types.LSLInteger(1) }, |
86 | det)); | 96 | det)); |
@@ -91,11 +101,21 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
91 | { | 101 | { |
92 | // Add to queue for all scripts in ObjectID object | 102 | // Add to queue for all scripts in ObjectID object |
93 | XDetectParams[] det = new XDetectParams[1]; | 103 | XDetectParams[] det = new XDetectParams[1]; |
104 | det[0] = new XDetectParams(); | ||
94 | det[0].Key = remoteClient.AgentId; | 105 | det[0].Key = remoteClient.AgentId; |
95 | det[0].OffsetPos = new LSL_Types.Vector3(offsetPos.X, | 106 | det[0].OffsetPos = new LSL_Types.Vector3(offsetPos.X, |
96 | offsetPos.Y, | 107 | offsetPos.Y, |
97 | offsetPos.Z); | 108 | offsetPos.Z); |
98 | 109 | ||
110 | SceneObjectPart part = myScriptEngine.World.GetSceneObjectPart( | ||
111 | localID); | ||
112 | if(part == null) | ||
113 | return; | ||
114 | |||
115 | det[0].LinkNum = 0; | ||
116 | if(part.ParentGroup.Children.Count > 0) | ||
117 | det[0].LinkNum = part.LinkNum + 1; | ||
118 | |||
99 | myScriptEngine.PostObjectEvent(localID, new XEventParams( | 119 | myScriptEngine.PostObjectEvent(localID, new XEventParams( |
100 | "touch", new Object[] { new LSL_Types.LSLInteger(1) }, | 120 | "touch", new Object[] { new LSL_Types.LSLInteger(1) }, |
101 | det)); | 121 | det)); |
@@ -105,8 +125,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
105 | { | 125 | { |
106 | // Add to queue for all scripts in ObjectID object | 126 | // Add to queue for all scripts in ObjectID object |
107 | XDetectParams[] det = new XDetectParams[1]; | 127 | XDetectParams[] det = new XDetectParams[1]; |
128 | det[0] = new XDetectParams(); | ||
108 | det[0].Key = remoteClient.AgentId; | 129 | det[0].Key = remoteClient.AgentId; |
109 | 130 | ||
131 | SceneObjectPart part = myScriptEngine.World.GetSceneObjectPart( | ||
132 | localID); | ||
133 | if(part == null) | ||
134 | return; | ||
135 | |||
136 | det[0].LinkNum = 0; | ||
137 | if(part.ParentGroup.Children.Count > 0) | ||
138 | det[0].LinkNum = part.LinkNum + 1; | ||
139 | |||
110 | myScriptEngine.PostObjectEvent(localID, new XEventParams( | 140 | myScriptEngine.PostObjectEvent(localID, new XEventParams( |
111 | "touch_end", new Object[] { new LSL_Types.LSLInteger(1) }, | 141 | "touch_end", new Object[] { new LSL_Types.LSLInteger(1) }, |
112 | det)); | 142 | det)); |
@@ -137,6 +167,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
137 | { | 167 | { |
138 | // Add to queue for all scripts in ObjectID object | 168 | // Add to queue for all scripts in ObjectID object |
139 | XDetectParams[] det = new XDetectParams[1]; | 169 | XDetectParams[] det = new XDetectParams[1]; |
170 | det[0] = new XDetectParams(); | ||
140 | det[0].Key = remoteClient.AgentId; | 171 | det[0].Key = remoteClient.AgentId; |
141 | 172 | ||
142 | myScriptEngine.PostObjectEvent(localID, new XEventParams( | 173 | myScriptEngine.PostObjectEvent(localID, new XEventParams( |
@@ -150,6 +181,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
150 | { | 181 | { |
151 | // Add to queue for all scripts in ObjectID object | 182 | // Add to queue for all scripts in ObjectID object |
152 | XDetectParams[] det = new XDetectParams[1]; | 183 | XDetectParams[] det = new XDetectParams[1]; |
184 | det[0] = new XDetectParams(); | ||
153 | det[0].Key = remoteClient.AgentId; | 185 | det[0].Key = remoteClient.AgentId; |
154 | 186 | ||
155 | myScriptEngine.PostObjectEvent(localID, new XEventParams( | 187 | myScriptEngine.PostObjectEvent(localID, new XEventParams( |
@@ -162,6 +194,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
162 | { | 194 | { |
163 | // Add to queue for all scripts in ObjectID object | 195 | // Add to queue for all scripts in ObjectID object |
164 | XDetectParams[] det = new XDetectParams[1]; | 196 | XDetectParams[] det = new XDetectParams[1]; |
197 | det[0] = new XDetectParams(); | ||
165 | det[0].Key = remoteClient.AgentId; | 198 | det[0].Key = remoteClient.AgentId; |
166 | 199 | ||
167 | myScriptEngine.PostObjectEvent(localID, new XEventParams( | 200 | myScriptEngine.PostObjectEvent(localID, new XEventParams( |