mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
* Started renaming world to Scene
* Update and UpdateMovement now first stores array to avoid collection update exceptions * Ignored some bins
This commit is contained in:
@@ -146,7 +146,7 @@ namespace OpenSim.Region.ClientStack
|
||||
}
|
||||
}
|
||||
|
||||
#region World/Avatar to Client
|
||||
#region Scene/Avatar to Client
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace OpenSim.Region.ClientStack
|
||||
}
|
||||
break;
|
||||
|
||||
#region World/Avatar
|
||||
#region Scene/Avatar
|
||||
case PacketType.ChatFromViewer:
|
||||
ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack;
|
||||
if (Util.FieldToString(inchatpack.ChatData.Message) == "")
|
||||
@@ -466,33 +466,7 @@ namespace OpenSim.Region.ClientStack
|
||||
// Console.WriteLine(Pack.ToString());
|
||||
UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack;
|
||||
AgentInventory myinventory = this.m_inventoryCache.GetAgentsInventory(this.AgentID);
|
||||
/*if (myinventory != null)
|
||||
{
|
||||
if (updatetask.UpdateData.Key == 0)
|
||||
{
|
||||
if (myinventory.InventoryItems[updatetask.InventoryData.ItemID] != null)
|
||||
{
|
||||
if (myinventory.InventoryItems[updatetask.InventoryData.ItemID].Type == 7)
|
||||
{
|
||||
LLUUID noteaid = myinventory.InventoryItems[updatetask.InventoryData.ItemID].AssetID;
|
||||
AssetBase assBase = this.m_assetCache.GetAsset(noteaid);
|
||||
if (assBase != null)
|
||||
{
|
||||
foreach (Entity ent in m_world.Entities.Values)
|
||||
{
|
||||
if (ent.localid == updatetask.UpdateData.LocalID)
|
||||
{
|
||||
if (ent is OpenSim.world.Primitive)
|
||||
{
|
||||
this.m_world.AddScript(ent, Util.FieldToString(assBase.Data));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
break;
|
||||
case PacketType.MapLayerRequest:
|
||||
this.RequestMapLayer();
|
||||
@@ -524,7 +498,7 @@ namespace OpenSim.Region.ClientStack
|
||||
{
|
||||
AssetLandmark lm = new AssetLandmark(lma);
|
||||
|
||||
if (lm.RegionID == m_world.RegionInfo.SimUUID)
|
||||
if (lm.RegionID == m_scene.RegionInfo.SimUUID)
|
||||
{
|
||||
TeleportLocalPacket tpLocal = new TeleportLocalPacket();
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace OpenSim.Region.ClientStack
|
||||
private AgentAssetUpload UploadAssets;
|
||||
private LLUUID newAssetFolder = LLUUID.Zero;
|
||||
private bool debug = false;
|
||||
protected IWorld m_world;
|
||||
protected IScene m_scene;
|
||||
private Dictionary<uint, ClientView> m_clientThreads;
|
||||
private AssetCache m_assetCache;
|
||||
private InventoryCache m_inventoryCache;
|
||||
@@ -85,9 +85,9 @@ namespace OpenSim.Region.ClientStack
|
||||
private int probesWithNoIngressPackets = 0;
|
||||
private int lastPacketsReceived = 0;
|
||||
|
||||
public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AgentCircuitManager authenSessions )
|
||||
public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IScene scene, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AgentCircuitManager authenSessions )
|
||||
{
|
||||
m_world = world;
|
||||
m_scene = scene;
|
||||
m_clientThreads = clientThreads;
|
||||
m_assetCache = assetCache;
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace OpenSim.Region.ClientStack
|
||||
{
|
||||
clientPingTimer.Stop();
|
||||
this.m_inventoryCache.ClientLeaving(this.AgentID, null);
|
||||
m_world.RemoveClient(this.AgentId);
|
||||
m_scene.RemoveClient(this.AgentId);
|
||||
|
||||
m_clientThreads.Remove(this.CircuitCode);
|
||||
m_networkServer.RemoveClientCircuit(this.CircuitCode);
|
||||
@@ -231,8 +231,8 @@ namespace OpenSim.Region.ClientStack
|
||||
clientPingTimer.Elapsed += new ElapsedEventHandler(CheckClientConnectivity);
|
||||
clientPingTimer.Enabled = true;
|
||||
|
||||
MainLog.Instance.Verbose( "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world");
|
||||
this.m_world.AddNewClient(this, false);
|
||||
MainLog.Instance.Verbose( "OpenSimClient.cs:InitNewClient() - Adding viewer agent to scene");
|
||||
this.m_scene.AddNewClient(this, false);
|
||||
}
|
||||
|
||||
protected virtual void AuthUser()
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace OpenSim.Region.ClientStack
|
||||
public class PacketServer
|
||||
{
|
||||
private ClientStackNetworkHandler _networkHandler;
|
||||
private IWorld _localWorld;
|
||||
private IScene _localScene;
|
||||
public Dictionary<uint, ClientView> ClientThreads = new Dictionary<uint, ClientView>();
|
||||
private ClientManager m_clientManager = new ClientManager();
|
||||
public ClientManager ClientManager
|
||||
@@ -54,11 +54,11 @@ namespace OpenSim.Region.ClientStack
|
||||
_networkHandler.RegisterPacketServer(this);
|
||||
}
|
||||
|
||||
public IWorld LocalWorld
|
||||
public IScene LocalScene
|
||||
{
|
||||
set
|
||||
{
|
||||
this._localWorld = value;
|
||||
this._localScene = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,19 +122,7 @@ namespace OpenSim.Region.ClientStack
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="remoteEP"></param>
|
||||
/// <param name="initialcirpack"></param>
|
||||
/// <param name="clientThreads"></param>
|
||||
/// <param name="world"></param>
|
||||
/// <param name="assetCache"></param>
|
||||
/// <param name="packServer"></param>
|
||||
/// <param name="inventoryCache"></param>
|
||||
/// <param name="authenSessions"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual ClientView CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AgentCircuitManager authenSessions)
|
||||
protected virtual ClientView CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IScene world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AgentCircuitManager authenSessions)
|
||||
{
|
||||
return new ClientView(remoteEP, initialcirpack, clientThreads, world, assetCache, packServer, inventoryCache, authenSessions );
|
||||
}
|
||||
@@ -151,7 +139,7 @@ namespace OpenSim.Region.ClientStack
|
||||
public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, InventoryCache inventoryCache, AgentCircuitManager authenticateSessionsClass)
|
||||
{
|
||||
ClientView newuser =
|
||||
CreateNewClient(epSender, useCircuit, ClientThreads, _localWorld, assetCache, this, inventoryCache,
|
||||
CreateNewClient(epSender, useCircuit, ClientThreads, _localScene, assetCache, this, inventoryCache,
|
||||
authenticateSessionsClass);
|
||||
|
||||
this.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser);
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace OpenSim.Region.ClientStack
|
||||
StorageManager storageManager = CreateStorageManager(regionInfo);
|
||||
Scene scene = CreateScene(regionInfo, storageManager, authen);
|
||||
|
||||
udpServer.LocalWorld = scene;
|
||||
udpServer.LocalScene = scene;
|
||||
|
||||
scene.LoadWorldMap();
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace OpenSim.Region.ClientStack
|
||||
protected PacketServer _packetServer;
|
||||
|
||||
protected int listenPort;
|
||||
protected IWorld m_localWorld;
|
||||
protected IScene m_localScene;
|
||||
protected AssetCache m_assetCache;
|
||||
protected InventoryCache m_inventoryCache;
|
||||
protected LogBase m_log;
|
||||
@@ -71,12 +71,12 @@ namespace OpenSim.Region.ClientStack
|
||||
}
|
||||
}
|
||||
|
||||
public IWorld LocalWorld
|
||||
public IScene LocalScene
|
||||
{
|
||||
set
|
||||
{
|
||||
this.m_localWorld = value;
|
||||
this._packetServer.LocalWorld = this.m_localWorld;
|
||||
this.m_localScene = value;
|
||||
this._packetServer.LocalScene = this.m_localScene;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user