diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Examples/SimpleApp2/MyClientView.cs | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/OpenSim/Examples/SimpleApp2/MyClientView.cs b/OpenSim/Examples/SimpleApp2/MyClientView.cs deleted file mode 100644 index 4ef3c94..0000000 --- a/OpenSim/Examples/SimpleApp2/MyClientView.cs +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using OpenSim; | ||
5 | using libsecondlife; | ||
6 | using OpenSim.Framework.Interfaces; | ||
7 | using System.Net; | ||
8 | using libsecondlife.Packets; | ||
9 | using OpenSim.Assets; | ||
10 | using OpenSim.Framework.Types; | ||
11 | using OpenSim.Framework; | ||
12 | using OpenSim.Caches; | ||
13 | |||
14 | namespace SimpleApp2 | ||
15 | { | ||
16 | public class MyClientView : ClientView | ||
17 | { | ||
18 | private float[] m_map; | ||
19 | private Dictionary<uint, IClientAPI> m_clientAPIs; | ||
20 | |||
21 | public MyClientView(float[] map, Dictionary<uint, IClientAPI> clientAPIs, EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions) | ||
22 | : base(remoteEP, initialcirpack, clientThreads, world, assetCache, packServer, inventoryCache, authenSessions) | ||
23 | { | ||
24 | m_map = map; | ||
25 | m_clientAPIs = clientAPIs; | ||
26 | |||
27 | OnRegionHandShakeReply += RegionHandShakeReplyHandler; | ||
28 | OnChatFromViewer += ChatHandler; | ||
29 | OnRequestWearables += RequestWearablesHandler; | ||
30 | OnCompleteMovementToRegion += CompleteMovementToRegionHandler; | ||
31 | } | ||
32 | |||
33 | private void ChatHandler(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) | ||
34 | { | ||
35 | // Echo it (so you know what you typed) | ||
36 | SendChatMessage(message, type, fromPos, fromName, fromAgentID); | ||
37 | SendChatMessage("Ready.", 1, fromPos, "System", LLUUID.Zero); | ||
38 | } | ||
39 | |||
40 | private void CompleteMovementToRegionHandler() | ||
41 | { | ||
42 | LLVector3 pos = new LLVector3(128, 128, 128); | ||
43 | |||
44 | MoveAgentIntoRegion(m_world.RegionInfo, pos, LLVector3.Zero ); | ||
45 | |||
46 | SendAvatarData( m_world.RegionInfo, FirstName, | ||
47 | LastName, AgentId, 0, | ||
48 | pos); | ||
49 | |||
50 | SendChatMessage("Welcome to My World.", 1, pos, "System", LLUUID.Zero); | ||
51 | |||
52 | |||
53 | |||
54 | // OpenSim.world.Primitive prim = new OpenSim.world.Primitive( m_clientAPIs, m_world.RegionInfo.RegionHandle, m_world, AgentId ); | ||
55 | |||
56 | // SendNewPrim( prim ); | ||
57 | |||
58 | } | ||
59 | |||
60 | private void RegionHandShakeReplyHandler(IClientAPI client) | ||
61 | { | ||
62 | client.SendLayerData(m_map); | ||
63 | } | ||
64 | |||
65 | private void RequestWearablesHandler(IClientAPI client) | ||
66 | { | ||
67 | SendWearables(AvatarWearable.DefaultWearables); | ||
68 | } | ||
69 | } | ||
70 | } | ||