From bf2f3ea29ab045cf8fe1e8223adb176e11c14569 Mon Sep 17 00:00:00 2001 From: MW Date: Sun, 15 Jul 2007 21:10:05 +0000 Subject: Hijacked simpleApp again (sorry lbsa71, guess I should create my own simpleApp), to try out a basic test npc character(/class). --- OpenSim/Region/Examples/SimpleApp/MyWorld.cs | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Examples/SimpleApp/MyWorld.cs') diff --git a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs index 777d4ae..29b255b 100644 --- a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs +++ b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs @@ -47,14 +47,15 @@ namespace SimpleApp LLVector3 pos = new LLVector3(128, 128, 128); client.OnRegionHandShakeReply += SendLayerData; - client.OnChatFromViewer += + /*client.OnChatFromViewer += delegate(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) { // Echo it (so you know what you typed) client.SendChatMessage(message, type, fromPos, fromName, fromAgentID); client.SendChatMessage("Ready.", 1, pos, "System", LLUUID.Zero ); }; - + */ + client.OnChatFromViewer += this.SimChat; client.OnAddPrim += AddNewPrim; client.OnUpdatePrimGroupPosition += this.UpdatePrimPosition; client.OnRequestMapBlocks += this.RequestMapBlocks; @@ -70,9 +71,27 @@ namespace SimpleApp client.SendRegionHandshake(m_regInfo); ScenePresence avatar = CreateAndAddScenePresence(client); - avatar.Pos = new LLVector3(128, 128, 26); + avatar.Pos = new LLVector3(128, 128, 26); } - + + public override void Update() + { + foreach (LLUUID UUID in Entities.Keys) + { + Entities[UUID].updateMovement(); + } + + lock (this.m_syncRoot) + { + this.phyScene.Simulate(timeStep); + } + + foreach (LLUUID UUID in Entities.Keys) + { + Entities[UUID].update(); + } + } + #endregion } } -- cgit v1.1