aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/world/Avatar.cs4
-rw-r--r--src/world/Entity.cs4
-rw-r--r--src/world/PhysicsEngine.cs2
-rw-r--r--src/world/World.cs8
4 files changed, 15 insertions, 3 deletions
diff --git a/src/world/Avatar.cs b/src/world/Avatar.cs
index bcf79a8..f3905cd 100644
--- a/src/world/Avatar.cs
+++ b/src/world/Avatar.cs
@@ -20,6 +20,10 @@ namespace OpenSim.world
20 SetupTemplate("avatar-template.dat"); 20 SetupTemplate("avatar-template.dat");
21 } 21 }
22 22
23 public void update() {
24 base.update();
25 }
26
23 private void SetupTemplate(string name) 27 private void SetupTemplate(string name)
24 { 28 {
25 29
diff --git a/src/world/Entity.cs b/src/world/Entity.cs
index ab07fd6..92ab2da 100644
--- a/src/world/Entity.cs
+++ b/src/world/Entity.cs
@@ -14,6 +14,7 @@ namespace OpenSim.world
14 protected Quaternion rotation; 14 protected Quaternion rotation;
15 protected string name; 15 protected string name;
16 protected List<Entity> children; 16 protected List<Entity> children;
17 public bool needupdate;
17 18
18 public Entity() 19 public Entity()
19 { 20 {
@@ -29,7 +30,8 @@ namespace OpenSim.world
29 // Do any per-frame updates needed that are applicable to every type of entity 30 // Do any per-frame updates needed that are applicable to every type of entity
30 foreach (Entity child in children) 31 foreach (Entity child in children)
31 { 32 {
32 child.update(); 33 if(child.needupdate)
34 child.update();
33 } 35 }
34 } 36 }
35 37
diff --git a/src/world/PhysicsEngine.cs b/src/world/PhysicsEngine.cs
index 5bc52de..7585135 100644
--- a/src/world/PhysicsEngine.cs
+++ b/src/world/PhysicsEngine.cs
@@ -17,5 +17,7 @@ namespace OpenSim.world
17 Console.WriteLine("PhysicsEngine.cs:Startup() - DOING NOTHING, DUMMY FUNCTION!"); 17 Console.WriteLine("PhysicsEngine.cs:Startup() - DOING NOTHING, DUMMY FUNCTION!");
18 } 18 }
19 19
20 public void DoStuff(World simworld) {
21 }
20 } 22 }
21} 23}
diff --git a/src/world/World.cs b/src/world/World.cs
index f02f73f..dd9b336 100644
--- a/src/world/World.cs
+++ b/src/world/World.cs
@@ -39,13 +39,17 @@ namespace OpenSim.world
39 } 39 }
40 40
41 public void DoStuff() { 41 public void DoStuff() {
42 Thread.Sleep(1000); 42 physics.DoStuff(this);
43 this.Update();
43 } 44 }
44 45
45 public void Update() { 46 public void Update() {
46 foreach (libsecondlife.LLUUID UUID in Entities.Keys) 47 foreach (libsecondlife.LLUUID UUID in Entities.Keys)
47 { 48 {
48 Entities[UUID].update(); 49 if(Entities[UUID].needupdate) {
50 Entities[UUID].update();
51 }
52
49 } 53 }
50 } 54 }
51 55