Number of small changes.
parent
dd5848668c
commit
3658015de8
|
@ -93,6 +93,7 @@ namespace OpenSim.Framework.Interfaces
|
|||
|
||||
void OutPacket(Packet newPack);
|
||||
void SendWearables(AvatarWearable[] wearables);
|
||||
void SendRegionHandshake(RegionInfo regionInfo);
|
||||
void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
|
||||
void SendLayerData(float[] map);
|
||||
void MoveAgentIntoRegion(RegionInfo regInfo);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
# Visual C# Express 2005
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework.Console", "Common\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj", "{A7CD0630-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Terrain.BasicTerrain", "OpenSim\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj", "{2270B8FE-0000-0000-0000-000000000000}"
|
||||
|
|
BIN
OpenSim.suo
BIN
OpenSim.suo
Binary file not shown.
|
@ -95,6 +95,46 @@ namespace OpenSim
|
|||
|
||||
#region World/Avatar to Client
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="regionInfo"></param>
|
||||
public void SendRegionHandshake(RegionInfo regionInfo)
|
||||
{
|
||||
System.Text.Encoding _enc = System.Text.Encoding.ASCII;
|
||||
RegionHandshakePacket handshake = new RegionHandshakePacket();
|
||||
|
||||
handshake.RegionInfo.BillableFactor = regionInfo.estateSettings.billableFactor;
|
||||
handshake.RegionInfo.IsEstateManager = false;
|
||||
handshake.RegionInfo.TerrainHeightRange00 = regionInfo.estateSettings.terrainHeightRange0;
|
||||
handshake.RegionInfo.TerrainHeightRange01 = regionInfo.estateSettings.terrainHeightRange1;
|
||||
handshake.RegionInfo.TerrainHeightRange10 = regionInfo.estateSettings.terrainHeightRange2;
|
||||
handshake.RegionInfo.TerrainHeightRange11 = regionInfo.estateSettings.terrainHeightRange3;
|
||||
handshake.RegionInfo.TerrainStartHeight00 = regionInfo.estateSettings.terrainStartHeight0;
|
||||
handshake.RegionInfo.TerrainStartHeight01 = regionInfo.estateSettings.terrainStartHeight1;
|
||||
handshake.RegionInfo.TerrainStartHeight10 = regionInfo.estateSettings.terrainStartHeight2;
|
||||
handshake.RegionInfo.TerrainStartHeight11 = regionInfo.estateSettings.terrainStartHeight3;
|
||||
handshake.RegionInfo.SimAccess = (byte)regionInfo.estateSettings.simAccess;
|
||||
handshake.RegionInfo.WaterHeight = regionInfo.estateSettings.waterHeight;
|
||||
|
||||
|
||||
handshake.RegionInfo.RegionFlags = (uint)regionInfo.estateSettings.regionFlags;
|
||||
|
||||
handshake.RegionInfo.SimName = _enc.GetBytes(regionInfo.estateSettings.waterHeight + "\0");
|
||||
handshake.RegionInfo.SimOwner = regionInfo.MasterAvatarAssignedUUID;
|
||||
handshake.RegionInfo.TerrainBase0 = regionInfo.estateSettings.terrainBase0;
|
||||
handshake.RegionInfo.TerrainBase1 = regionInfo.estateSettings.terrainBase1;
|
||||
handshake.RegionInfo.TerrainBase2 = regionInfo.estateSettings.terrainBase2;
|
||||
handshake.RegionInfo.TerrainBase3 = regionInfo.estateSettings.terrainBase3;
|
||||
handshake.RegionInfo.TerrainDetail0 = regionInfo.estateSettings.terrainDetail0;
|
||||
handshake.RegionInfo.TerrainDetail1 = regionInfo.estateSettings.terrainDetail1;
|
||||
handshake.RegionInfo.TerrainDetail2 =regionInfo.estateSettings.terrainDetail2;
|
||||
handshake.RegionInfo.TerrainDetail3 = regionInfo.estateSettings.terrainDetail3;
|
||||
handshake.RegionInfo.CacheID = LLUUID.Random(); //I guess this is for the client to remember an old setting?
|
||||
|
||||
this.OutPacket(handshake);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
|
|
@ -457,19 +457,31 @@ namespace OpenSim
|
|||
#region Parcel related packets
|
||||
case PacketType.ParcelPropertiesRequest:
|
||||
ParcelPropertiesRequestPacket propertiesRequest = (ParcelPropertiesRequestPacket)Pack;
|
||||
if(OnParcelPropertiesRequest != null)
|
||||
{
|
||||
OnParcelPropertiesRequest((int)Math.Round(propertiesRequest.ParcelData.West), (int)Math.Round(propertiesRequest.ParcelData.South), (int)Math.Round(propertiesRequest.ParcelData.East), (int)Math.Round(propertiesRequest.ParcelData.North), propertiesRequest.ParcelData.SequenceID, propertiesRequest.ParcelData.SnapSelection, this);
|
||||
}
|
||||
break;
|
||||
case PacketType.ParcelDivide:
|
||||
ParcelDividePacket parcelDivide = (ParcelDividePacket)Pack;
|
||||
if (OnParcelDivideRequest != null)
|
||||
{
|
||||
OnParcelDivideRequest((int)Math.Round(parcelDivide.ParcelData.West), (int)Math.Round(parcelDivide.ParcelData.South), (int)Math.Round(parcelDivide.ParcelData.East), (int)Math.Round(parcelDivide.ParcelData.North), this);
|
||||
}
|
||||
break;
|
||||
case PacketType.ParcelJoin:
|
||||
ParcelJoinPacket parcelJoin = (ParcelJoinPacket)Pack;
|
||||
if (OnParcelJoinRequest != null)
|
||||
{
|
||||
OnParcelJoinRequest((int)Math.Round(parcelJoin.ParcelData.West), (int)Math.Round(parcelJoin.ParcelData.South), (int)Math.Round(parcelJoin.ParcelData.East), (int)Math.Round(parcelJoin.ParcelData.North), this);
|
||||
}
|
||||
break;
|
||||
case PacketType.ParcelPropertiesUpdate:
|
||||
ParcelPropertiesUpdatePacket updatePacket = (ParcelPropertiesUpdatePacket)Pack;
|
||||
if (OnParcelPropertiesUpdateRequest != null)
|
||||
{
|
||||
OnParcelPropertiesUpdateRequest(updatePacket, this);
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -175,38 +175,7 @@ namespace OpenSim.world
|
|||
/// </summary>
|
||||
public void SendRegionHandshake()
|
||||
{
|
||||
System.Text.Encoding _enc = System.Text.Encoding.ASCII;
|
||||
RegionHandshakePacket handshake = new RegionHandshakePacket();
|
||||
|
||||
handshake.RegionInfo.BillableFactor = m_regInfo.estateSettings.billableFactor;
|
||||
handshake.RegionInfo.IsEstateManager = false;
|
||||
handshake.RegionInfo.TerrainHeightRange00 = m_regInfo.estateSettings.terrainHeightRange0;
|
||||
handshake.RegionInfo.TerrainHeightRange01 = m_regInfo.estateSettings.terrainHeightRange1;
|
||||
handshake.RegionInfo.TerrainHeightRange10 = m_regInfo.estateSettings.terrainHeightRange2;
|
||||
handshake.RegionInfo.TerrainHeightRange11 = m_regInfo.estateSettings.terrainHeightRange3;
|
||||
handshake.RegionInfo.TerrainStartHeight00 = m_regInfo.estateSettings.terrainStartHeight0;
|
||||
handshake.RegionInfo.TerrainStartHeight01 = m_regInfo.estateSettings.terrainStartHeight1;
|
||||
handshake.RegionInfo.TerrainStartHeight10 = m_regInfo.estateSettings.terrainStartHeight2;
|
||||
handshake.RegionInfo.TerrainStartHeight11 = m_regInfo.estateSettings.terrainStartHeight3;
|
||||
handshake.RegionInfo.SimAccess = (byte)m_regInfo.estateSettings.simAccess;
|
||||
handshake.RegionInfo.WaterHeight = m_regInfo.estateSettings.waterHeight;
|
||||
|
||||
|
||||
handshake.RegionInfo.RegionFlags = (uint)m_regInfo.estateSettings.regionFlags;
|
||||
|
||||
handshake.RegionInfo.SimName = _enc.GetBytes(m_regInfo.estateSettings.waterHeight + "\0");
|
||||
handshake.RegionInfo.SimOwner = m_regInfo.MasterAvatarAssignedUUID;
|
||||
handshake.RegionInfo.TerrainBase0 = m_regInfo.estateSettings.terrainBase0;
|
||||
handshake.RegionInfo.TerrainBase1 = m_regInfo.estateSettings.terrainBase1;
|
||||
handshake.RegionInfo.TerrainBase2 = m_regInfo.estateSettings.terrainBase2;
|
||||
handshake.RegionInfo.TerrainBase3 = m_regInfo.estateSettings.terrainBase3;
|
||||
handshake.RegionInfo.TerrainDetail0 = m_regInfo.estateSettings.terrainDetail0;
|
||||
handshake.RegionInfo.TerrainDetail1 = m_regInfo.estateSettings.terrainDetail1;
|
||||
handshake.RegionInfo.TerrainDetail2 = m_regInfo.estateSettings.terrainDetail2;
|
||||
handshake.RegionInfo.TerrainDetail3 = m_regInfo.estateSettings.terrainDetail3;
|
||||
handshake.RegionInfo.CacheID = LLUUID.Random(); //I guess this is for the client to remember an old setting?
|
||||
|
||||
this.ControllingClient.OutPacket(handshake);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -217,17 +217,21 @@ namespace OpenSim.world.Estate
|
|||
|
||||
public void sendRegionInfoPacketToAll()
|
||||
{
|
||||
foreach (OpenSim.world.Avatar av in m_world.Avatars.Values)
|
||||
List<Avatar> avatars = m_world.RequestAvatarList();
|
||||
|
||||
for (int i = 0; i < avatars.Count; i++)
|
||||
{
|
||||
this.sendRegionInfoPacket(av.ControllingClient);
|
||||
this.sendRegionInfoPacket(avatars[i].ControllingClient);
|
||||
}
|
||||
}
|
||||
|
||||
public void sendRegionHandshakeToAll()
|
||||
{
|
||||
foreach (OpenSim.world.Avatar av in m_world.Avatars.Values)
|
||||
List<Avatar> avatars = m_world.RequestAvatarList();
|
||||
|
||||
for (int i = 0; i < avatars.Count; i++)
|
||||
{
|
||||
av.SendRegionHandshake();
|
||||
this.sendRegionHandshake(avatars[i].ControllingClient);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -259,5 +263,10 @@ namespace OpenSim.world.Estate
|
|||
remote_client.OutPacket(regionInfoPacket);
|
||||
}
|
||||
|
||||
public void sendRegionHandshake(IClientAPI remoteClient)
|
||||
{
|
||||
remoteClient.SendRegionHandshake(m_regInfo);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -565,7 +565,7 @@ namespace OpenSim.world
|
|||
updatePacket.ParcelData.AABBMin = parcelData.AABBMin;
|
||||
updatePacket.ParcelData.Area = parcelData.area;
|
||||
updatePacket.ParcelData.AuctionID = parcelData.auctionID;
|
||||
updatePacket.ParcelData.AuthBuyerID =parcelData.authBuyerID; //unemplemented
|
||||
updatePacket.ParcelData.AuthBuyerID = parcelData.authBuyerID; //unemplemented
|
||||
|
||||
updatePacket.ParcelData.Bitmap = parcelData.parcelBitmapByteArray;
|
||||
|
||||
|
@ -638,14 +638,17 @@ namespace OpenSim.world
|
|||
parcelData.userLocation = packet.ParcelData.UserLocation;
|
||||
parcelData.userLookAt = packet.ParcelData.UserLookAt;
|
||||
|
||||
foreach (Avatar av in m_world.Avatars.Values)
|
||||
List<Avatar> avatars = m_world.RequestAvatarList();
|
||||
|
||||
for (int i = 0; i < avatars.Count; i++)
|
||||
{
|
||||
Parcel over = m_world.parcelManager.getParcel((int)Math.Round(av.Pos.X), (int)Math.Round(av.Pos.Y));
|
||||
Parcel over = m_world.parcelManager.getParcel((int)Math.Round(avatars[i].Pos.X), (int)Math.Round(avatars[i].Pos.Y));
|
||||
if (over == this)
|
||||
{
|
||||
sendParcelProperties(0, false, 0, av.ControllingClient);
|
||||
sendParcelProperties(0, false, 0, avatars[i].ControllingClient);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
@ -764,15 +767,15 @@ namespace OpenSim.world
|
|||
tempConvertMap.Initialize();
|
||||
byte tempByte = 0;
|
||||
int x = 0, y = 0, i = 0, bitNum = 0;
|
||||
for(i = 0; i < 512; i++)
|
||||
for (i = 0; i < 512; i++)
|
||||
{
|
||||
tempByte = parcelData.parcelBitmapByteArray[i];
|
||||
for(bitNum = 0; bitNum < 8; bitNum++)
|
||||
for (bitNum = 0; bitNum < 8; bitNum++)
|
||||
{
|
||||
bool bit = Convert.ToBoolean(Convert.ToByte(tempByte >> bitNum) & (byte)1);
|
||||
tempConvertMap[x, y] = bit;
|
||||
x++;
|
||||
if(x > 63)
|
||||
if (x > 63)
|
||||
{
|
||||
x = 0;
|
||||
y++;
|
||||
|
|
|
@ -24,9 +24,8 @@ namespace OpenSim.world
|
|||
{
|
||||
protected System.Timers.Timer m_heartbeatTimer = new System.Timers.Timer();
|
||||
public object LockPhysicsEngine = new object();
|
||||
public Dictionary<libsecondlife.LLUUID, Avatar> Avatars;
|
||||
public Dictionary<libsecondlife.LLUUID, Primitive> Prims;
|
||||
//public ScriptEngine Scripts;
|
||||
protected Dictionary<libsecondlife.LLUUID, Avatar> Avatars;
|
||||
protected Dictionary<libsecondlife.LLUUID, Primitive> Prims;
|
||||
public uint _localNumber = 0;
|
||||
private PhysicsScene phyScene;
|
||||
private float timeStep = 0.1f;
|
||||
|
@ -83,8 +82,8 @@ namespace OpenSim.world
|
|||
this.m_datastore = m_regInfo.DataStore;
|
||||
this.RegisterRegionWithComms();
|
||||
|
||||
parcelManager = new ParcelManager(this,this.m_regInfo);
|
||||
estateManager = new EstateManager(this,this.m_regInfo);
|
||||
parcelManager = new ParcelManager(this, this.m_regInfo);
|
||||
estateManager = new EstateManager(this, this.m_regInfo);
|
||||
|
||||
m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>();
|
||||
m_scripts = new Dictionary<string, ScriptFactory>();
|
||||
|
@ -476,10 +475,12 @@ namespace OpenSim.world
|
|||
try
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent");
|
||||
newAvatar = new Avatar(remoteClient, this, m_clientThreads,this.m_regInfo);
|
||||
newAvatar = new Avatar(remoteClient, this, m_clientThreads, this.m_regInfo);
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world");
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake ");
|
||||
newAvatar.SendRegionHandshake();
|
||||
|
||||
//newAvatar.SendRegionHandshake();
|
||||
this.estateManager.sendRegionHandshake(remoteClient);
|
||||
|
||||
PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z);
|
||||
lock (this.LockPhysicsEngine)
|
||||
|
@ -556,7 +557,7 @@ namespace OpenSim.world
|
|||
// ie it could be all Avatars within a certain range of the calling prim/avatar.
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Request a List of all Avatars in this World
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<Avatar> RequestAvatarList()
|
||||
|
|
BIN
bin/XMLRPC.dll
BIN
bin/XMLRPC.dll
Binary file not shown.
Loading…
Reference in New Issue