Temporary fix for the object taking bug
parent
fdc9ed89b4
commit
56e6587c9f
|
@ -151,6 +151,10 @@ namespace OpenSim.Framework.Assets
|
||||||
bytes[i++] = (byte)((this.BaseMask >> 16) % 256);
|
bytes[i++] = (byte)((this.BaseMask >> 16) % 256);
|
||||||
bytes[i++] = (byte)((this.BaseMask >> 24) % 256);
|
bytes[i++] = (byte)((this.BaseMask >> 24) % 256);
|
||||||
Array.Copy(this.Position.GetBytes(), 0, bytes, i, 12); i += 12;
|
Array.Copy(this.Position.GetBytes(), 0, bytes, i, 12); i += 12;
|
||||||
|
if (this.Rotation == new LLQuaternion(0,0,0,0))
|
||||||
|
{
|
||||||
|
this.Rotation = new LLQuaternion(0, 1, 0, 0);
|
||||||
|
}
|
||||||
Array.Copy(this.Rotation.GetBytes(), 0, bytes, i, 12); i += 12;
|
Array.Copy(this.Rotation.GetBytes(), 0, bytes, i, 12); i += 12;
|
||||||
bytes[i++] = (byte)(this.LocalID % 256);
|
bytes[i++] = (byte)(this.LocalID % 256);
|
||||||
bytes[i++] = (byte)((this.LocalID >> 8) % 256);
|
bytes[i++] = (byte)((this.LocalID >> 8) % 256);
|
||||||
|
|
|
@ -81,7 +81,7 @@ namespace OpenSim.GenericConfig
|
||||||
{
|
{
|
||||||
if (configNode.Attributes[attributeName] != null)
|
if (configNode.Attributes[attributeName] != null)
|
||||||
{
|
{
|
||||||
configNode.Attributes.GetNamedItem(attributeName).Value = attributeValue;
|
((XmlAttribute)configNode.Attributes.GetNamedItem(attributeName)).Value = attributeValue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,8 +51,6 @@ namespace OpenSim.Assets
|
||||||
public Dictionary<LLUUID, AssetRequest> RequestedAssets = new Dictionary<LLUUID, AssetRequest>(); //Assets requested from the asset server
|
public Dictionary<LLUUID, AssetRequest> RequestedAssets = new Dictionary<LLUUID, AssetRequest>(); //Assets requested from the asset server
|
||||||
public Dictionary<LLUUID, AssetRequest> RequestedTextures = new Dictionary<LLUUID, AssetRequest>(); //Textures requested from the asset server
|
public Dictionary<LLUUID, AssetRequest> RequestedTextures = new Dictionary<LLUUID, AssetRequest>(); //Textures requested from the asset server
|
||||||
|
|
||||||
//private Dictionary<libsecondlife.LLUUID, AssetBase> IncomingAssets;
|
|
||||||
|
|
||||||
private IAssetServer _assetServer;
|
private IAssetServer _assetServer;
|
||||||
private Thread _assetCacheThread;
|
private Thread _assetCacheThread;
|
||||||
private LLUUID[] textureList = new LLUUID[5];
|
private LLUUID[] textureList = new LLUUID[5];
|
||||||
|
@ -67,7 +65,6 @@ namespace OpenSim.Assets
|
||||||
_assetServer.SetReceiver(this);
|
_assetServer.SetReceiver(this);
|
||||||
Assets = new Dictionary<libsecondlife.LLUUID, AssetInfo>();
|
Assets = new Dictionary<libsecondlife.LLUUID, AssetInfo>();
|
||||||
Textures = new Dictionary<libsecondlife.LLUUID, TextureImage>();
|
Textures = new Dictionary<libsecondlife.LLUUID, TextureImage>();
|
||||||
//IncomingAssets = new Dictionary<libsecondlife.LLUUID, AssetBase>();
|
|
||||||
this._assetCacheThread = new Thread(new ThreadStart(RunAssetManager));
|
this._assetCacheThread = new Thread(new ThreadStart(RunAssetManager));
|
||||||
this._assetCacheThread.IsBackground = true;
|
this._assetCacheThread.IsBackground = true;
|
||||||
this._assetCacheThread.Start();
|
this._assetCacheThread.Start();
|
||||||
|
|
|
@ -126,7 +126,7 @@ namespace OpenSim.CAPS
|
||||||
{
|
{
|
||||||
TempAv = (OpenSim.world.Avatar)m_world.Entities[UUID];
|
TempAv = (OpenSim.world.Avatar)m_world.Entities[UUID];
|
||||||
responseString += "<p> Client: ";
|
responseString += "<p> Client: ";
|
||||||
responseString += TempAv.firstname + " , " + TempAv.lastname + " , <A HREF=\"javascript:loadXMLDoc('ClientInventory/" + UUID.ToString() + "')\">" + UUID + "</A> , " + TempAv.ControllingClient.SessionID + " , " + TempAv.ControllingClient.CircuitCode + " , " + TempAv.ControllingClient.userEP.ToString();//String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}", TempAv.firstname, TempAv.lastname, UUID, TempAv.ControllingClient.SessionID, TempAv.ControllingClient.CircuitCode, TempAv.ControllingClient.userEP.ToString());
|
responseString += TempAv.firstname + " , " + TempAv.lastname + " , <A HREF=\"javascript:loadXMLDoc('ClientInventory/" + UUID.ToString() + "')\">" + UUID + "</A> , " + TempAv.ControllingClient.SessionID + " , " + TempAv.ControllingClient.CircuitCode + " , " + TempAv.ControllingClient.userEP.ToString();
|
||||||
responseString += "</p>";
|
responseString += "</p>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,7 @@ namespace OpenSim.CAPS
|
||||||
foreach (InventoryItem item in inven.InventoryItems.Values)
|
foreach (InventoryItem item in inven.InventoryItems.Values)
|
||||||
{
|
{
|
||||||
responseString += "<p> InventoryItem: ";
|
responseString += "<p> InventoryItem: ";
|
||||||
responseString += item.Name +" , "+ item.ItemID +" , "+ item.Type +" , "+ item.FolderID +" , "+ item.AssetID +" , "+ item.Description ; //String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}", item.Name, item.ItemID, item.Type, item.FolderID, item.AssetID, item.Description);
|
responseString += item.Name +" , "+ item.ItemID +" , "+ item.Type +" , "+ item.FolderID +" , "+ item.AssetID +" , "+ item.Description ;
|
||||||
responseString += "</p>";
|
responseString += "</p>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
Console.WriteLine(e.Message);
|
Console.WriteLine(e.Message);
|
||||||
}
|
}
|
||||||
|
m_console.WriteLine("Main.cs:Startup() - Loading configuration");
|
||||||
string configfromgrid = localConfig.GetAttribute("ConfigFromGrid");
|
string configfromgrid = localConfig.GetAttribute("ConfigFromGrid");
|
||||||
if (configfromgrid == "true")
|
if (configfromgrid == "true")
|
||||||
{
|
{
|
||||||
|
@ -122,6 +122,7 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
this.regionData.InitConfig(this.m_sandbox, this.localConfig);
|
this.regionData.InitConfig(this.m_sandbox, this.localConfig);
|
||||||
}
|
}
|
||||||
|
this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change
|
||||||
|
|
||||||
GridServers = new Grid();
|
GridServers = new Grid();
|
||||||
if (m_sandbox)
|
if (m_sandbox)
|
||||||
|
@ -146,11 +147,6 @@ namespace OpenSim
|
||||||
AssetCache = new AssetCache(GridServers.AssetServer);
|
AssetCache = new AssetCache(GridServers.AssetServer);
|
||||||
InventoryCache = new InventoryCache();
|
InventoryCache = new InventoryCache();
|
||||||
|
|
||||||
// We check our local database first, then the grid for config options
|
|
||||||
m_console.WriteLine("Main.cs:Startup() - Loading configuration");
|
|
||||||
//Cfg = this.LoadConfigDll(this.ConfigDll);
|
|
||||||
//Cfg.InitConfig(this.m_sandbox);
|
|
||||||
|
|
||||||
PacketServer packetServer = new PacketServer(this);
|
PacketServer packetServer = new PacketServer(this);
|
||||||
|
|
||||||
m_console.WriteLine("Main.cs:Startup() - We are " + regionData.RegionName + " at " + regionData.RegionLocX.ToString() + "," + regionData.RegionLocY.ToString());
|
m_console.WriteLine("Main.cs:Startup() - We are " + regionData.RegionName + " at " + regionData.RegionLocX.ToString() + "," + regionData.RegionLocY.ToString());
|
||||||
|
|
|
@ -50,6 +50,8 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void RegisterClientPacketHandlers()
|
public virtual void RegisterClientPacketHandlers()
|
||||||
|
{
|
||||||
|
if (this._localWorld != null)
|
||||||
{
|
{
|
||||||
SimClient.AddPacketHandler(PacketType.ModifyLand, _localWorld.ModifyTerrain);
|
SimClient.AddPacketHandler(PacketType.ModifyLand, _localWorld.ModifyTerrain);
|
||||||
SimClient.AddPacketHandler(PacketType.ChatFromViewer, _localWorld.SimChat);
|
SimClient.AddPacketHandler(PacketType.ChatFromViewer, _localWorld.SimChat);
|
||||||
|
@ -57,6 +59,7 @@ namespace OpenSim
|
||||||
SimClient.AddPacketHandler(PacketType.DeRezObject, _localWorld.DeRezObject);
|
SimClient.AddPacketHandler(PacketType.DeRezObject, _localWorld.DeRezObject);
|
||||||
SimClient.AddPacketHandler(PacketType.UUIDNameRequest, this.RequestUUIDName);
|
SimClient.AddPacketHandler(PacketType.UUIDNameRequest, this.RequestUUIDName);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#region Client Packet Handlers
|
#region Client Packet Handlers
|
||||||
|
|
||||||
|
|
|
@ -59,11 +59,11 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location X [997]: ", "997");
|
string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location X [997]: ", "997");
|
||||||
configData.SetAttribute("SimLocationX", location);
|
configData.SetAttribute("SimLocationX", location);
|
||||||
this.RegionLocX = (uint)Convert.ToInt32(location);
|
this.RegionLocX = (uint)Convert.ToUInt32(location);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.RegionLocX = (uint)Convert.ToInt32(attri);
|
this.RegionLocX = (uint)Convert.ToUInt32(attri);
|
||||||
}
|
}
|
||||||
// Sim/Grid location Y
|
// Sim/Grid location Y
|
||||||
attri = "";
|
attri = "";
|
||||||
|
@ -72,11 +72,11 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location Y [996]: ", "996");
|
string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location Y [996]: ", "996");
|
||||||
configData.SetAttribute("SimLocationY", location);
|
configData.SetAttribute("SimLocationY", location);
|
||||||
this.RegionLocY = (uint)Convert.ToInt32(location);
|
this.RegionLocY = (uint)Convert.ToUInt32(location);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.RegionLocY = (uint)Convert.ToInt32(attri);
|
this.RegionLocY = (uint)Convert.ToUInt32(attri);
|
||||||
}
|
}
|
||||||
//Sim Listen Port
|
//Sim Listen Port
|
||||||
attri = "";
|
attri = "";
|
||||||
|
|
|
@ -159,45 +159,9 @@ namespace OpenSim.world
|
||||||
}
|
}
|
||||||
if (this.newPrimFlag)
|
if (this.newPrimFlag)
|
||||||
{
|
{
|
||||||
/* ObjectOwnerPacket objown = new ObjectOwnerPacket();
|
|
||||||
objown.HeaderData.GroupID = LLUUID.Zero;
|
|
||||||
objown.HeaderData.Override = false;
|
|
||||||
objown.HeaderData.OwnerID = LLUUID.Zero;
|
|
||||||
objown.ObjectData = new ObjectOwnerPacket.ObjectDataBlock[1];
|
|
||||||
objown.ObjectData[0] = new ObjectOwnerPacket.ObjectDataBlock();
|
|
||||||
objown.ObjectData[0].ObjectLocalID = this.localid;
|
|
||||||
ObjectGroupPacket objgroup = new ObjectGroupPacket();
|
|
||||||
objgroup.ObjectData = new ObjectGroupPacket.ObjectDataBlock[1];
|
|
||||||
objgroup.ObjectData[0] = new ObjectGroupPacket.ObjectDataBlock();
|
|
||||||
objgroup.ObjectData[0].ObjectLocalID = this.localid;
|
|
||||||
ObjectPermissionsPacket objper = new ObjectPermissionsPacket();
|
|
||||||
objper.HeaderData.Override = false;
|
|
||||||
objper.ObjectData = new ObjectPermissionsPacket.ObjectDataBlock[3];
|
|
||||||
for (int i = 0; i < 3; i++)
|
|
||||||
{
|
|
||||||
objper.ObjectData[i] = new ObjectPermissionsPacket.ObjectDataBlock();
|
|
||||||
objper.ObjectData[i].ObjectLocalID = this.localid;
|
|
||||||
objper.ObjectData[i].Set = 1;
|
|
||||||
objper.ObjectData[i].Field = 0;
|
|
||||||
}
|
|
||||||
objper.ObjectData[0].Mask = 8192;
|
|
||||||
objper.ObjectData[1].Mask = 16384;
|
|
||||||
objper.ObjectData[2].Mask = 32768;*/
|
|
||||||
|
|
||||||
foreach (SimClient client in m_clientThreads.Values)
|
foreach (SimClient client in m_clientThreads.Values)
|
||||||
{
|
{
|
||||||
client.OutPacket(OurPacket);
|
client.OutPacket(OurPacket);
|
||||||
/* objown.AgentData.AgentID = client.AgentID;
|
|
||||||
objown.AgentData.SessionID = client.SessionID;
|
|
||||||
objown.HeaderData.OwnerID = client.AgentID;
|
|
||||||
client.OutPacket(objown);
|
|
||||||
objgroup.AgentData.AgentID = client.AgentID;
|
|
||||||
objgroup.AgentData.GroupID = LLUUID.Zero;
|
|
||||||
objgroup.AgentData.SessionID = client.SessionID;
|
|
||||||
client.OutPacket(objgroup);
|
|
||||||
objper.AgentData.AgentID = client.AgentID;
|
|
||||||
objper.AgentData.SessionID = client.SessionID;
|
|
||||||
client.OutPacket(objper);*/
|
|
||||||
}
|
}
|
||||||
this.newPrimFlag = false;
|
this.newPrimFlag = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue