aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Examples/SimpleApp/Program.cs
diff options
context:
space:
mode:
authorMW2007-07-15 21:10:05 +0000
committerMW2007-07-15 21:10:05 +0000
commitbf2f3ea29ab045cf8fe1e8223adb176e11c14569 (patch)
tree5355aeb3e1dfd6d9cf2aaaf6bc58d7940004b6c8 /OpenSim/Region/Examples/SimpleApp/Program.cs
parent*Added support for the "show" button that highlights objects over the selecte... (diff)
downloadopensim-SC_OLD-bf2f3ea29ab045cf8fe1e8223adb176e11c14569.zip
opensim-SC_OLD-bf2f3ea29ab045cf8fe1e8223adb176e11c14569.tar.gz
opensim-SC_OLD-bf2f3ea29ab045cf8fe1e8223adb176e11c14569.tar.bz2
opensim-SC_OLD-bf2f3ea29ab045cf8fe1e8223adb176e11c14569.tar.xz
Hijacked simpleApp again (sorry lbsa71, guess I should create my own simpleApp), to try out a basic test npc character(/class).
Diffstat (limited to 'OpenSim/Region/Examples/SimpleApp/Program.cs')
-rw-r--r--OpenSim/Region/Examples/SimpleApp/Program.cs25
1 files changed, 20 insertions, 5 deletions
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs
index 82a62a3..0c688ba 100644
--- a/OpenSim/Region/Examples/SimpleApp/Program.cs
+++ b/OpenSim/Region/Examples/SimpleApp/Program.cs
@@ -15,6 +15,7 @@ using OpenSim.Region.Communications.Local;
15using OpenSim.Region.GridInterfaces.Local; 15using OpenSim.Region.GridInterfaces.Local;
16using System.Timers; 16using System.Timers;
17using OpenSim.Region.Environment.Scenes; 17using OpenSim.Region.Environment.Scenes;
18using OpenSim.Framework.Data;
18 19
19namespace SimpleApp 20namespace SimpleApp
20{ 21{
@@ -25,6 +26,7 @@ namespace SimpleApp
25 uint m_localId; 26 uint m_localId;
26 public MyWorld world; 27 public MyWorld world;
27 private SceneObject m_sceneObject; 28 private SceneObject m_sceneObject;
29 public MyNpcCharacter m_character;
28 30
29 private void Run() 31 private void Run()
30 { 32 {
@@ -65,22 +67,35 @@ namespace SimpleApp
65 world.PhysScene = physManager.GetPhysicsScene("basicphysics"); //PhysicsScene.Null; 67 world.PhysScene = physManager.GetPhysicsScene("basicphysics"); //PhysicsScene.Null;
66 68
67 world.LoadWorldMap(); 69 world.LoadWorldMap();
68 world.ParcelManager.NoParcelDataFromStorage(); 70 world.PhysScene.SetTerrain(world.Terrain.getHeights1D());
69 71
70 udpServer.LocalWorld = world; 72 udpServer.LocalWorld = world;
71 73
72 httpServer.Start(); 74 httpServer.Start();
73 udpServer.ServerListener(); 75 udpServer.ServerListener();
74 76
77 UserProfileData masterAvatar = communicationsManager.UserServer.SetupMasterUser("Test", "User", "test");
78 if (masterAvatar != null)
79 {
80 world.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID;
81 world.ParcelManager.NoParcelDataFromStorage();
82 }
83
75 PrimitiveBaseShape shape = PrimitiveBaseShape.DefaultBox(); 84 PrimitiveBaseShape shape = PrimitiveBaseShape.DefaultBox();
76 shape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); 85 shape.Scale = new LLVector3(0.5f, 0.5f, 0.5f);
77 LLVector3 pos = new LLVector3(129, 129, 27); 86 LLVector3 pos = new LLVector3(138, 129, 27);
87
88 m_sceneObject = new MySceneObject(world, world.EventManager, LLUUID.Zero, world.PrimIDAllocate(), pos, shape);
89 world.AddNewEntity(m_sceneObject);
90
91 m_character = new MyNpcCharacter();
92 world.AddNewClient(m_character, false);
93
94 world.StartTimer();
78 95
79 m_sceneObject = new MySceneObject(world,world.EventManager, LLUUID.Zero, world.PrimIDAllocate(), pos, shape);
80 world.AddNewEntity(m_sceneObject);
81
82 m_log.WriteLine(LogPriority.NORMAL, "Press enter to quit."); 96 m_log.WriteLine(LogPriority.NORMAL, "Press enter to quit.");
83 m_log.ReadLine(); 97 m_log.ReadLine();
98
84 } 99 }
85 100
86 #region conscmd_callback Members 101 #region conscmd_callback Members