aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/world
diff options
context:
space:
mode:
Diffstat (limited to 'src/world')
-rw-r--r--src/world/PhysicsEngine.cs21
-rw-r--r--src/world/World.cs18
2 files changed, 34 insertions, 5 deletions
diff --git a/src/world/PhysicsEngine.cs b/src/world/PhysicsEngine.cs
new file mode 100644
index 0000000..5bc52de
--- /dev/null
+++ b/src/world/PhysicsEngine.cs
@@ -0,0 +1,21 @@
1using System;
2using System.Threading;
3using libsecondlife;
4using libsecondlife.Packets;
5using System.Collections.Generic;
6using System.Text;
7
8namespace OpenSim.world
9{
10 public class PhysicsEngine
11 {
12
13 public PhysicsEngine() {
14 }
15
16 public void Startup() {
17 Console.WriteLine("PhysicsEngine.cs:Startup() - DOING NOTHING, DUMMY FUNCTION!");
18 }
19
20 }
21}
diff --git a/src/world/World.cs b/src/world/World.cs
index ebbd61e..f02f73f 100644
--- a/src/world/World.cs
+++ b/src/world/World.cs
@@ -1,4 +1,5 @@
1using System; 1using System;
2using System.Threading;
2using libsecondlife; 3using libsecondlife;
3using libsecondlife.Packets; 4using libsecondlife.Packets;
4using System.Collections.Generic; 5using System.Collections.Generic;
@@ -13,6 +14,7 @@ namespace OpenSim.world
13 public ScriptEngine Scripts; 14 public ScriptEngine Scripts;
14 public TerrainDecode terrainengine = new TerrainDecode(); 15 public TerrainDecode terrainengine = new TerrainDecode();
15 public uint _localNumber=0; 16 public uint _localNumber=0;
17 public PhysicsEngine physics;
16 18
17 private Random Rand = new Random(); 19 private Random Rand = new Random();
18 20
@@ -28,13 +30,19 @@ namespace OpenSim.world
28 LandMap[i] = 21.4989f; 30 LandMap[i] = 21.4989f;
29 } 31 }
30 32
31 Console.WriteLine("World.cs - Creating script engine instance");
32 // Initialise this only after the world has loaded
33 Scripts = new ScriptEngine(this);
34 } 33 }
35 34
36 public void Update() 35 public void InitLoop() {
37 { 36 Console.WriteLine("World.cs:StartLoop() - Initialising physics");
37 this.physics = new PhysicsEngine();
38 physics.Startup();
39 }
40
41 public void DoStuff() {
42 Thread.Sleep(1000);
43 }
44
45 public void Update() {
38 foreach (libsecondlife.LLUUID UUID in Entities.Keys) 46 foreach (libsecondlife.LLUUID UUID in Entities.Keys)
39 { 47 {
40 Entities[UUID].update(); 48 Entities[UUID].update();