mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 08:06:27 +08:00
Some work on Module loading/management.
Some more modules templates classes (hoping that someone will pick some of these and work on implementing them). Early version of the "Dynamic Texture Module", although currently there are no render modules included (so not really functional without them). Added osSetDynamicTextureURL script function, for attaching a dynamic texture to a prim. Some work on the console command handling. Added "change-region <regionname>" and "exit-region" so that after the use of change-region, the commands entered will apply to that region only. Then use exit-region to return to the top level (so commands then function as they did before and either apply to all regions or to the first region) (Note: this hasn't been tested very much)
This commit is contained in:
@@ -98,12 +98,14 @@ namespace SimpleApp
|
||||
private LLUUID myID = LLUUID.Random();
|
||||
public MyNpcCharacter( EventManager eventManager )
|
||||
{
|
||||
// startPos = new LLVector3(128, (float)(Util.RandomClass.NextDouble()*100), 2);
|
||||
eventManager.OnFrame += Update;
|
||||
}
|
||||
|
||||
private LLVector3 startPos = new LLVector3(128, 128,2);
|
||||
public virtual LLVector3 StartPos
|
||||
{
|
||||
get { return new LLVector3(128, 100, 2); }
|
||||
get { return startPos; }
|
||||
set { }
|
||||
}
|
||||
|
||||
@@ -122,9 +124,10 @@ namespace SimpleApp
|
||||
get { return "Annoying"; }
|
||||
}
|
||||
|
||||
private string lastName = "NPC" + Util.RandomClass.Next(1, 1000);
|
||||
public virtual string LastName
|
||||
{
|
||||
get { return "NPC"; }
|
||||
get { return lastName; }
|
||||
}
|
||||
|
||||
public virtual void OutPacket(Packet newPack) { }
|
||||
@@ -203,7 +206,7 @@ namespace SimpleApp
|
||||
flyState = 0;
|
||||
}
|
||||
|
||||
if (count >= 40)
|
||||
if (count >= 200)
|
||||
{
|
||||
if (OnChatFromViewer != null)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using libsecondlife;
|
||||
using OpenSim.Framework;
|
||||
@@ -22,6 +23,7 @@ namespace SimpleApp
|
||||
{
|
||||
class Program : RegionApplicationBase, conscmd_callback
|
||||
{
|
||||
private ModuleLoader m_moduleLoader;
|
||||
protected override LogBase CreateLog()
|
||||
{
|
||||
return new LogBase(null, "SimpleApp", this, false);
|
||||
@@ -59,8 +61,19 @@ namespace SimpleApp
|
||||
|
||||
UDPServer udpServer;
|
||||
|
||||
m_moduleLoader = new ModuleLoader();
|
||||
m_moduleLoader.LoadDefaultSharedModules("");
|
||||
|
||||
Scene scene = SetupScene(regionInfo, out udpServer);
|
||||
|
||||
m_moduleLoader.InitialiseSharedModules(scene);
|
||||
m_moduleLoader.CreateDefaultModules(scene, "");
|
||||
scene.SetModuleInterfaces();
|
||||
|
||||
scene.StartTimer();
|
||||
|
||||
m_moduleLoader.PostInitialise();
|
||||
m_moduleLoader.ClearCache();
|
||||
|
||||
udpServer.ServerListener();
|
||||
|
||||
@@ -75,10 +88,21 @@ namespace SimpleApp
|
||||
ComplexObject complexObject = new ComplexObject(scene, regionInfo.RegionHandle, LLUUID.Zero, scene.PrimIDAllocate(), pos + posOffset );
|
||||
scene.AddEntity(complexObject);
|
||||
}
|
||||
|
||||
MyNpcCharacter m_character = new MyNpcCharacter(scene.EventManager);
|
||||
scene.AddNewClient(m_character, false);
|
||||
|
||||
/*for (int i = 0; i < 500; i++)
|
||||
{
|
||||
MyNpcCharacter m_character = new MyNpcCharacter(scene.EventManager);
|
||||
scene.AddNewClient(m_character, false);
|
||||
}
|
||||
|
||||
List<ScenePresence> avatars = scene.RequestAvatarList();
|
||||
foreach (ScenePresence avatar in avatars)
|
||||
{
|
||||
avatar.AbsolutePosition = new LLVector3((float)OpenSim.Framework.Utilities.Util.RandomClass.Next(100,200), (float)OpenSim.Framework.Utilities.Util.RandomClass.Next(30, 200), 2);
|
||||
|
||||
}*/
|
||||
|
||||
|
||||
DirectoryInfo dirInfo = new DirectoryInfo( "." );
|
||||
|
||||
float x = 0;
|
||||
|
||||
Reference in New Issue
Block a user