diff options
Diffstat (limited to 'OpenSim/Region/Examples/SimpleApp/MyWorld.cs')
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/MyWorld.cs | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs index 9a7b340..c616f6a 100644 --- a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs +++ b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs | |||
@@ -31,13 +31,9 @@ using libsecondlife; | |||
31 | using OpenSim.Framework; | 31 | using OpenSim.Framework; |
32 | using OpenSim.Framework.Communications; | 32 | using OpenSim.Framework.Communications; |
33 | using OpenSim.Framework.Communications.Cache; | 33 | using OpenSim.Framework.Communications.Cache; |
34 | using OpenSim.Framework.Interfaces; | ||
35 | using OpenSim.Framework.Servers; | 34 | using OpenSim.Framework.Servers; |
36 | using OpenSim.Framework; | ||
37 | |||
38 | using OpenSim.Region.Environment.Scenes; | ||
39 | using OpenSim.Region.Terrain; | ||
40 | using OpenSim.Region.Environment; | 35 | using OpenSim.Region.Environment; |
36 | using OpenSim.Region.Environment.Scenes; | ||
41 | using Avatar=OpenSim.Region.Environment.Scenes.ScenePresence; | 37 | using Avatar=OpenSim.Region.Environment.Scenes.ScenePresence; |
42 | 38 | ||
43 | namespace SimpleApp | 39 | namespace SimpleApp |
@@ -46,8 +42,10 @@ namespace SimpleApp | |||
46 | { | 42 | { |
47 | private List<ScenePresence> m_avatars; | 43 | private List<ScenePresence> m_avatars; |
48 | 44 | ||
49 | public MyWorld( RegionInfo regionInfo, AgentCircuitManager authen, CommunicationsManager commsMan, AssetCache assetCach, StorageManager storeMan, BaseHttpServer httpServer, ModuleLoader moduleLoader) | 45 | public MyWorld(RegionInfo regionInfo, AgentCircuitManager authen, CommunicationsManager commsMan, |
50 | : base( regionInfo, authen, commsMan, assetCach, storeMan, httpServer, moduleLoader, false) | 46 | AssetCache assetCach, StorageManager storeMan, BaseHttpServer httpServer, |
47 | ModuleLoader moduleLoader) | ||
48 | : base(regionInfo, authen, commsMan, assetCach, storeMan, httpServer, moduleLoader, false) | ||
51 | { | 49 | { |
52 | m_avatars = new List<Avatar>(); | 50 | m_avatars = new List<Avatar>(); |
53 | } | 51 | } |
@@ -58,32 +56,30 @@ namespace SimpleApp | |||
58 | 56 | ||
59 | for (int i = 0; i < 65536; i++) | 57 | for (int i = 0; i < 65536; i++) |
60 | { | 58 | { |
61 | int x = i % 256; | 59 | int x = i%256; |
62 | int y = i / 256; | 60 | int y = i/256; |
63 | 61 | ||
64 | map[i] = 25f; | 62 | map[i] = 25f; |
65 | } | 63 | } |
66 | 64 | ||
67 | this.Terrain.GetHeights1D(map); | 65 | Terrain.GetHeights1D(map); |
68 | this.CreateTerrainTexture(); | 66 | CreateTerrainTexture(); |
69 | } | 67 | } |
70 | 68 | ||
71 | override public void AddNewClient(IClientAPI client, bool child) | 69 | public override void AddNewClient(IClientAPI client, bool child) |
72 | { | 70 | { |
73 | SubscribeToClientEvents(client); | 71 | SubscribeToClientEvents(client); |
74 | 72 | ||
75 | ScenePresence avatar = CreateAndAddScenePresence(client, child ); | 73 | ScenePresence avatar = CreateAndAddScenePresence(client, child); |
76 | avatar.AbsolutePosition = new LLVector3(128, 128, 26); | 74 | avatar.AbsolutePosition = new LLVector3(128, 128, 26); |
77 | 75 | ||
78 | LLVector3 pos = new LLVector3(128, 128, 128); | 76 | LLVector3 pos = new LLVector3(128, 128, 128); |
79 | 77 | ||
80 | client.OnCompleteMovementToRegion += delegate() | 78 | client.OnCompleteMovementToRegion += |
81 | { | 79 | delegate() { client.SendChatMessage("Welcome to My World.", 1, pos, "System", LLUUID.Zero); }; |
82 | client.SendChatMessage("Welcome to My World.", 1, pos, "System", LLUUID.Zero ); | ||
83 | }; | ||
84 | 80 | ||
85 | 81 | ||
86 | client.SendRegionHandshake(m_regInfo); | 82 | client.SendRegionHandshake(m_regInfo); |
87 | } | 83 | } |
88 | } | 84 | } |
89 | } | 85 | } \ No newline at end of file |