diff --git a/src/world/Avatar.cs b/src/world/Avatar.cs index bcf79a88ca..f3905cd357 100644 --- a/src/world/Avatar.cs +++ b/src/world/Avatar.cs @@ -20,6 +20,10 @@ namespace OpenSim.world SetupTemplate("avatar-template.dat"); } + public void update() { + base.update(); + } + private void SetupTemplate(string name) { diff --git a/src/world/Entity.cs b/src/world/Entity.cs index ab07fd60cb..92ab2daeb5 100644 --- a/src/world/Entity.cs +++ b/src/world/Entity.cs @@ -14,6 +14,7 @@ namespace OpenSim.world protected Quaternion rotation; protected string name; protected List children; + public bool needupdate; public Entity() { @@ -29,7 +30,8 @@ namespace OpenSim.world // Do any per-frame updates needed that are applicable to every type of entity foreach (Entity child in children) { - child.update(); + if(child.needupdate) + child.update(); } } diff --git a/src/world/PhysicsEngine.cs b/src/world/PhysicsEngine.cs index 5bc52de93f..7585135109 100644 --- a/src/world/PhysicsEngine.cs +++ b/src/world/PhysicsEngine.cs @@ -17,5 +17,7 @@ namespace OpenSim.world Console.WriteLine("PhysicsEngine.cs:Startup() - DOING NOTHING, DUMMY FUNCTION!"); } + public void DoStuff(World simworld) { + } } } diff --git a/src/world/World.cs b/src/world/World.cs index f02f73f2ed..dd9b3366c5 100644 --- a/src/world/World.cs +++ b/src/world/World.cs @@ -39,13 +39,17 @@ namespace OpenSim.world } public void DoStuff() { - Thread.Sleep(1000); + physics.DoStuff(this); + this.Update(); } public void Update() { foreach (libsecondlife.LLUUID UUID in Entities.Keys) { - Entities[UUID].update(); + if(Entities[UUID].needupdate) { + Entities[UUID].update(); + } + } }