diff options
Diffstat (limited to 'src/world')
-rw-r--r-- | src/world/PhysicsEngine.cs | 21 | ||||
-rw-r--r-- | src/world/World.cs | 18 |
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 @@ | |||
1 | using System; | ||
2 | using System.Threading; | ||
3 | using libsecondlife; | ||
4 | using libsecondlife.Packets; | ||
5 | using System.Collections.Generic; | ||
6 | using System.Text; | ||
7 | |||
8 | namespace 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 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Threading; | ||
2 | using libsecondlife; | 3 | using libsecondlife; |
3 | using libsecondlife.Packets; | 4 | using libsecondlife.Packets; |
4 | using System.Collections.Generic; | 5 | using 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(); |