* Added NPCModule and NPCAvatar classes for NPCs. Primitive, but we can grow them out.

* Fix for Scene.Inventory.cs - It assumes every entity at startup is a SceneObjectGroup. (Actually, this shouldn't have compiled[!] without a warning.)
* Fix for LandManager at startup - it assumes there's a land channel when perhaps there isnt. (Bug that needs another refactor to fix. [Mike - I've assigned a ticket to you about this])
This commit is contained in:
Adam Frisby
2008-05-11 04:32:43 +00:00
parent 05de723e51
commit ee352ebc79
6 changed files with 781 additions and 6 deletions

View File

@@ -0,0 +1,43 @@
using libsecondlife;
using Nini.Config;
using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Scenes;
namespace OpenSim.Region.Environment.Modules.World.NPC
{
public class NPCModule : IRegionModule
{
private const bool m_enabled = false;
public void Initialise(Scene scene, IConfigSource source)
{
if (m_enabled)
{
NPCAvatar testAvatar = new NPCAvatar("Jack", "NPC", new LLVector3(128, 128, 40), scene);
NPCAvatar testAvatar2 = new NPCAvatar("Jill", "NPC", new LLVector3(136, 128, 40), scene);
scene.AddNewClient(testAvatar, false);
scene.AddNewClient(testAvatar2, false);
}
}
public void PostInitialise()
{
}
public void Close()
{
}
public string Name
{
get { return "NPCModule"; }
}
public bool IsSharedModule
{
get { return true; }
}
}
}