aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Examples/SimpleApp
diff options
context:
space:
mode:
authorlbsa712007-06-20 15:18:54 +0000
committerlbsa712007-06-20 15:18:54 +0000
commit64ed1e1b3bea2b187679a7e61a7d56292c47daab (patch)
tree6757719377b1cfd0300e9ff47eba543f5236be26 /OpenSim/Examples/SimpleApp
parent* re-added SimpleApp projects (diff)
downloadopensim-SC_OLD-64ed1e1b3bea2b187679a7e61a7d56292c47daab.zip
opensim-SC_OLD-64ed1e1b3bea2b187679a7e61a7d56292c47daab.tar.gz
opensim-SC_OLD-64ed1e1b3bea2b187679a7e61a7d56292c47daab.tar.bz2
opensim-SC_OLD-64ed1e1b3bea2b187679a7e61a7d56292c47daab.tar.xz
* Removed ClientThreads from avatar
* Deleted SimpleApp2 as it's getting wonkier and wonkier by the minute * Added avatar handling to SimpleApp, still don't have any avatar out on the playing field * Removed some warnings * Went from IWorld to Scene *
Diffstat (limited to 'OpenSim/Examples/SimpleApp')
-rw-r--r--OpenSim/Examples/SimpleApp/MyWorld.cs29
-rw-r--r--OpenSim/Examples/SimpleApp/Program.cs8
-rw-r--r--OpenSim/Examples/SimpleApp/SimpleApp.csproj22
3 files changed, 43 insertions, 16 deletions
diff --git a/OpenSim/Examples/SimpleApp/MyWorld.cs b/OpenSim/Examples/SimpleApp/MyWorld.cs
index d3da1c7..bc7a3b0 100644
--- a/OpenSim/Examples/SimpleApp/MyWorld.cs
+++ b/OpenSim/Examples/SimpleApp/MyWorld.cs
@@ -5,19 +5,28 @@ using OpenSim.Framework.Interfaces;
5using OpenSim.Framework.Types; 5using OpenSim.Framework.Types;
6using OpenSim.Framework.Console; 6using OpenSim.Framework.Console;
7using libsecondlife; 7using libsecondlife;
8using OpenSim.Region;
9using Avatar=OpenSim.Region.Scenes.Avatar;
10using OpenSim.Region.Scenes;
11using OpenSim.Framework;
12using OpenSim.Caches;
13using OpenGrid.Framework.Communications;
8 14
9namespace SimpleApp 15namespace SimpleApp
10{ 16{
11 public class MyWorld : IWorld 17 public class MyWorld : Scene
12 { 18 {
13 private RegionInfo m_regionInfo; 19 private RegionInfo m_regionInfo;
20 private List<OpenSim.Region.Scenes.Avatar> m_avatars;
14 21
15 public MyWorld(RegionInfo regionInfo) 22 public MyWorld(Dictionary<uint, IClientAPI> clientThreads, RegionInfo regionInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach)
23 : base(clientThreads, regionInfo, authen, commsMan, assetCach)
16 { 24 {
17 m_regionInfo = regionInfo; 25 m_regionInfo = regionInfo;
26 m_avatars = new List<Avatar>();
18 } 27 }
19 28
20 private void SendLayerData(IClientAPI remoteClient) 29 public override void SendLayerData(IClientAPI remoteClient)
21 { 30 {
22 float[] map = new float[65536]; 31 float[] map = new float[65536];
23 32
@@ -34,7 +43,7 @@ namespace SimpleApp
34 43
35 #region IWorld Members 44 #region IWorld Members
36 45
37 void IWorld.AddNewAvatar(IClientAPI client, LLUUID agentID, bool child) 46 override public void AddNewAvatar(IClientAPI client, LLUUID agentID, bool child)
38 { 47 {
39 LLVector3 pos = new LLVector3(128, 128, 128); 48 LLVector3 pos = new LLVector3(128, 128, 128);
40 49
@@ -65,6 +74,8 @@ namespace SimpleApp
65 74
66 client.SendRegionHandshake(m_regionInfo); 75 client.SendRegionHandshake(m_regionInfo);
67 76
77 OpenSim.Region.Scenes.Avatar avatar = new Avatar( client, this, m_regionInfo );
78
68 } 79 }
69 80
70 private void SendWearables( IClientAPI client ) 81 private void SendWearables( IClientAPI client )
@@ -72,30 +83,28 @@ namespace SimpleApp
72 client.SendWearables( AvatarWearable.DefaultWearables ); 83 client.SendWearables( AvatarWearable.DefaultWearables );
73 } 84 }
74 85
75 void IWorld.RemoveAvatar(LLUUID agentID) 86 public void RemoveAvatar(LLUUID agentID)
76 { 87 {
77 88
78 } 89 }
79 90
80 RegionInfo IWorld.RegionInfo 91 public RegionInfo RegionInfo
81 { 92 {
82 get { return m_regionInfo; } 93 get { return m_regionInfo; }
83 } 94 }
84 95
85 object IWorld.SyncRoot 96 public object SyncRoot
86 { 97 {
87 get { return this; } 98 get { return this; }
88 } 99 }
89 100
90 private uint m_nextLocalId = 1; 101 private uint m_nextLocalId = 1;
91 102
92 uint IWorld.NextLocalId 103 public uint NextLocalId
93 { 104 {
94 get { return m_nextLocalId++; } 105 get { return m_nextLocalId++; }
95 } 106 }
96 107
97 #endregion 108 #endregion
98
99
100 } 109 }
101} 110}
diff --git a/OpenSim/Examples/SimpleApp/Program.cs b/OpenSim/Examples/SimpleApp/Program.cs
index 1d0702d..b0b68d9 100644
--- a/OpenSim/Examples/SimpleApp/Program.cs
+++ b/OpenSim/Examples/SimpleApp/Program.cs
@@ -12,6 +12,8 @@ using OpenSim.UserServer;
12using OpenSim.Servers; 12using OpenSim.Servers;
13using OpenSim.Framework; 13using OpenSim.Framework;
14using OpenSim.Caches; 14using OpenSim.Caches;
15using OpenGrid.Framework.Communications;
16using OpenSim.LocalCommunications;
15 17
16namespace SimpleApp 18namespace SimpleApp
17{ 19{
@@ -51,9 +53,11 @@ namespace SimpleApp
51 53
52 ClientView.TerrainManager = new TerrainManager(new SecondLife()); 54 ClientView.TerrainManager = new TerrainManager(new SecondLife());
53 55
54 RegionInfo regionInfo = new RegionInfo(); 56 CommunicationsManager communicationsManager = new CommunicationsLocal();
57
58 RegionInfo regionInfo = new RegionInfo( );
55 59
56 udpServer.LocalWorld = new MyWorld( regionInfo ); 60 udpServer.LocalWorld = new MyWorld( packetServer.ClientAPIs, regionInfo, m_circuitManager, communicationsManager, assetCache );
57 61
58 // World world = new World(udpServer.PacketServer.ClientAPIs, regionInfo); 62 // World world = new World(udpServer.PacketServer.ClientAPIs, regionInfo);
59 // PhysicsScene physicsScene = new NullPhysicsScene(); 63 // PhysicsScene physicsScene = new NullPhysicsScene();
diff --git a/OpenSim/Examples/SimpleApp/SimpleApp.csproj b/OpenSim/Examples/SimpleApp/SimpleApp.csproj
index 810ecd4..00af44a 100644
--- a/OpenSim/Examples/SimpleApp/SimpleApp.csproj
+++ b/OpenSim/Examples/SimpleApp/SimpleApp.csproj
@@ -62,10 +62,6 @@
62 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath> 62 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
63 <Private>False</Private> 63 <Private>False</Private>
64 </Reference> 64 </Reference>
65 <Reference Include="OpenSim.World" >
66 <HintPath>OpenSim.World.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="System" > 65 <Reference Include="System" >
70 <HintPath>System.dll</HintPath> 66 <HintPath>System.dll</HintPath>
71 <Private>False</Private> 67 <Private>False</Private>
@@ -80,6 +76,12 @@
80 </Reference> 76 </Reference>
81 </ItemGroup> 77 </ItemGroup>
82 <ItemGroup> 78 <ItemGroup>
79 <ProjectReference Include="..\..\..\Common\OpenGrid.Framework.Communications\OpenGrid.Framework.Communications.csproj">
80 <Name>OpenGrid.Framework.Communications</Name>
81 <Project>{683344D5-0000-0000-0000-000000000000}</Project>
82 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
83 <Private>False</Private>
84 </ProjectReference>
83 <ProjectReference Include="..\..\OpenSim.Caches\OpenSim.Caches.csproj"> 85 <ProjectReference Include="..\..\OpenSim.Caches\OpenSim.Caches.csproj">
84 <Name>OpenSim.Caches</Name> 86 <Name>OpenSim.Caches</Name>
85 <Project>{1938EB12-0000-0000-0000-000000000000}</Project> 87 <Project>{1938EB12-0000-0000-0000-000000000000}</Project>
@@ -104,6 +106,18 @@
104 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 106 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
105 <Private>False</Private> 107 <Private>False</Private>
106 </ProjectReference> 108 </ProjectReference>
109 <ProjectReference Include="..\..\OpenSim.LocalCommunications\OpenSim.LocalCommunications.csproj">
110 <Name>OpenSim.LocalCommunications</Name>
111 <Project>{79CED992-0000-0000-0000-000000000000}</Project>
112 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
113 <Private>False</Private>
114 </ProjectReference>
115 <ProjectReference Include="..\..\OpenSim.Region\OpenSim.Region.csproj">
116 <Name>OpenSim.Region</Name>
117 <Project>{196916AF-0000-0000-0000-000000000000}</Project>
118 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
119 <Private>False</Private>
120 </ProjectReference>
107 <ProjectReference Include="..\..\OpenSim.RegionServer\OpenSim.RegionServer.csproj"> 121 <ProjectReference Include="..\..\OpenSim.RegionServer\OpenSim.RegionServer.csproj">
108 <Name>OpenSim.RegionServer</Name> 122 <Name>OpenSim.RegionServer</Name>
109 <Project>{632E1BFD-0000-0000-0000-000000000000}</Project> 123 <Project>{632E1BFD-0000-0000-0000-000000000000}</Project>