aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Examples/SimpleApp/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Examples/SimpleApp/Program.cs26
1 files changed, 23 insertions, 3 deletions
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs
index 4dae461..82dba0e 100644
--- a/OpenSim/Region/Examples/SimpleApp/Program.cs
+++ b/OpenSim/Region/Examples/SimpleApp/Program.cs
@@ -17,6 +17,7 @@ using System.Timers;
17using OpenSim.Region.Environment.Scenes; 17using OpenSim.Region.Environment.Scenes;
18using OpenSim.Framework.Data; 18using OpenSim.Framework.Data;
19using OpenSim.Region.Environment; 19using OpenSim.Region.Environment;
20using System.IO;
20 21
21namespace SimpleApp 22namespace SimpleApp
22{ 23{
@@ -58,16 +59,35 @@ namespace SimpleApp
58 59
59 udpServer.ServerListener(); 60 udpServer.ServerListener();
60 61
61 PrimitiveBaseShape shape = PrimitiveBaseShape.DefaultBox(); 62 PrimitiveBaseShape shape = BoxShape.Default;
62 shape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); 63 shape.Scale = new LLVector3(0.5f, 0.5f, 0.5f);
63 LLVector3 pos = new LLVector3(138, 129, 27); 64 LLVector3 pos = new LLVector3(138, 129, 27);
64 65
65 SceneObject m_sceneObject = new CpuCounterObject(scene, scene.EventManager, LLUUID.Zero, scene.PrimIDAllocate(), pos, shape); 66 SceneObject sceneObject = new CpuCounterObject(scene, scene.EventManager, LLUUID.Zero, scene.PrimIDAllocate(), pos, shape);
66 scene.AddEntity(m_sceneObject); 67 scene.AddEntity(sceneObject);
67 68
68 MyNpcCharacter m_character = new MyNpcCharacter( scene.EventManager ); 69 MyNpcCharacter m_character = new MyNpcCharacter( scene.EventManager );
69 scene.AddNewClient(m_character, false); 70 scene.AddNewClient(m_character, false);
70 71
72 DirectoryInfo dirInfo = new DirectoryInfo( "." );
73
74 float x = 0;
75 float z = 0;
76
77 foreach( FileInfo fileInfo in dirInfo.GetFiles())
78 {
79 LLVector3 filePos = new LLVector3(100 + x, 129, 27 + z);
80 x = x + 2;
81 if( x > 50 )
82 {
83 x = 0;
84 z = z + 2;
85 }
86
87 FileSystemObject fileObject = new FileSystemObject( scene, fileInfo, filePos );
88 scene.AddEntity(fileObject);
89 }
90
71 m_log.WriteLine(LogPriority.NORMAL, "Press enter to quit."); 91 m_log.WriteLine(LogPriority.NORMAL, "Press enter to quit.");
72 m_log.ReadLine(); 92 m_log.ReadLine();
73 } 93 }