aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Client/MXP/ClientStack/MXPClientView.cs16
-rw-r--r--OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs30
2 files changed, 44 insertions, 2 deletions
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
index ccf3a1b..27bf078 100644
--- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
+++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
@@ -365,7 +365,7 @@ namespace OpenSim.Client.MXP.ClientStack
365 365
366 public void Start() 366 public void Start()
367 { 367 {
368 // We dont do this 368 Scene.AddNewClient(this);
369 } 369 }
370 370
371 public void Stop() 371 public void Stop()
@@ -403,6 +403,18 @@ namespace OpenSim.Client.MXP.ClientStack
403 403
404 public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) 404 public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
405 { 405 {
406 m_log.Info("[MXP] Completing Handshake to Region");
407
408 if (OnRegionHandShakeReply != null)
409 {
410 OnRegionHandShakeReply(this);
411 }
412
413 if (OnCompleteMovementToRegion != null)
414 {
415 OnCompleteMovementToRegion();
416 }
417
406 // Need to translate to MXP somehow 418 // Need to translate to MXP somehow
407 } 419 }
408 420
@@ -552,6 +564,8 @@ namespace OpenSim.Client.MXP.ClientStack
552 564
553 private void MXPSendPrimitive(uint localID, UUID ownerID, Vector3 acc, Vector3 rvel, PrimitiveBaseShape primShape, Vector3 pos, UUID objectID, Vector3 vel, Quaternion rotation) 565 private void MXPSendPrimitive(uint localID, UUID ownerID, Vector3 acc, Vector3 rvel, PrimitiveBaseShape primShape, Vector3 pos, UUID objectID, Vector3 vel, Quaternion rotation)
554 { 566 {
567 m_log.Info("[MXP] Transmitting Primitive");
568
555 PerceptionEventMessage pe = new PerceptionEventMessage(); 569 PerceptionEventMessage pe = new PerceptionEventMessage();
556 570
557 pe.ObjectFragment.ObjectIndex = localID; 571 pe.ObjectFragment.ObjectIndex = localID;
diff --git a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
index 2634717..1e343c4 100644
--- a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
+++ b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
@@ -4,11 +4,13 @@
4using System; 4using System;
5using System.Collections.Generic; 5using System.Collections.Generic;
6using System.Reflection; 6using System.Reflection;
7using System.Threading;
7using log4net; 8using log4net;
8using MXP; 9using MXP;
9using MXP.Messages; 10using MXP.Messages;
10using OpenMetaverse; 11using OpenMetaverse;
11using OpenSim.Client.MXP.ClientStack; 12using OpenSim.Client.MXP.ClientStack;
13using OpenSim.Framework;
12using OpenSim.Region.Framework.Scenes; 14using OpenSim.Region.Framework.Scenes;
13 15
14namespace OpenSim.Client.MXP.PacketHandler 16namespace OpenSim.Client.MXP.PacketHandler
@@ -24,6 +26,8 @@ namespace OpenSim.Client.MXP.PacketHandler
24 26
25 private readonly Transmitter transmitter; 27 private readonly Transmitter transmitter;
26 28
29 private readonly Thread m_clientThread;
30
27 private readonly IList<Session> sessions = new List<Session>(); 31 private readonly IList<Session> sessions = new List<Session>();
28 private readonly IList<Session> sessionsToClient = new List<Session>(); 32 private readonly IList<Session> sessionsToClient = new List<Session>();
29 private readonly IList<MXPClientView> sessionsToRemove = new List<MXPClientView>(); 33 private readonly IList<MXPClientView> sessionsToRemove = new List<MXPClientView>();
@@ -48,6 +52,16 @@ namespace OpenSim.Client.MXP.PacketHandler
48 programName = "OpenSimulator"; 52 programName = "OpenSimulator";
49 53
50 transmitter = new Transmitter(port); 54 transmitter = new Transmitter(port);
55
56 m_clientThread = new Thread(StartListener);
57 m_clientThread.Name = "MXPThread";
58 m_clientThread.IsBackground = true;
59 m_clientThread.Start();
60 ThreadTracker.Add(m_clientThread);
61 }
62
63 public void StartListener()
64 {
51 transmitter.Startup(); 65 transmitter.Startup();
52 } 66 }
53 67
@@ -255,9 +269,23 @@ namespace OpenSim.Client.MXP.PacketHandler
255 269
256 MXPClientView client = new MXPClientView(session, mxpSessionID, target, 270 MXPClientView client = new MXPClientView(session, mxpSessionID, target,
257 joinRequestMessage.ParticipantName); 271 joinRequestMessage.ParticipantName);
272 m_log.Info("[MXP ClientStack] Created Client");
258 Clients.Add(client); 273 Clients.Add(client);
259 274
260 target.AddNewClient(client); 275 m_log.Info("[MXP ClientStack] Adding to Scene");
276 target.ClientManager.Add(client.CircuitCode, client);
277
278 m_log.Info("[MXP ClientStack] Initialising...");
279 try
280 {
281 client.Start();
282 } catch( Exception e)
283 {
284 m_log.Info(e);
285 }
286
287 m_log.Info("[MXP ClientStack] Connected");
288 //target.EventManager.TriggerOnNewClient(client);
261 } 289 }
262 else 290 else
263 { 291 {