We have a main update loop!

adam
gareth 2007-03-03 00:39:16 +00:00
parent 808fdcc915
commit 0703b548c0
4 changed files with 15 additions and 3 deletions

View File

@ -20,6 +20,10 @@ namespace OpenSim.world
SetupTemplate("avatar-template.dat");
}
public void update() {
base.update();
}
private void SetupTemplate(string name)
{

View File

@ -14,6 +14,7 @@ namespace OpenSim.world
protected Quaternion rotation;
protected string name;
protected List<Entity> children;
public bool needupdate;
public Entity()
{
@ -29,6 +30,7 @@ namespace OpenSim.world
// Do any per-frame updates needed that are applicable to every type of entity
foreach (Entity child in children)
{
if(child.needupdate)
child.update();
}
}

View File

@ -17,5 +17,7 @@ namespace OpenSim.world
Console.WriteLine("PhysicsEngine.cs:Startup() - DOING NOTHING, DUMMY FUNCTION!");
}
public void DoStuff(World simworld) {
}
}
}

View File

@ -39,14 +39,18 @@ namespace OpenSim.world
}
public void DoStuff() {
Thread.Sleep(1000);
physics.DoStuff(this);
this.Update();
}
public void Update() {
foreach (libsecondlife.LLUUID UUID in Entities.Keys)
{
if(Entities[UUID].needupdate) {
Entities[UUID].update();
}
}
}
public void SendLayerData(OpenSimClient RemoteClient) {