mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 05:45:37 +08:00
* 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:
43
OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs
Normal file
43
OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user