* removed try-catchall from scene constructor

* added reference server-side addnewprim prototype to Scene - not implementet yet though.
Sugilite
lbsa71 2007-07-01 21:16:45 +00:00
parent 2852cda727
commit 2d34caabb9
4 changed files with 48 additions and 35 deletions

View File

@ -103,40 +103,32 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="regionName">Region Name for this region</param> /// <param name="regionName">Region Name for this region</param>
public Scene(Dictionary<uint, IClientAPI> clientThreads, RegionInfo regInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, BaseHttpServer httpServer) public Scene(Dictionary<uint, IClientAPI> clientThreads, RegionInfo regInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, BaseHttpServer httpServer)
{ {
try updateLock = new Mutex(false);
{ this.authenticateHandler = authen;
updateLock = new Mutex(false); this.commsManager = commsMan;
this.authenticateHandler = authen; this.assetCache = assetCach;
this.commsManager = commsMan; m_clientThreads = clientThreads;
this.assetCache = assetCach; m_regInfo = regInfo;
m_clientThreads = clientThreads; m_regionHandle = m_regInfo.RegionHandle;
m_regInfo = regInfo; m_regionName = m_regInfo.RegionName;
m_regionHandle = m_regInfo.RegionHandle; this.m_datastore = m_regInfo.DataStore;
m_regionName = m_regInfo.RegionName; this.RegisterRegionWithComms();
this.m_datastore = m_regInfo.DataStore;
this.RegisterRegionWithComms();
parcelManager = new ParcelManager(this, this.m_regInfo); parcelManager = new ParcelManager(this, this.m_regInfo);
estateManager = new EstateManager(this, this.m_regInfo); estateManager = new EstateManager(this, this.m_regInfo);
scriptManager = new ScriptManager(this); scriptManager = new ScriptManager(this);
eventManager = new EventManager(); eventManager = new EventManager();
OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs - creating new entitities instance"); OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs - creating new entitities instance");
Entities = new Dictionary<libsecondlife.LLUUID, EntityBase>(); Entities = new Dictionary<libsecondlife.LLUUID, EntityBase>();
Avatars = new Dictionary<LLUUID, ScenePresence>(); Avatars = new Dictionary<LLUUID, ScenePresence>();
Prims = new Dictionary<LLUUID, SceneObject>(); Prims = new Dictionary<LLUUID, SceneObject>();
OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs - creating LandMap"); OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs - creating LandMap");
Terrain = new TerrainEngine(); Terrain = new TerrainEngine();
ScenePresence.LoadAnims(); ScenePresence.LoadAnims();
this.httpListener = httpServer; this.httpListener = httpServer;
}
catch (Exception e)
{
OpenSim.Framework.Console.MainLog.Instance.Error("World.cs: Constructor failed with exception " + e.ToString());
}
} }
#endregion #endregion
@ -218,7 +210,7 @@ namespace OpenSim.Region.Environment.Scenes
/// <returns></returns> /// <returns></returns>
public bool Backup() public bool Backup()
{ {
return true; return true;
} }
#endregion #endregion
@ -432,7 +424,7 @@ namespace OpenSim.Region.Environment.Scenes
this._primCount++; this._primCount++;
// Trigger event for listeners // Trigger event for listeners
// eventManager.TriggerOnNewPrimitive(prim); // eventManager.TriggerOnNewPrimitive(prim);
} }
catch (Exception e) catch (Exception e)
{ {
@ -440,6 +432,13 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
public override uint AddNewPrim(LLUUID ownerId, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID texture, int flags)
{
uint id = NextLocalId;
throw new NotImplementedException("Not implemented yet.");
}
#endregion #endregion
#region Add/Remove Avatar Methods #region Add/Remove Avatar Methods
@ -670,7 +669,7 @@ namespace OpenSim.Region.Environment.Scenes
agent.startpos = new LLVector3(128, 128, 70); agent.startpos = new LLVector3(128, 128, 70);
agent.child = true; agent.child = true;
this.commsManager.InterRegion.InformRegionOfChildAgent(neighbours[i].RegionHandle, agent); this.commsManager.InterRegion.InformRegionOfChildAgent(neighbours[i].RegionHandle, agent);
remoteClient.InformClientOfNeighbour(neighbours[i].RegionHandle, neighbours[i].ExternalEndPoint ); remoteClient.InformClientOfNeighbour(neighbours[i].RegionHandle, neighbours[i].ExternalEndPoint);
//this.capsHandlers[remoteClient.AgentId].CreateEstablishAgentComms("", System.Net.IPAddress.Parse(neighbours[i].CommsIPListenAddr) + ":" + neighbours[i].CommsIPListenPort); //this.capsHandlers[remoteClient.AgentId].CreateEstablishAgentComms("", System.Net.IPAddress.Parse(neighbours[i].CommsIPListenAddr) + ":" + neighbours[i].CommsIPListenPort);
} }
} }
@ -733,7 +732,7 @@ namespace OpenSim.Region.Environment.Scenes
this.commsManager.InterRegion.InformRegionOfChildAgent(regionHandle, agent); this.commsManager.InterRegion.InformRegionOfChildAgent(regionHandle, agent);
this.commsManager.InterRegion.ExpectAvatarCrossing(regionHandle, remoteClient.AgentId, position); this.commsManager.InterRegion.ExpectAvatarCrossing(regionHandle, remoteClient.AgentId, position);
remoteClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4)); remoteClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4));
} }
//remoteClient.SendTeleportCancel(); //remoteClient.SendTeleportCancel();
@ -752,5 +751,6 @@ namespace OpenSim.Region.Environment.Scenes
} }
#endregion #endregion
} }
} }

View File

@ -149,7 +149,9 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="agentID"></param> /// <param name="agentID"></param>
/// <param name="child"></param> /// <param name="child"></param>
public abstract void AddNewClient(IClientAPI client, bool child); public abstract void AddNewClient(IClientAPI client, bool child);
public abstract uint AddNewPrim(LLUUID ownerId, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID texture, int flags);
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>

View File

@ -78,6 +78,9 @@ namespace SimpleApp
pos, null); pos, null);
client.SendChatMessage("Welcome to My World.", 1, pos, "System", LLUUID.Zero ); client.SendChatMessage("Welcome to My World.", 1, pos, "System", LLUUID.Zero );
}; };
client.SendRegionHandshake(m_regionInfo); client.SendRegionHandshake(m_regionInfo);

View File

@ -16,6 +16,7 @@ using OpenSim.Region.Communications.Local;
using OpenSim.Region.ClientStack; using OpenSim.Region.ClientStack;
using OpenSim.Region.Physics.BasicPhysicsPlugin; using OpenSim.Region.Physics.BasicPhysicsPlugin;
using System.Net; using System.Net;
using libsecondlife.Packets;
namespace SimpleApp namespace SimpleApp
{ {
@ -23,6 +24,7 @@ namespace SimpleApp
{ {
private LogBase m_log; private LogBase m_log;
AuthenticateSessionsBase m_circuitManager; AuthenticateSessionsBase m_circuitManager;
uint m_localId;
private void Run() private void Run()
{ {
@ -65,6 +67,12 @@ namespace SimpleApp
m_log.WriteLine( LogPriority.NORMAL, "Press enter to quit."); m_log.WriteLine( LogPriority.NORMAL, "Press enter to quit.");
m_log.ReadLine(); m_log.ReadLine();
PrimData primData = new PrimData();
primData.Scale = new LLVector3(1, 1, 1);
m_localId = world.AddNewPrim( LLUUID.Zero, primData, LLVector3.Zero, new LLQuaternion(0, 0, 0, 0), LLUUID.Zero, 0);
} }
private bool AddNewSessionHandler(ulong regionHandle, Login loginData) private bool AddNewSessionHandler(ulong regionHandle, Login loginData)