diff options
Diffstat (limited to 'OpenSim/Region/Examples/SimpleApp/MyWorld.cs')
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/MyWorld.cs | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs index 92dd61b..6cf8974 100644 --- a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs +++ b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs | |||
@@ -41,38 +41,43 @@ 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 | |||
44 | #region IWorld Members | 63 | #region IWorld Members |
45 | 64 | ||
46 | override public void AddNewClient(IClientAPI client, bool child) | 65 | override public void AddNewClient(IClientAPI client, bool child) |
47 | { | 66 | { |
67 | SubscribeToClientEvents(client); | ||
68 | |||
69 | ScenePresence avatar = CreateAndAddScenePresence(client); | ||
70 | avatar.Pos = new LLVector3(128, 128, 26); | ||
71 | |||
48 | LLVector3 pos = new LLVector3(128, 128, 128); | 72 | LLVector3 pos = new LLVector3(128, 128, 128); |
49 | 73 | ||
50 | client.OnRegionHandShakeReply += SendLayerData; | ||
51 | /*client.OnChatFromViewer += | ||
52 | delegate(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) | ||
53 | { | ||
54 | // Echo it (so you know what you typed) | ||
55 | client.SendChatMessage(message, type, fromPos, fromName, fromAgentID); | ||
56 | client.SendChatMessage("Ready.", 1, pos, "System", LLUUID.Zero ); | ||
57 | }; | ||
58 | */ | ||
59 | client.OnChatFromViewer += this.SimChat; | ||
60 | client.OnAddPrim += AddNewPrim; | ||
61 | client.OnUpdatePrimGroupPosition += this.UpdatePrimPosition; | ||
62 | client.OnRequestMapBlocks += this.RequestMapBlocks; | ||
63 | client.OnTeleportLocationRequest += this.RequestTeleportLocation; | ||
64 | client.OnGrabUpdate += this.MoveObject; | ||
65 | client.OnNameFromUUIDRequest += this.commsManager.HandleUUIDNameRequest; | ||
66 | |||
67 | client.OnCompleteMovementToRegion += delegate() | 74 | client.OnCompleteMovementToRegion += delegate() |
68 | { | 75 | { |
69 | client.SendChatMessage("Welcome to My World.", 1, pos, "System", LLUUID.Zero ); | 76 | client.SendChatMessage("Welcome to My World.", 1, pos, "System", LLUUID.Zero ); |
70 | }; | 77 | }; |
71 | 78 | ||
72 | client.SendRegionHandshake(m_regInfo); | ||
73 | 79 | ||
74 | ScenePresence avatar = CreateAndAddScenePresence(client); | 80 | client.SendRegionHandshake(m_regInfo); |
75 | avatar.Pos = new LLVector3(128, 128, 26); | ||
76 | } | 81 | } |
77 | 82 | ||
78 | #endregion | 83 | #endregion |