aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
authorMW2007-11-05 13:58:44 +0000
committerMW2007-11-05 13:58:44 +0000
commit73fbacea1fe18873fab175d82189a1becb0f8e10 (patch)
tree4078f63bb77e7a512a7069b209ca5be569882b52 /OpenSim/Region/Environment/Modules
parentprim cuts in ODE (diff)
downloadopensim-SC_OLD-73fbacea1fe18873fab175d82189a1becb0f8e10.zip
opensim-SC_OLD-73fbacea1fe18873fab175d82189a1becb0f8e10.tar.gz
opensim-SC_OLD-73fbacea1fe18873fab175d82189a1becb0f8e10.tar.bz2
opensim-SC_OLD-73fbacea1fe18873fab175d82189a1becb0f8e10.tar.xz
Started to cleanup/close down childagent connections when a user teleports. As the client will not close old childagent connections without being told explicitly to do so by each region the connection is to. Currently only implemented in standalone mode. ( the TellRegionToCloseChildConnection( ) in OGS1GridServices.cs needs implementing for grid mode, and the inter region .net remoting added for the new messages).
hopefully fixed the echo bug in chatmodule.
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/ChatModule.cs99
1 files changed, 51 insertions, 48 deletions
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs
index 9d4187a..52491ed 100644
--- a/OpenSim/Region/Environment/Modules/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/ChatModule.cs
@@ -181,60 +181,63 @@ namespace OpenSim.Region.Environment.Modules
181 { 181 {
182 m_scene.ForEachScenePresence(delegate(ScenePresence presence) 182 m_scene.ForEachScenePresence(delegate(ScenePresence presence)
183 { 183 {
184 int dis = -100000; 184 if (!presence.IsChildAgent)
185
186 LLVector3 avatarRegionPos = presence.AbsolutePosition +
187 new LLVector3(
188 scene.RegionInfo.RegionLocX*256,
189 scene.RegionInfo.RegionLocY*256,
190 0);
191 dis =
192 Math.Abs((int) avatarRegionPos.GetDistanceTo(fromRegionPos));
193
194 switch (e.Type)
195 { 185 {
196 case ChatTypeEnum.Whisper: 186 int dis = -100000;
197 if (dis < m_whisperdistance) 187
198 { 188 LLVector3 avatarRegionPos = presence.AbsolutePosition +
199 //should change so the message is sent through the avatar rather than direct to the ClientView 189 new LLVector3(
200 presence.ControllingClient.SendChatMessage(message, 190 scene.RegionInfo.RegionLocX * 256,
201 type, 191 scene.RegionInfo.RegionLocY * 256,
202 fromPos, 192 0);
203 fromName, 193 dis =
204 fromAgentID); 194 Math.Abs((int)avatarRegionPos.GetDistanceTo(fromRegionPos));
205 } 195
206 break; 196 switch (e.Type)
207 case ChatTypeEnum.Say: 197 {
208 if (dis < m_saydistance) 198 case ChatTypeEnum.Whisper:
209 { 199 if (dis < m_whisperdistance)
210 //Console.WriteLine("sending chat"); 200 {
211 presence.ControllingClient.SendChatMessage(message, 201 //should change so the message is sent through the avatar rather than direct to the ClientView
212 type, 202 presence.ControllingClient.SendChatMessage(message,
213 fromPos, 203 type,
214 fromName, 204 fromPos,
215 fromAgentID); 205 fromName,
216 } 206 fromAgentID);
217 break; 207 }
218 case ChatTypeEnum.Shout: 208 break;
219 if (dis < m_shoutdistance) 209 case ChatTypeEnum.Say:
220 { 210 if (dis < m_saydistance)
211 {
212 //Console.WriteLine("sending chat");
213 presence.ControllingClient.SendChatMessage(message,
214 type,
215 fromPos,
216 fromName,
217 fromAgentID);
218 }
219 break;
220 case ChatTypeEnum.Shout:
221 if (dis < m_shoutdistance)
222 {
223 presence.ControllingClient.SendChatMessage(message,
224 type,
225 fromPos,
226 fromName,
227 fromAgentID);
228 }
229 break;
230
231 case ChatTypeEnum.Broadcast:
221 presence.ControllingClient.SendChatMessage(message, 232 presence.ControllingClient.SendChatMessage(message,
222 type, 233 type,
223 fromPos, 234 fromPos,
224 fromName, 235 fromName,
225 fromAgentID); 236 fromAgentID);
226 } 237 break;
227 break; 238 default:
228 239 break;
229 case ChatTypeEnum.Broadcast: 240 }
230 presence.ControllingClient.SendChatMessage(message,
231 type,
232 fromPos,
233 fromName,
234 fromAgentID);
235 break;
236 default:
237 break;
238 } 241 }
239 }); 242 });
240 } 243 }