* Patch from JHurliman

* Updates to libomv r2243, 
* Remove lots of unnecessary typecasts
* Improves SendWindData()
Thanks jhurliman. 
* Will update OpenSim-libs in 10 minutes..
0.6.0-stable
Teravus Ovares 2008-09-26 17:25:22 +00:00
parent 34cfd710ce
commit 16b6738cda
42 changed files with 233 additions and 292 deletions

View File

@ -206,7 +206,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
throw new Exception("wrong password"); throw new Exception("wrong password");
string file = (string)requestData["filename"]; string file = (string)requestData["filename"];
UUID regionID = (string) requestData["regionid"]; UUID regionID = (UUID)(string) requestData["regionid"];
m_log.InfoFormat("[RADMIN]: Terrain Loading: {0}", file); m_log.InfoFormat("[RADMIN]: Terrain Loading: {0}", file);
responseData["accepted"] = "true"; responseData["accepted"] = "true";
@ -389,7 +389,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (requestData.ContainsKey("region_id") && if (requestData.ContainsKey("region_id") &&
!String.IsNullOrEmpty((string)requestData["region_id"])) !String.IsNullOrEmpty((string)requestData["region_id"]))
{ {
regionID = (string)requestData["region_id"]; regionID = (UUID)(string)requestData["region_id"];
if (m_app.SceneManager.TryGetScene(regionID, out scene)) if (m_app.SceneManager.TryGetScene(regionID, out scene))
throw new Exception(String.Format("region UUID already in use by region {0}, UUID {1}, <{2},{3}>", throw new Exception(String.Format("region UUID already in use by region {0}, UUID {1}, <{2},{3}>",
scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
@ -810,7 +810,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
Scene scene = null; Scene scene = null;
if (requestData.Contains("region_uuid")) if (requestData.Contains("region_uuid"))
{ {
UUID region_uuid = (string)requestData["region_uuid"]; UUID region_uuid = (UUID)(string)requestData["region_uuid"];
if (!m_app.SceneManager.TryGetScene(region_uuid, out scene)) if (!m_app.SceneManager.TryGetScene(region_uuid, out scene))
throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
} }
@ -870,7 +870,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
string filename = (string)requestData["filename"]; string filename = (string)requestData["filename"];
if (requestData.Contains("region_uuid")) if (requestData.Contains("region_uuid"))
{ {
UUID region_uuid = (string)requestData["region_uuid"]; UUID region_uuid = (UUID)(string)requestData["region_uuid"];
if (!m_app.SceneManager.TrySetCurrentScene(region_uuid)) if (!m_app.SceneManager.TrySetCurrentScene(region_uuid))
throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString());
@ -951,7 +951,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
string filename = (string)requestData["filename"]; string filename = (string)requestData["filename"];
if (requestData.Contains("region_uuid")) if (requestData.Contains("region_uuid"))
{ {
UUID region_uuid = (string)requestData["region_uuid"]; UUID region_uuid = (UUID)(string)requestData["region_uuid"];
if (!m_app.SceneManager.TrySetCurrentScene(region_uuid)) if (!m_app.SceneManager.TrySetCurrentScene(region_uuid))
throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString());

View File

@ -494,7 +494,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
} }
if (xml.MoveToAttribute("Owner")) if (xml.MoveToAttribute("Owner"))
{ {
rdata.userAppearance.Owner = xml.Value; rdata.userAppearance.Owner = (UUID)xml.Value;
indata = true; indata = true;
} }
if (xml.MoveToAttribute("Serial")) if (xml.MoveToAttribute("Serial"))
@ -506,156 +506,156 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
case "Body" : case "Body" :
if (xml.MoveToAttribute("Item")) if (xml.MoveToAttribute("Item"))
{ {
rdata.userAppearance.BodyItem = xml.Value; rdata.userAppearance.BodyItem = (UUID)xml.Value;
indata = true; indata = true;
} }
if (xml.MoveToAttribute("Asset")) if (xml.MoveToAttribute("Asset"))
{ {
rdata.userAppearance.BodyAsset = xml.Value; rdata.userAppearance.BodyAsset = (UUID)xml.Value;
indata = true; indata = true;
} }
break; break;
case "Skin" : case "Skin" :
if (xml.MoveToAttribute("Item")) if (xml.MoveToAttribute("Item"))
{ {
rdata.userAppearance.SkinItem = xml.Value; rdata.userAppearance.SkinItem = (UUID)xml.Value;
indata = true; indata = true;
} }
if (xml.MoveToAttribute("Asset")) if (xml.MoveToAttribute("Asset"))
{ {
rdata.userAppearance.SkinAsset = xml.Value; rdata.userAppearance.SkinAsset = (UUID)xml.Value;
indata = true; indata = true;
} }
break; break;
case "Hair" : case "Hair" :
if (xml.MoveToAttribute("Item")) if (xml.MoveToAttribute("Item"))
{ {
rdata.userAppearance.HairItem = xml.Value; rdata.userAppearance.HairItem = (UUID)xml.Value;
indata = true; indata = true;
} }
if (xml.MoveToAttribute("Asset")) if (xml.MoveToAttribute("Asset"))
{ {
rdata.userAppearance.HairAsset = xml.Value; rdata.userAppearance.HairAsset = (UUID)xml.Value;
indata = true; indata = true;
} }
break; break;
case "Eyes" : case "Eyes" :
if (xml.MoveToAttribute("Item")) if (xml.MoveToAttribute("Item"))
{ {
rdata.userAppearance.EyesItem = xml.Value; rdata.userAppearance.EyesItem = (UUID)xml.Value;
indata = true; indata = true;
} }
if (xml.MoveToAttribute("Asset")) if (xml.MoveToAttribute("Asset"))
{ {
rdata.userAppearance.EyesAsset = xml.Value; rdata.userAppearance.EyesAsset = (UUID)xml.Value;
indata = true; indata = true;
} }
break; break;
case "Shirt" : case "Shirt" :
if (xml.MoveToAttribute("Item")) if (xml.MoveToAttribute("Item"))
{ {
rdata.userAppearance.ShirtItem = xml.Value; rdata.userAppearance.ShirtItem = (UUID)xml.Value;
indata = true; indata = true;
} }
if (xml.MoveToAttribute("Asset")) if (xml.MoveToAttribute("Asset"))
{ {
rdata.userAppearance.ShirtAsset = xml.Value; rdata.userAppearance.ShirtAsset = (UUID)xml.Value;
indata = true; indata = true;
} }
break; break;
case "Pants" : case "Pants" :
if (xml.MoveToAttribute("Item")) if (xml.MoveToAttribute("Item"))
{ {
rdata.userAppearance.PantsItem = xml.Value; rdata.userAppearance.PantsItem = (UUID)xml.Value;
indata = true; indata = true;
} }
if (xml.MoveToAttribute("Asset")) if (xml.MoveToAttribute("Asset"))
{ {
rdata.userAppearance.PantsAsset = xml.Value; rdata.userAppearance.PantsAsset = (UUID)xml.Value;
indata = true; indata = true;
} }
break; break;
case "Shoes" : case "Shoes" :
if (xml.MoveToAttribute("Item")) if (xml.MoveToAttribute("Item"))
{ {
rdata.userAppearance.ShoesItem = xml.Value; rdata.userAppearance.ShoesItem = (UUID)xml.Value;
indata = true; indata = true;
} }
if (xml.MoveToAttribute("Asset")) if (xml.MoveToAttribute("Asset"))
{ {
rdata.userAppearance.ShoesAsset = xml.Value; rdata.userAppearance.ShoesAsset = (UUID)xml.Value;
indata = true; indata = true;
} }
break; break;
case "Socks" : case "Socks" :
if (xml.MoveToAttribute("Item")) if (xml.MoveToAttribute("Item"))
{ {
rdata.userAppearance.SocksItem = xml.Value; rdata.userAppearance.SocksItem = (UUID)xml.Value;
indata = true; indata = true;
} }
if (xml.MoveToAttribute("Asset")) if (xml.MoveToAttribute("Asset"))
{ {
rdata.userAppearance.SocksAsset = xml.Value; rdata.userAppearance.SocksAsset = (UUID)xml.Value;
indata = true; indata = true;
} }
break; break;
case "Jacket" : case "Jacket" :
if (xml.MoveToAttribute("Item")) if (xml.MoveToAttribute("Item"))
{ {
rdata.userAppearance.JacketItem = xml.Value; rdata.userAppearance.JacketItem = (UUID)xml.Value;
indata = true; indata = true;
} }
if (xml.MoveToAttribute("Asset")) if (xml.MoveToAttribute("Asset"))
{ {
rdata.userAppearance.JacketAsset = xml.Value; rdata.userAppearance.JacketAsset = (UUID)xml.Value;
indata = true; indata = true;
} }
break; break;
case "Gloves" : case "Gloves" :
if (xml.MoveToAttribute("Item")) if (xml.MoveToAttribute("Item"))
{ {
rdata.userAppearance.GlovesItem = xml.Value; rdata.userAppearance.GlovesItem = (UUID)xml.Value;
indata = true; indata = true;
} }
if (xml.MoveToAttribute("Asset")) if (xml.MoveToAttribute("Asset"))
{ {
rdata.userAppearance.GlovesAsset = xml.Value; rdata.userAppearance.GlovesAsset = (UUID)xml.Value;
indata = true; indata = true;
} }
break; break;
case "UnderShirt" : case "UnderShirt" :
if (xml.MoveToAttribute("Item")) if (xml.MoveToAttribute("Item"))
{ {
rdata.userAppearance.UnderShirtItem = xml.Value; rdata.userAppearance.UnderShirtItem = (UUID)xml.Value;
indata = true; indata = true;
} }
if (xml.MoveToAttribute("Asset")) if (xml.MoveToAttribute("Asset"))
{ {
rdata.userAppearance.UnderShirtAsset = xml.Value; rdata.userAppearance.UnderShirtAsset = (UUID)xml.Value;
indata = true; indata = true;
} }
break; break;
case "UnderPants" : case "UnderPants" :
if (xml.MoveToAttribute("Item")) if (xml.MoveToAttribute("Item"))
{ {
rdata.userAppearance.UnderPantsItem = xml.Value; rdata.userAppearance.UnderPantsItem = (UUID)xml.Value;
indata = true; indata = true;
} }
if (xml.MoveToAttribute("Asset")) if (xml.MoveToAttribute("Asset"))
{ {
rdata.userAppearance.UnderPantsAsset = xml.Value; rdata.userAppearance.UnderPantsAsset = (UUID)xml.Value;
indata = true; indata = true;
} }
break; break;
case "Skirt" : case "Skirt" :
if (xml.MoveToAttribute("Item")) if (xml.MoveToAttribute("Item"))
{ {
rdata.userAppearance.SkirtItem = xml.Value; rdata.userAppearance.SkirtItem = (UUID)xml.Value;
indata = true; indata = true;
} }
if (xml.MoveToAttribute("Asset")) if (xml.MoveToAttribute("Asset"))
{ {
rdata.userAppearance.SkirtAsset = xml.Value; rdata.userAppearance.SkirtAsset = (UUID)xml.Value;
indata = true; indata = true;
} }
break; break;

View File

@ -850,7 +850,7 @@ VALUES
newData.Name = (String)row["Name"]; newData.Name = (String)row["Name"];
newData.Description = (String)row["Description"]; newData.Description = (String)row["Description"];
newData.OwnerID = (String)row["OwnerUUID"]; newData.OwnerID = (UUID)(String)row["OwnerUUID"];
newData.IsGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]); newData.IsGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]);
newData.Area = Convert.ToInt32(row["Area"]); newData.Area = Convert.ToInt32(row["Area"]);
newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
@ -910,7 +910,7 @@ VALUES
{ {
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
entry.AgentID = new UUID((string)row["AccessUUID"]); entry.AgentID = new UUID((string)row["AccessUUID"]);
entry.Flags = (ParcelManager.AccessList)Convert.ToInt32(row["Flags"]); entry.Flags = (AccessList)Convert.ToInt32(row["Flags"]);
entry.Time = new DateTime(); entry.Time = new DateTime();
return entry; return entry;
} }

View File

@ -1052,7 +1052,7 @@ ELSE
retval.LogoutTime = Convert.ToInt32(reader["logoutTime"].ToString()); retval.LogoutTime = Convert.ToInt32(reader["logoutTime"].ToString());
// Current position // Current position
retval.Region = (string)reader["currentRegion"]; retval.Region = (UUID)(string)reader["currentRegion"];
retval.Handle = Convert.ToUInt64(reader["currentHandle"].ToString()); retval.Handle = Convert.ToUInt64(reader["currentHandle"].ToString());
Vector3 tmp_v; Vector3 tmp_v;
Vector3.TryParse((string)reader["currentPos"], out tmp_v); Vector3.TryParse((string)reader["currentPos"], out tmp_v);

View File

@ -1329,10 +1329,10 @@ namespace OpenSim.Data.MySQL
newData.Name = (String) row["Name"]; newData.Name = (String) row["Name"];
newData.Description = (String) row["Description"]; newData.Description = (String) row["Description"];
newData.OwnerID = (String) row["OwnerUUID"]; newData.OwnerID = (UUID)(String)row["OwnerUUID"];
newData.IsGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]); newData.IsGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]);
newData.Area = Convert.ToInt32(row["Area"]); newData.Area = Convert.ToInt32(row["Area"]);
newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unimplemented
newData.Category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]); newData.Category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]);
//Enum libsecondlife.Parcel.ParcelCategory //Enum libsecondlife.Parcel.ParcelCategory
newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]); newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]);
@ -1387,7 +1387,7 @@ namespace OpenSim.Data.MySQL
{ {
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
entry.AgentID = new UUID((string) row["AccessUUID"]); entry.AgentID = new UUID((string) row["AccessUUID"]);
entry.Flags = (ParcelManager.AccessList) Convert.ToInt32(row["Flags"]); entry.Flags = (AccessList) Convert.ToInt32(row["Flags"]);
entry.Time = new DateTime(); entry.Time = new DateTime();
return entry; return entry;
} }

View File

@ -422,7 +422,7 @@ namespace OpenSim.Data.SQLite
public List<InventoryFolderBase> getInventoryFolders(UUID parentID) public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
{ {
List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
getInventoryFolders(ref folders, Util.ToRawUuidString(parentID)); getInventoryFolders(ref folders, parentID);
return folders; return folders;
} }
@ -623,10 +623,10 @@ namespace OpenSim.Data.SQLite
/// <todo>this is horribly inefficient, but I don't want to ruin the overall structure of this implementation</todo> /// <todo>this is horribly inefficient, but I don't want to ruin the overall structure of this implementation</todo>
private void deleteItemsInFolder(UUID folderId) private void deleteItemsInFolder(UUID folderId)
{ {
List<InventoryItemBase> items = getInventoryInFolder(Util.ToRawUuidString(folderId)); List<InventoryItemBase> items = getInventoryInFolder(folderId);
foreach (InventoryItemBase i in items) foreach (InventoryItemBase i in items)
deleteInventoryItem(Util.ToRawUuidString(i.ID)); deleteInventoryItem(i.ID);
} }
/// <summary> /// <summary>
@ -667,7 +667,7 @@ namespace OpenSim.Data.SQLite
{ {
lock (ds) lock (ds)
{ {
List<InventoryFolderBase> subFolders = getFolderHierarchy(Util.ToRawUuidString(folderID)); List<InventoryFolderBase> subFolders = getFolderHierarchy(folderID);
DataTable inventoryFolderTable = ds.Tables["inventoryfolders"]; DataTable inventoryFolderTable = ds.Tables["inventoryfolders"];
DataRow inventoryRow; DataRow inventoryRow;
@ -678,7 +678,7 @@ namespace OpenSim.Data.SQLite
inventoryRow = inventoryFolderTable.Rows.Find(Util.ToRawUuidString(f.ID)); inventoryRow = inventoryFolderTable.Rows.Find(Util.ToRawUuidString(f.ID));
if (inventoryRow != null) if (inventoryRow != null)
{ {
deleteItemsInFolder(Util.ToRawUuidString(f.ID)); deleteItemsInFolder(f.ID);
inventoryRow.Delete(); inventoryRow.Delete();
} }
} }
@ -687,7 +687,7 @@ namespace OpenSim.Data.SQLite
inventoryRow = inventoryFolderTable.Rows.Find(Util.ToRawUuidString(folderID)); inventoryRow = inventoryFolderTable.Rows.Find(Util.ToRawUuidString(folderID));
if (inventoryRow != null) if (inventoryRow != null)
{ {
deleteItemsInFolder(Util.ToRawUuidString(folderID)); deleteItemsInFolder(folderID);
inventoryRow.Delete(); inventoryRow.Delete();
} }

View File

@ -258,7 +258,7 @@ namespace OpenSim.Data.SQLite
{ {
DataTable regionsettings = ds.Tables["regionsettings"]; DataTable regionsettings = ds.Tables["regionsettings"];
DataRow settingsRow = regionsettings.Rows.Find(rs.RegionUUID.ToString()); DataRow settingsRow = regionsettings.Rows.Find(Util.ToRawUuidString(rs.RegionUUID));
if (settingsRow == null) if (settingsRow == null)
{ {
settingsRow = regionsettings.NewRow(); settingsRow = regionsettings.NewRow();
@ -439,7 +439,7 @@ namespace OpenSim.Data.SQLite
group.AddPart(prim); group.AddPart(prim);
group.RootPart = prim; group.RootPart = prim;
createdObjects.Add(Util.ToRawUuidString(group.UUID), group); createdObjects.Add(group.UUID, group);
retvals.Add(group); retvals.Add(group);
} }
else else
@ -1268,7 +1268,7 @@ namespace OpenSim.Data.SQLite
newData.Name = (String) row["Name"]; newData.Name = (String) row["Name"];
newData.Description = (String) row["Desc"]; newData.Description = (String) row["Desc"];
newData.OwnerID = (String) row["OwnerUUID"]; newData.OwnerID = (UUID)(String) row["OwnerUUID"];
newData.IsGroupOwned = (Boolean) row["IsGroupOwned"]; newData.IsGroupOwned = (Boolean) row["IsGroupOwned"];
newData.Area = Convert.ToInt32(row["Area"]); newData.Area = Convert.ToInt32(row["Area"]);
newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
@ -1288,7 +1288,7 @@ namespace OpenSim.Data.SQLite
newData.MusicURL = (String) row["MusicURL"]; newData.MusicURL = (String) row["MusicURL"];
newData.PassHours = Convert.ToSingle(row["PassHours"]); newData.PassHours = Convert.ToSingle(row["PassHours"]);
newData.PassPrice = Convert.ToInt32(row["PassPrice"]); newData.PassPrice = Convert.ToInt32(row["PassPrice"]);
newData.SnapshotID = (String) row["SnapshotUUID"]; newData.SnapshotID = (UUID)(String) row["SnapshotUUID"];
try try
{ {
@ -1365,7 +1365,7 @@ namespace OpenSim.Data.SQLite
{ {
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
entry.AgentID = new UUID((string) row["AccessUUID"]); entry.AgentID = new UUID((string) row["AccessUUID"]);
entry.Flags = (ParcelManager.AccessList) row["Flags"]; entry.Flags = (AccessList) row["Flags"];
entry.Time = new DateTime(); entry.Time = new DateTime();
return entry; return entry;
} }

View File

@ -523,7 +523,7 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="transferRequest"></param> /// <param name="transferRequest"></param>
public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest) public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest)
{ {
UUID requestID = null; UUID requestID = UUID.Zero;
byte source = 2; byte source = 2;
if (transferRequest.TransferInfo.SourceType == 2) if (transferRequest.TransferInfo.SourceType == 2)
{ {

View File

@ -165,7 +165,7 @@ namespace OpenSim.Framework.Communications
} }
else if (requestData.Contains("web_login_key")) else if (requestData.Contains("web_login_key"))
{ {
UUID webloginkey = null; UUID webloginkey = UUID.Zero;
try try
{ {
webloginkey = new UUID((string)requestData["web_login_key"]); webloginkey = new UUID((string)requestData["web_login_key"]);
@ -268,9 +268,9 @@ namespace OpenSim.Framework.Communications
logResponse.CircuitCode = Util.RandomClass.Next(); logResponse.CircuitCode = Util.RandomClass.Next();
logResponse.Lastname = userProfile.SurName; logResponse.Lastname = userProfile.SurName;
logResponse.Firstname = userProfile.FirstName; logResponse.Firstname = userProfile.FirstName;
logResponse.AgentID = agentID.ToString(); logResponse.AgentID = agentID;
logResponse.SessionID = userProfile.CurrentAgent.SessionID.ToString(); logResponse.SessionID = userProfile.CurrentAgent.SessionID;
logResponse.SecureSessionID = userProfile.CurrentAgent.SecureSessionID.ToString(); logResponse.SecureSessionID = userProfile.CurrentAgent.SecureSessionID;
logResponse.Message = GetMessage(); logResponse.Message = GetMessage();
logResponse.BuddList = ConvertFriendListItem(m_userManager.GetUserFriendList(agentID)); logResponse.BuddList = ConvertFriendListItem(m_userManager.GetUserFriendList(agentID));
logResponse.StartLocation = startLocationRequest; logResponse.StartLocation = startLocationRequest;
@ -436,9 +436,9 @@ namespace OpenSim.Framework.Communications
logResponse.CircuitCode = (Int32)Util.RandomClass.Next(); logResponse.CircuitCode = (Int32)Util.RandomClass.Next();
logResponse.Lastname = userProfile.SurName; logResponse.Lastname = userProfile.SurName;
logResponse.Firstname = userProfile.FirstName; logResponse.Firstname = userProfile.FirstName;
logResponse.AgentID = agentID.ToString(); logResponse.AgentID = agentID;
logResponse.SessionID = userProfile.CurrentAgent.SessionID.ToString(); logResponse.SessionID = userProfile.CurrentAgent.SessionID;
logResponse.SecureSessionID = userProfile.CurrentAgent.SecureSessionID.ToString(); logResponse.SecureSessionID = userProfile.CurrentAgent.SecureSessionID;
logResponse.Message = GetMessage(); logResponse.Message = GetMessage();
logResponse.BuddList = ConvertFriendListItem(m_userManager.GetUserFriendList(agentID)); logResponse.BuddList = ConvertFriendListItem(m_userManager.GetUserFriendList(agentID));
logResponse.StartLocation = startLocationRequest; logResponse.StartLocation = startLocationRequest;

View File

@ -434,28 +434,28 @@ namespace OpenSim.Framework
switch (configuration_key) switch (configuration_key)
{ {
case "region_flags": case "region_flags":
Simulator.RegionFlags flags = (Simulator.RegionFlags)(uint)configuration_result; RegionFlags flags = (RegionFlags)(uint)configuration_result;
if ((flags & (Simulator.RegionFlags)(1<<29)) != 0) if ((flags & (RegionFlags)(1<<29)) != 0)
m_AllowVoice = true; m_AllowVoice = true;
if ((flags & Simulator.RegionFlags.AllowDirectTeleport) != 0) if ((flags & RegionFlags.AllowDirectTeleport) != 0)
m_AllowDirectTeleport = true; m_AllowDirectTeleport = true;
if ((flags & Simulator.RegionFlags.DenyAnonymous) != 0) if ((flags & RegionFlags.DenyAnonymous) != 0)
m_DenyAnonymous = true; m_DenyAnonymous = true;
if ((flags & Simulator.RegionFlags.DenyIdentified) != 0) if ((flags & RegionFlags.DenyIdentified) != 0)
m_DenyIdentified = true; m_DenyIdentified = true;
if ((flags & Simulator.RegionFlags.DenyTransacted) != 0) if ((flags & RegionFlags.DenyTransacted) != 0)
m_DenyTransacted = true; m_DenyTransacted = true;
if ((flags & Simulator.RegionFlags.AbuseEmailToEstateOwner) != 0) if ((flags & RegionFlags.AbuseEmailToEstateOwner) != 0)
m_AbuseEmailToEstateOwner = true; m_AbuseEmailToEstateOwner = true;
if ((flags & Simulator.RegionFlags.BlockDwell) != 0) if ((flags & RegionFlags.BlockDwell) != 0)
m_BlockDwell = true; m_BlockDwell = true;
if ((flags & Simulator.RegionFlags.EstateSkipScripts) != 0) if ((flags & RegionFlags.EstateSkipScripts) != 0)
m_EstateSkipScripts = true; m_EstateSkipScripts = true;
if ((flags & Simulator.RegionFlags.ResetHomeOnTeleport) != 0) if ((flags & RegionFlags.ResetHomeOnTeleport) != 0)
m_ResetHomeOnTeleport = true; m_ResetHomeOnTeleport = true;
if ((flags & Simulator.RegionFlags.TaxFree) != 0) if ((flags & RegionFlags.TaxFree) != 0)
m_TaxFree = true; m_TaxFree = true;
if ((flags & Simulator.RegionFlags.PublicAllowed) != 0) if ((flags & RegionFlags.PublicAllowed) != 0)
m_PublicAccess = true; m_PublicAccess = true;
break; break;
case "billable_factor": case "billable_factor":

View File

@ -558,8 +558,7 @@ namespace OpenSim.Framework
void SendLayerData(float[] map); void SendLayerData(float[] map);
void SendLayerData(int px, int py, float[] map); void SendLayerData(int px, int py, float[] map);
void SendWindData(float[] map); void SendWindData(Vector2[] windSpeeds);
void SendWindData(int p1x, int p1y, int p2x, int p2y, float[] map);
void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look); void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look);
void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint); void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint);

View File

@ -40,7 +40,7 @@ namespace OpenSim.Framework
public UUID GroupID; public UUID GroupID;
public List<UUID> GroupMembers; public List<UUID> GroupMembers;
public string groupName; public string groupName;
public uint groupPowers = (uint)(GroupPowers.LandAllowLandmark | GroupPowers.LandAllowSetHome); public uint groupPowers = (uint)(GroupPowers.AllowLandmark | GroupPowers.AllowSetHome);
public List<string> GroupTitles; public List<string> GroupTitles;
public bool AcceptNotices = true; public bool AcceptNotices = true;
public bool AllowPublish = true; public bool AllowPublish = true;

View File

@ -138,32 +138,32 @@ namespace OpenSim.Framework
switch (key) switch (key)
{ {
case "region_flags": case "region_flags":
Simulator.RegionFlags flags = (Simulator.RegionFlags)(uint)value; RegionFlags flags = (RegionFlags)(uint)value;
m_BlockTerraform = m_BlockTerraform =
(flags & Simulator.RegionFlags.BlockTerraform) != 0; (flags & RegionFlags.BlockTerraform) != 0;
m_BlockFly = m_BlockFly =
(flags & Simulator.RegionFlags.NoFly) != 0; (flags & RegionFlags.NoFly) != 0;
m_AllowDamage = m_AllowDamage =
(flags & Simulator.RegionFlags.AllowDamage) != 0; (flags & RegionFlags.AllowDamage) != 0;
m_RestrictPushing = m_RestrictPushing =
(flags & Simulator.RegionFlags.RestrictPushObject) != 0; (flags & RegionFlags.RestrictPushObject) != 0;
m_AllowLandResell = m_AllowLandResell =
(flags & Simulator.RegionFlags.BlockLandResell) == 0; (flags & RegionFlags.BlockLandResell) == 0;
m_AllowLandJoinDivide = m_AllowLandJoinDivide =
(flags & Simulator.RegionFlags.AllowParcelChanges) != 0; (flags & RegionFlags.AllowParcelChanges) != 0;
m_BlockShowInSearch = m_BlockShowInSearch =
((uint)flags & (1 << 29)) != 0; ((uint)flags & (1 << 29)) != 0;
m_DisableScripts = m_DisableScripts =
(flags & Simulator.RegionFlags.SkipScripts) != 0; (flags & RegionFlags.SkipScripts) != 0;
m_DisableCollisions = m_DisableCollisions =
(flags & Simulator.RegionFlags.SkipCollisions) != 0; (flags & RegionFlags.SkipCollisions) != 0;
m_DisablePhysics = m_DisablePhysics =
(flags & Simulator.RegionFlags.SkipPhysics) != 0; (flags & RegionFlags.SkipPhysics) != 0;
m_FixedSun = m_FixedSun =
(flags & Simulator.RegionFlags.SunFixed) != 0; (flags & RegionFlags.SunFixed) != 0;
m_Sandbox = m_Sandbox =
(flags & Simulator.RegionFlags.Sandbox) != 0; (flags & RegionFlags.Sandbox) != 0;
break; break;
case "max_agents": case "max_agents":
m_AgentLimit = (int)value; m_AgentLimit = (int)value;

View File

@ -70,7 +70,7 @@ namespace OpenSim.Grid.AssetServer
if (p.Length > 0) if (p.Length > 0)
{ {
UUID assetID = null; UUID assetID = UUID.Zero;
if (!UUID.TryParse(p[0], out assetID)) if (!UUID.TryParse(p[0], out assetID))
{ {

View File

@ -614,7 +614,7 @@ namespace OpenSim.Grid.GridServer
// //
// this particular section of the mod attempts to receive a value from the region's xml file by way of // this particular section of the mod attempts to receive a value from the region's xml file by way of
// OSG1GridServices for the region's owner // OSG1GridServices for the region's owner
sim.owner_uuid = (string)requestData["master_avatar_uuid"]; sim.owner_uuid = (UUID)(string)requestData["master_avatar_uuid"];
try try
{ {

View File

@ -52,7 +52,7 @@ namespace OpenSim.Grid.MessagingServer
public UUID getitem(int index) public UUID getitem(int index)
{ {
UUID result = null; UUID result = UUID.Zero;
lock (AgentList) lock (AgentList)
{ {
if (index > 0 && index < AgentList.Count) if (index > 0 && index < AgentList.Count)

View File

@ -63,7 +63,7 @@ namespace OpenSim.Grid.MessagingServer
if (p.Length > 0) if (p.Length > 0)
{ {
UUID assetID = null; UUID assetID = UUID.Zero;
if (!UUID.TryParse(p[0], out assetID)) if (!UUID.TryParse(p[0], out assetID))
{ {

View File

@ -1232,43 +1232,40 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <summary> /// <summary>
/// Send the region heightmap to the client /// Send the region heightmap to the client
/// </summary> /// </summary>
/// <param name="map">heightmap</param> /// <param name="windSpeeds">16x16 array of wind speeds</param>
public virtual void SendWindData(float[] map) public virtual void SendWindData(Vector2[] windSpeeds)
{ {
//ThreadPool.QueueUserWorkItem(new WaitCallback(DoSendWindData), (object)map); ThreadPool.QueueUserWorkItem(new WaitCallback(DoSendWindData), (object)windSpeeds);
} }
/// <summary> /// <summary>
/// Send terrain layer information to the client. /// Send terrain layer information to the client.
/// </summary> /// </summary>
/// <param name="o"></param> /// <param name="o"></param>
//private void DoSendWindData(object o) private void DoSendWindData(object o)
//{ {
//float[] map = (float[])o; Vector2[] windSpeeds = (Vector2[])o;
//try TerrainPatch[] patches = new TerrainPatch[2];
//{ patches[0] = new TerrainPatch();
//for (int y = 0; y < 16; y++) patches[0].Data = new float[16 * 16];
//{ patches[1] = new TerrainPatch();
// For some terrains, sending more than one terrain patch at once results in a libsecondlife exception patches[1].Data = new float[16 * 16];
// see http://opensimulator.org/mantis/view.php?id=1662
//for (int x = 0; x < 16; x += 4) for (int y = 0; y < 16; y++)
//{ {
// SendLayerPacket(map, y, x); for (int x = 0; x < 16; x++)
// Thread.Sleep(150); {
//} patches[0].Data[y * 16 + x] = windSpeeds[y * 16 + x].X;
// for (int x = 0; x < 16; x++) patches[1].Data[y * 16 + x] = windSpeeds[y * 16 + x].Y;
//{ }
//SendWindData(x, y, map); }
//Thread.Sleep(35);
//} LayerDataPacket layerpack = TerrainCompressor.CreateLayerDataPacket(patches, TerrainPatch.LayerType.Wind);
//} layerpack.Header.Zerocoded = true;
//}
//catch (Exception e) OutPacket(layerpack, ThrottleOutPacketType.Wind);
//{ }
// m_log.Warn("[CLIENT]: ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString());
// }
//}
/// <summary> /// <summary>
/// Sends a set of four patches (x, x+1, ..., x+3) to the client /// Sends a set of four patches (x, x+1, ..., x+3) to the client
@ -1288,41 +1285,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// OutPacket(layerpack, ThrottleOutPacketType.Land); // OutPacket(layerpack, ThrottleOutPacketType.Land);
// } // }
/// <summary>
/// Sends a specified patch to a client
/// </summary>
/// <param name="px">Patch coordinate (x) 0..15</param>
/// <param name="py">Patch coordinate (y) 0..15</param>
/// <param name="map">heightmap</param>
public void SendWindData(int p1x, int p1y, int p2x, int p2y, float[] map)
{
try
{
int[] patches = new int[2];
int patch1x, patch1y, patch2x, patch2y;
patch1x = p1x;
patch1y = p1y;
patch2x = p2x;
patch2y = p2y;
patches[0] = patch1x + 0 + patch1y * 16;
patches[1] = patch2x + 0 + patch2y * 16;
LayerDataPacket layerpack = TerrainCompressor.CreateWindPacket(map, patches);
layerpack.Header.Zerocoded = true;
OutPacket(layerpack, ThrottleOutPacketType.Wind);
}
catch (Exception e)
{
m_log.Warn("[client]: ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString());
}
}
/// <summary> /// <summary>
/// Tell the client that the given neighbour region is ready to receive a child agent. /// Tell the client that the given neighbour region is ready to receive a child agent.
/// </summary> /// </summary>
@ -2940,13 +2902,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
updatePacket.ParcelData.PassPrice = landData.PassPrice; updatePacket.ParcelData.PassPrice = landData.PassPrice;
updatePacket.ParcelData.PublicCount = 0; //unemplemented updatePacket.ParcelData.PublicCount = 0; //unemplemented
updatePacket.ParcelData.RegionDenyAnonymous = ((regionFlags & (uint)Simulator.RegionFlags.DenyAnonymous) > updatePacket.ParcelData.RegionDenyAnonymous = ((regionFlags & (uint)RegionFlags.DenyAnonymous) >
0); 0);
updatePacket.ParcelData.RegionDenyIdentified = ((regionFlags & (uint)Simulator.RegionFlags.DenyIdentified) > updatePacket.ParcelData.RegionDenyIdentified = ((regionFlags & (uint)RegionFlags.DenyIdentified) >
0); 0);
updatePacket.ParcelData.RegionDenyTransacted = ((regionFlags & (uint)Simulator.RegionFlags.DenyTransacted) > updatePacket.ParcelData.RegionDenyTransacted = ((regionFlags & (uint)RegionFlags.DenyTransacted) >
0); 0);
updatePacket.ParcelData.RegionPushOverride = ((regionFlags & (uint)Simulator.RegionFlags.RestrictPushObject) > updatePacket.ParcelData.RegionPushOverride = ((regionFlags & (uint)RegionFlags.RestrictPushObject) >
0); 0);
updatePacket.ParcelData.RentPrice = 0; updatePacket.ParcelData.RentPrice = 0;
@ -3586,7 +3548,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
string name = (string)nod.Attributes["name"].Value.ToLower(); string name = (string)nod.Attributes["name"].Value.ToLower();
string id = (string)nod.InnerText; string id = (string)nod.InnerText;
m_defaultAnimations.Add(name, id); m_defaultAnimations.Add(name, (UUID)id);
} }
} }
} }
@ -4936,9 +4898,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// //
if (transfer.TransferInfo.SourceType == 3) if (transfer.TransferInfo.SourceType == 3)
{ {
UUID taskID = null; UUID taskID = UUID.Zero;
UUID itemID = null; UUID itemID = UUID.Zero;
UUID requestID = null; UUID requestID = UUID.Zero;
taskID = new UUID(transfer.TransferInfo.Params, 48); taskID = new UUID(transfer.TransferInfo.Params, 48);
itemID = new UUID(transfer.TransferInfo.Params, 64); itemID = new UUID(transfer.TransferInfo.Params, 64);
requestID = new UUID(transfer.TransferInfo.Params, 80); requestID = new UUID(transfer.TransferInfo.Params, 80);
@ -5569,7 +5531,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
entry.AgentID = block.ID; entry.AgentID = block.ID;
entry.Flags = (ParcelManager.AccessList)block.Flags; entry.Flags = (AccessList)block.Flags;
entry.Time = new DateTime(); entry.Time = new DateTime();
entries.Add(entry); entries.Add(entry);
} }

View File

@ -109,6 +109,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public Packet Packet; public Packet Packet;
public Object Identifier; public Object Identifier;
public int TickCount;
} }
private Dictionary<uint, AckData> m_NeedAck = private Dictionary<uint, AckData> m_NeedAck =
@ -293,12 +294,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
Packet packet, ThrottleOutPacketType throttlePacketType, Packet packet, ThrottleOutPacketType throttlePacketType,
Object id) Object id)
{ {
packet.TickCount = System.Environment.TickCount;
LLQueItem item = new LLQueItem(); LLQueItem item = new LLQueItem();
item.Packet = packet; item.Packet = packet;
item.Incoming = false; item.Incoming = false;
item.throttleType = throttlePacketType; item.throttleType = throttlePacketType;
item.TickCount = System.Environment.TickCount;
item.Identifier = id; item.Identifier = id;
m_PacketQueue.Enqueue(item); m_PacketQueue.Enqueue(item);
@ -341,7 +341,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Packets this old get resent // Packets this old get resent
// //
if ((now - packet.TickCount) > m_ResendTimeout) if ((now - data.TickCount) > m_ResendTimeout)
{ {
// Resend the packet. Set the packet's tick count to // Resend the packet. Set the packet's tick count to
// now, and keep it marked as resent. // now, and keep it marked as resent.
@ -357,7 +357,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// pipes. Most likely, the client is gone // pipes. Most likely, the client is gone
// Drop the packets // Drop the packets
// //
if ((now - packet.TickCount) > m_DiscardTimeout) if ((now - data.TickCount) > m_DiscardTimeout)
{ {
if (!m_ImportantPackets.Contains(packet.Type)) if (!m_ImportantPackets.Contains(packet.Type))
m_NeedAck.Remove(packet.Header.Sequence); m_NeedAck.Remove(packet.Header.Sequence);
@ -729,7 +729,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
Packet packet = item.Packet; Packet packet = item.Packet;
// Keep track of when this packet was sent out // Keep track of when this packet was sent out
packet.TickCount = System.Environment.TickCount; item.TickCount = System.Environment.TickCount;
// Assign sequence number here to prevent out of order packets // Assign sequence number here to prevent out of order packets
if (packet.Header.Sequence == 0) if (packet.Header.Sequence == 0)

View File

@ -36,6 +36,7 @@ using OpenSim.Framework.Statistics;
using OpenSim.Framework.Statistics.Interfaces; using OpenSim.Framework.Statistics.Interfaces;
using Timer=System.Timers.Timer; using Timer=System.Timers.Timer;
namespace OpenSim.Region.ClientStack.LindenUDP namespace OpenSim.Region.ClientStack.LindenUDP
{ {
public class LLPacketQueue : IPullStatsProvider public class LLPacketQueue : IPullStatsProvider
@ -45,7 +46,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private bool m_enabled = true; private bool m_enabled = true;
private BlockingQueue<LLQueItem> SendQueue; private OpenSim.Framework.BlockingQueue<LLQueItem> SendQueue;
private Queue<LLQueItem> IncomingPacketQueue; private Queue<LLQueItem> IncomingPacketQueue;
private Queue<LLQueItem> OutgoingPacketQueue; private Queue<LLQueItem> OutgoingPacketQueue;
@ -91,7 +92,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// in it to process. it's an on-purpose threadlock though because // in it to process. it's an on-purpose threadlock though because
// without it, the clientloop will suck up all sim resources. // without it, the clientloop will suck up all sim resources.
SendQueue = new BlockingQueue<LLQueItem>(); SendQueue = new OpenSim.Framework.BlockingQueue<LLQueItem>();
IncomingPacketQueue = new Queue<LLQueItem>(); IncomingPacketQueue = new Queue<LLQueItem>();
OutgoingPacketQueue = new Queue<LLQueItem>(); OutgoingPacketQueue = new Queue<LLQueItem>();

View File

@ -40,6 +40,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public Packet Packet; public Packet Packet;
public bool Incoming; public bool Incoming;
public ThrottleOutPacketType throttleType; public ThrottleOutPacketType throttleType;
public int TickCount;
public Object Identifier; public Object Identifier;
} }
} }

View File

@ -311,11 +311,11 @@ namespace OpenSim.Region.Communications.Local
user.CurrentAgent.Handle = regionInfo.RegionHandle; user.CurrentAgent.Handle = regionInfo.RegionHandle;
// Prepare notification // Prepare notification
Login loginParams = new Login(); Login loginParams = new Login();
loginParams.Session = user.CurrentAgent.SessionID.ToString(); loginParams.Session = user.CurrentAgent.SessionID;
loginParams.SecureSession = user.CurrentAgent.SecureSessionID.ToString(); loginParams.SecureSession = user.CurrentAgent.SecureSessionID;
loginParams.First = user.FirstName; loginParams.First = user.FirstName;
loginParams.Last = user.SurName; loginParams.Last = user.SurName;
loginParams.Agent = user.ID.ToString(); loginParams.Agent = user.ID;
loginParams.CircuitCode = Convert.ToUInt32(response.CircuitCode); loginParams.CircuitCode = Convert.ToUInt32(response.CircuitCode);
loginParams.StartPos = user.CurrentAgent.Position; loginParams.StartPos = user.CurrentAgent.Position;
loginParams.CapsPath = capsPath; loginParams.CapsPath = capsPath;

View File

@ -54,7 +54,7 @@ namespace OpenSim.Region.Environment.Interfaces
bool isBannedFromLand(UUID avatar); bool isBannedFromLand(UUID avatar);
bool isRestrictedFromLand(UUID avatar); bool isRestrictedFromLand(UUID avatar);
void sendLandUpdateToClient(IClientAPI remote_client); void sendLandUpdateToClient(IClientAPI remote_client);
List<UUID> createAccessListArrayByFlag(ParcelManager.AccessList flag); List<UUID> createAccessListArrayByFlag(AccessList flag);
void sendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, IClientAPI remote_client); void sendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, IClientAPI remote_client);
void updateAccessList(uint flags, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client); void updateAccessList(uint flags, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client);
void updateLandBitmapByteArray(); void updateLandBitmapByteArray();

View File

@ -109,7 +109,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
/// <param name="transferRequest"></param> /// <param name="transferRequest"></param>
public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest) public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest)
{ {
UUID requestID = null; UUID requestID = UUID.Zero;
byte source = 2; byte source = 2;
if (transferRequest.TransferInfo.SourceType == 2) if (transferRequest.TransferInfo.SourceType == 2)
{ {

View File

@ -33,6 +33,7 @@ using Nini.Config;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Scenes;
using BlockingQueue = OpenSim.Framework.BlockingQueue<OpenSim.Region.Environment.Interfaces.ITextureSender>;
namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
{ {
@ -44,8 +45,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
/// <summary> /// <summary>
/// There is one queue for all textures waiting to be sent, regardless of the requesting user. /// There is one queue for all textures waiting to be sent, regardless of the requesting user.
/// </summary> /// </summary>
private readonly BlockingQueue<ITextureSender> m_queueSenders private readonly OpenSim.Framework.BlockingQueue<ITextureSender> m_queueSenders
= new BlockingQueue<ITextureSender>(); = new OpenSim.Framework.BlockingQueue<ITextureSender>();
/// <summary> /// <summary>
/// Each user has their own texture download service. /// Each user has their own texture download service.

View File

@ -35,6 +35,7 @@ using OpenSim.Framework.Statistics;
using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Scenes;
namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
{ {
/// <summary> /// <summary>
@ -75,7 +76,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
/// Texture Senders are placed in this queue once they have received their texture from the asset /// Texture Senders are placed in this queue once they have received their texture from the asset
/// cache. Another module actually invokes the send. /// cache. Another module actually invokes the send.
/// </summary> /// </summary>
private readonly BlockingQueue<ITextureSender> m_sharedSendersQueue; private readonly OpenSim.Framework.BlockingQueue<ITextureSender> m_sharedSendersQueue;
/// <summary> /// <summary>
/// Holds texture senders before they have received the appropriate texture from the asset cache. /// Holds texture senders before they have received the appropriate texture from the asset cache.
@ -91,7 +92,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
= new RepeatLimitStrategy<UUID>(MAX_ALLOWED_TEXTURE_REQUESTS); = new RepeatLimitStrategy<UUID>(MAX_ALLOWED_TEXTURE_REQUESTS);
public UserTextureDownloadService( public UserTextureDownloadService(
IClientAPI client, Scene scene, BlockingQueue<ITextureSender> sharedQueue) IClientAPI client, Scene scene, OpenSim.Framework.BlockingQueue<ITextureSender> sharedQueue)
{ {
m_client = client; m_client = client;
m_scene = scene; m_scene = scene;

View File

@ -298,7 +298,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
int funds = 0; int funds = 0;
Hashtable hbinfo = Hashtable hbinfo =
GetBalanceForUserFromMoneyServer(client.AgentId, client.SecureSessionId, s.RegionInfo.originRegionID.ToString(), GetBalanceForUserFromMoneyServer(client.AgentId, client.SecureSessionId, s.RegionInfo.originRegionID,
s.RegionInfo.regionSecret); s.RegionInfo.regionSecret);
if ((bool) hbinfo["success"] == true) if ((bool) hbinfo["success"] == true)
{ {
@ -722,7 +722,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
if (m_MoneyAddress.Length > 0) if (m_MoneyAddress.Length > 0)
{ {
Hashtable hbinfo = Hashtable hbinfo =
GetBalanceForUserFromMoneyServer(aClient.AgentId, aClient.SecureSessionId, s.RegionInfo.originRegionID.ToString(), GetBalanceForUserFromMoneyServer(aClient.AgentId, aClient.SecureSessionId, s.RegionInfo.originRegionID,
s.RegionInfo.regionSecret); s.RegionInfo.regionSecret);
if ((bool) hbinfo["success"] == true) if ((bool) hbinfo["success"] == true)
{ {

View File

@ -67,7 +67,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
OpenSimulatorGroup.ActiveGroupTitle = "OpenSimulator Tester"; OpenSimulatorGroup.ActiveGroupTitle = "OpenSimulator Tester";
OpenSimulatorGroup.GroupID = opensimulatorGroupID; OpenSimulatorGroup.GroupID = opensimulatorGroupID;
OpenSimulatorGroup.groupName = "OpenSimulator Testing"; OpenSimulatorGroup.groupName = "OpenSimulator Testing";
OpenSimulatorGroup.ActiveGroupPowers = GroupPowers.LandAllowSetHome; OpenSimulatorGroup.ActiveGroupPowers = GroupPowers.AllowSetHome;
OpenSimulatorGroup.GroupTitles.Add("OpenSimulator Tester"); OpenSimulatorGroup.GroupTitles.Add("OpenSimulator Tester");
if (!m_groupUUIDGroup.ContainsKey(opensimulatorGroupID)) if (!m_groupUUIDGroup.ContainsKey(opensimulatorGroupID))
m_groupUUIDGroup.Add(opensimulatorGroupID, OpenSimulatorGroup); m_groupUUIDGroup.Add(opensimulatorGroupID, OpenSimulatorGroup);

View File

@ -787,7 +787,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
UUID userUUID = UUID.Zero; UUID userUUID = UUID.Zero;
if (UUID.TryParse(uuidString, out userUUID)) if (UUID.TryParse(uuidString, out userUUID))
{ {
UUID RemoteID = uuidString; UUID RemoteID = (UUID)uuidString;
UUID LocalID = RemoteID; UUID LocalID = RemoteID;
// FIXME: TODO: Routine to map RemoteUUIDs to LocalUUIds // FIXME: TODO: Routine to map RemoteUUIDs to LocalUUIds
// would be done already.. but the client connects with the Aditi UUID // would be done already.. but the client connects with the Aditi UUID

View File

@ -732,40 +732,40 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
public uint GetRegionFlags() public uint GetRegionFlags()
{ {
Simulator.RegionFlags flags = Simulator.RegionFlags.None; RegionFlags flags = RegionFlags.None;
// Fully implemented // Fully implemented
// //
if (m_scene.RegionInfo.RegionSettings.AllowDamage) if (m_scene.RegionInfo.RegionSettings.AllowDamage)
flags |= Simulator.RegionFlags.AllowDamage; flags |= RegionFlags.AllowDamage;
if (m_scene.RegionInfo.RegionSettings.BlockTerraform) if (m_scene.RegionInfo.RegionSettings.BlockTerraform)
flags |= Simulator.RegionFlags.BlockTerraform; flags |= RegionFlags.BlockTerraform;
if (!m_scene.RegionInfo.RegionSettings.AllowLandResell) if (!m_scene.RegionInfo.RegionSettings.AllowLandResell)
flags |= Simulator.RegionFlags.BlockLandResell; flags |= RegionFlags.BlockLandResell;
if (m_scene.RegionInfo.RegionSettings.DisableCollisions) if (m_scene.RegionInfo.RegionSettings.DisableCollisions)
flags |= Simulator.RegionFlags.SkipCollisions; flags |= RegionFlags.SkipCollisions;
if (m_scene.RegionInfo.RegionSettings.DisableScripts) if (m_scene.RegionInfo.RegionSettings.DisableScripts)
flags |= Simulator.RegionFlags.SkipScripts; flags |= RegionFlags.SkipScripts;
if (m_scene.RegionInfo.RegionSettings.DisablePhysics) if (m_scene.RegionInfo.RegionSettings.DisablePhysics)
flags |= Simulator.RegionFlags.SkipPhysics; flags |= RegionFlags.SkipPhysics;
if (m_scene.RegionInfo.RegionSettings.BlockFly) if (m_scene.RegionInfo.RegionSettings.BlockFly)
flags |= Simulator.RegionFlags.NoFly; flags |= RegionFlags.NoFly;
if (m_scene.RegionInfo.RegionSettings.RestrictPushing) if (m_scene.RegionInfo.RegionSettings.RestrictPushing)
flags |= Simulator.RegionFlags.RestrictPushObject; flags |= RegionFlags.RestrictPushObject;
if (m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide) if (m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide)
flags |= Simulator.RegionFlags.AllowParcelChanges; flags |= RegionFlags.AllowParcelChanges;
if (m_scene.RegionInfo.RegionSettings.BlockShowInSearch) if (m_scene.RegionInfo.RegionSettings.BlockShowInSearch)
flags |= (Simulator.RegionFlags)(1 << 29); flags |= (RegionFlags)(1 << 29);
if (m_scene.RegionInfo.RegionSettings.FixedSun) if (m_scene.RegionInfo.RegionSettings.FixedSun)
flags |= Simulator.RegionFlags.SunFixed; flags |= RegionFlags.SunFixed;
if (m_scene.RegionInfo.RegionSettings.Sandbox) if (m_scene.RegionInfo.RegionSettings.Sandbox)
flags |= Simulator.RegionFlags.Sandbox; flags |= RegionFlags.Sandbox;
// Fudge these to always on, so the menu options activate // Fudge these to always on, so the menu options activate
// //
flags |= Simulator.RegionFlags.AllowLandmark; flags |= RegionFlags.AllowLandmark;
flags |= Simulator.RegionFlags.AllowSetHome; flags |= RegionFlags.AllowSetHome;
// TODO: SkipUpdateInterestList // TODO: SkipUpdateInterestList
@ -779,35 +779,35 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
public uint GetEstateFlags() public uint GetEstateFlags()
{ {
Simulator.RegionFlags flags = Simulator.RegionFlags.None; RegionFlags flags = RegionFlags.None;
if (m_scene.RegionInfo.EstateSettings.FixedSun) if (m_scene.RegionInfo.EstateSettings.FixedSun)
flags |= Simulator.RegionFlags.SunFixed; flags |= RegionFlags.SunFixed;
if (m_scene.RegionInfo.EstateSettings.PublicAccess) if (m_scene.RegionInfo.EstateSettings.PublicAccess)
flags |= (Simulator.RegionFlags.PublicAllowed | flags |= (RegionFlags.PublicAllowed |
Simulator.RegionFlags.ExternallyVisible); RegionFlags.ExternallyVisible);
if (m_scene.RegionInfo.EstateSettings.AllowVoice) if (m_scene.RegionInfo.EstateSettings.AllowVoice)
flags |= Simulator.RegionFlags.AllowVoice; flags |= RegionFlags.AllowVoice;
if (m_scene.RegionInfo.EstateSettings.AllowDirectTeleport) if (m_scene.RegionInfo.EstateSettings.AllowDirectTeleport)
flags |= Simulator.RegionFlags.AllowDirectTeleport; flags |= RegionFlags.AllowDirectTeleport;
if (m_scene.RegionInfo.EstateSettings.DenyAnonymous) if (m_scene.RegionInfo.EstateSettings.DenyAnonymous)
flags |= Simulator.RegionFlags.DenyAnonymous; flags |= RegionFlags.DenyAnonymous;
if (m_scene.RegionInfo.EstateSettings.DenyIdentified) if (m_scene.RegionInfo.EstateSettings.DenyIdentified)
flags |= Simulator.RegionFlags.DenyIdentified; flags |= RegionFlags.DenyIdentified;
if (m_scene.RegionInfo.EstateSettings.DenyTransacted) if (m_scene.RegionInfo.EstateSettings.DenyTransacted)
flags |= Simulator.RegionFlags.DenyTransacted; flags |= RegionFlags.DenyTransacted;
if (m_scene.RegionInfo.EstateSettings.AbuseEmailToEstateOwner) if (m_scene.RegionInfo.EstateSettings.AbuseEmailToEstateOwner)
flags |= Simulator.RegionFlags.AbuseEmailToEstateOwner; flags |= RegionFlags.AbuseEmailToEstateOwner;
if (m_scene.RegionInfo.EstateSettings.BlockDwell) if (m_scene.RegionInfo.EstateSettings.BlockDwell)
flags |= Simulator.RegionFlags.BlockDwell; flags |= RegionFlags.BlockDwell;
if (m_scene.RegionInfo.EstateSettings.EstateSkipScripts) if (m_scene.RegionInfo.EstateSettings.EstateSkipScripts)
flags |= Simulator.RegionFlags.EstateSkipScripts; flags |= RegionFlags.EstateSkipScripts;
if (m_scene.RegionInfo.EstateSettings.ResetHomeOnTeleport) if (m_scene.RegionInfo.EstateSettings.ResetHomeOnTeleport)
flags |= Simulator.RegionFlags.ResetHomeOnTeleport; flags |= RegionFlags.ResetHomeOnTeleport;
if (m_scene.RegionInfo.EstateSettings.TaxFree) if (m_scene.RegionInfo.EstateSettings.TaxFree)
flags |= Simulator.RegionFlags.TaxFree; flags |= RegionFlags.TaxFree;
if (m_scene.RegionInfo.EstateSettings.DenyMinors) if (m_scene.RegionInfo.EstateSettings.DenyMinors)
flags |= (Simulator.RegionFlags)(1 << 30); flags |= (RegionFlags)(1 << 30);
return (uint)flags; return (uint)flags;
} }

View File

@ -263,12 +263,12 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{ {
if (checkBan.isBannedFromLand(avatar.AgentId)) if (checkBan.isBannedFromLand(avatar.AgentId))
{ {
checkBan.sendLandProperties(-30000, false, (int)ParcelManager.ParcelResult.Single, avatar); checkBan.sendLandProperties(-30000, false, (int)ParcelResult.Single, avatar);
return; //Only send one return; //Only send one
} }
if (checkBan.isRestrictedFromLand(avatar.AgentId)) if (checkBan.isRestrictedFromLand(avatar.AgentId))
{ {
checkBan.sendLandProperties(-40000, false, (int)ParcelManager.ParcelResult.Single, avatar); checkBan.sendLandProperties(-40000, false, (int)ParcelResult.Single, avatar);
return; //Only send one return; //Only send one
} }
} }

View File

@ -162,16 +162,16 @@ namespace OpenSim.Region.Environment.Modules.World.Land
public void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client) public void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client)
{ {
IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>(); IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>();
uint regionFlags = 336723974 & ~((uint)(Simulator.RegionFlags.AllowLandmark | Simulator.RegionFlags.AllowSetHome)); uint regionFlags = 336723974 & ~((uint)(RegionFlags.AllowLandmark | RegionFlags.AllowSetHome));
if (estateModule != null) if (estateModule != null)
regionFlags = estateModule.GetRegionFlags(); regionFlags = estateModule.GetRegionFlags();
// In a perfect world, this would have worked. // In a perfect world, this would have worked.
// //
// if ((landData.Flags & (uint)Parcel.ParcelFlags.AllowLandmark) != 0) // if ((landData.Flags & (uint)Parcel.ParcelFlags.AllowLandmark) != 0)
// regionFlags |= (uint)Simulator.RegionFlags.AllowLandmark; // regionFlags |= (uint)RegionFlags.AllowLandmark;
// if (landData.OwnerID == remote_client.AgentId) // if (landData.OwnerID == remote_client.AgentId)
// regionFlags |= (uint)Simulator.RegionFlags.AllowSetHome; // regionFlags |= (uint)RegionFlags.AllowSetHome;
remote_client.SendLandProperties(remote_client, sequence_id, remote_client.SendLandProperties(remote_client, sequence_id,
snap_selection, request_result, landData, snap_selection, request_result, landData,
(float)m_scene.RegionInfo.RegionSettings.ObjectBonus, (float)m_scene.RegionInfo.RegionSettings.ObjectBonus,
@ -252,7 +252,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{ {
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
entry.AgentID = avatar; entry.AgentID = avatar;
entry.Flags = ParcelManager.AccessList.Ban; entry.Flags = AccessList.Ban;
entry.Time = new DateTime(); entry.Time = new DateTime();
if (landData.ParcelAccessList.Contains(entry)) if (landData.ParcelAccessList.Contains(entry))
{ {
@ -269,7 +269,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{ {
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
entry.AgentID = avatar; entry.AgentID = avatar;
entry.Flags = ParcelManager.AccessList.Access; entry.Flags = AccessList.Access;
entry.Time = new DateTime(); entry.Time = new DateTime();
if (!landData.ParcelAccessList.Contains(entry)) if (!landData.ParcelAccessList.Contains(entry))
{ {
@ -322,7 +322,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
#region AccessList Functions #region AccessList Functions
public List<UUID> createAccessListArrayByFlag(ParcelManager.AccessList flag) public List<UUID> createAccessListArrayByFlag(AccessList flag)
{ {
List<UUID> list = new List<UUID>(); List<UUID> list = new List<UUID>();
foreach (ParcelManager.ParcelAccessEntry entry in landData.ParcelAccessList) foreach (ParcelManager.ParcelAccessEntry entry in landData.ParcelAccessList)
@ -344,16 +344,16 @@ namespace OpenSim.Region.Environment.Modules.World.Land
IClientAPI remote_client) IClientAPI remote_client)
{ {
if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both) if (flags == (uint) AccessList.Access || flags == (uint) AccessList.Both)
{ {
List<UUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Access); List<UUID> avatars = createAccessListArrayByFlag(AccessList.Access);
remote_client.SendLandAccessListData(avatars,(uint) ParcelManager.AccessList.Access,landData.LocalID); remote_client.SendLandAccessListData(avatars,(uint) AccessList.Access,landData.LocalID);
} }
if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both) if (flags == (uint) AccessList.Ban || flags == (uint) AccessList.Both)
{ {
List<UUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Ban); List<UUID> avatars = createAccessListArrayByFlag(AccessList.Ban);
remote_client.SendLandAccessListData(avatars, (uint)ParcelManager.AccessList.Ban, landData.LocalID); remote_client.SendLandAccessListData(avatars, (uint)AccessList.Ban, landData.LocalID);
} }
} }
@ -369,7 +369,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
List<ParcelManager.ParcelAccessEntry> toRemove = new List<ParcelManager.ParcelAccessEntry>(); List<ParcelManager.ParcelAccessEntry> toRemove = new List<ParcelManager.ParcelAccessEntry>();
foreach (ParcelManager.ParcelAccessEntry entry in newData.ParcelAccessList) foreach (ParcelManager.ParcelAccessEntry entry in newData.ParcelAccessList)
{ {
if (entry.Flags == (ParcelManager.AccessList) flags) if (entry.Flags == (AccessList) flags)
{ {
toRemove.Add(entry); toRemove.Add(entry);
} }
@ -384,7 +384,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
ParcelManager.ParcelAccessEntry temp = new ParcelManager.ParcelAccessEntry(); ParcelManager.ParcelAccessEntry temp = new ParcelManager.ParcelAccessEntry();
temp.AgentID = entry.AgentID; temp.AgentID = entry.AgentID;
temp.Time = new DateTime(); //Pointless? Yes. temp.Time = new DateTime(); //Pointless? Yes.
temp.Flags = (ParcelManager.AccessList) flags; temp.Flags = (AccessList) flags;
if (!newData.ParcelAccessList.Contains(temp)) if (!newData.ParcelAccessList.Contains(temp))
{ {

View File

@ -482,8 +482,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
{ {
} }
public virtual void SendWindData(float[] map) { } public virtual void SendWindData(Vector2[] windSpeeds) { }
public virtual void SendWindData(int p1x, int p1y, int p2x, int p2y, float[] map) { }
public virtual void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) public virtual void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look)
{ {

View File

@ -45,7 +45,7 @@ namespace OpenSim.Region.Environment.Modules
private Random rndnums = new Random(System.Environment.TickCount); private Random rndnums = new Random(System.Environment.TickCount);
private Scene m_scene = null; private Scene m_scene = null;
private bool ready = false; private bool ready = false;
private float[] windarr = new float[256*256]; private Vector2[] windSpeeds = new Vector2[16 * 16];
private Dictionary<UUID, ulong> m_rootAgents = new Dictionary<UUID, ulong>(); private Dictionary<UUID, ulong> m_rootAgents = new Dictionary<UUID, ulong>();
@ -54,7 +54,6 @@ namespace OpenSim.Region.Environment.Modules
public void Initialise(Scene scene, IConfigSource config) public void Initialise(Scene scene, IConfigSource config)
{ {
m_log.Debug("[WIND] Initializing"); m_log.Debug("[WIND] Initializing");
m_scene = scene; m_scene = scene;
@ -120,15 +119,13 @@ namespace OpenSim.Region.Environment.Modules
public void WindToClient(IClientAPI client) public void WindToClient(IClientAPI client)
{ {
if (ready) if (ready)
{ {
//if (!sunFixed) //if (!sunFixed)
//GenWindPos(); // Generate shared values once //GenWindPos(); // Generate shared values once
client.SendWindData(windarr); client.SendWindData(windSpeeds);
m_log.Debug("[WIND] Initial update for new client"); m_log.Debug("[WIND] Initial update for new client");
} }
} }
public void WindUpdate() public void WindUpdate()
@ -149,11 +146,7 @@ namespace OpenSim.Region.Environment.Modules
{ {
if (!avatar.IsChildAgent) if (!avatar.IsChildAgent)
{ {
avatar.ControllingClient.SendWindData(windSpeeds);
avatar.ControllingClient.SendWindData(
0,
0,0,1,
windarr);
} }
} }
@ -169,7 +162,7 @@ namespace OpenSim.Region.Environment.Modules
foreach (ScenePresence avatar in avatars) foreach (ScenePresence avatar in avatars)
{ {
if (!avatar.IsChildAgent) if (!avatar.IsChildAgent)
avatar.ControllingClient.SendWindData(windarr); avatar.ControllingClient.SendWindData(windSpeeds);
} }
// set estate settings for region access to sun position // set estate settings for region access to sun position
@ -182,35 +175,14 @@ namespace OpenSim.Region.Environment.Modules
private void GenWindPos() private void GenWindPos()
{ {
//windarr = new float[256*256]; for (int y = 0; y < 16; y++)
{
Array.Clear(windarr, 0, 256 * 256);
//float i = 0f;
//float i2 = 2f;
for (int x = 0; x < 16; x++) for (int x = 0; x < 16; x++)
{ {
for (int y = 0; y < 16; y++) windSpeeds[y * 16 + x].X = (float)(rndnums.NextDouble() * 2d - 1d);
{ windSpeeds[y * 16 + x].Y = (float)(rndnums.NextDouble() * 2d - 1d);
windarr[x * 256 + y] = (float)(rndnums.NextDouble() * 2d - 1d);
} }
} }
for (int x = 16; x < 32; x++)
{
for (int y = 0; y < 16; y++)
{
windarr[x * 256 + y] = (float)(rndnums.NextDouble() * 2d - 1d);
}
}
// m_log.Debug("[SUN] Velocity("+Velocity.X+","+Velocity.Y+","+Velocity.Z+")");
} }
private void ClientLoggedOut(UUID AgentId) private void ClientLoggedOut(UUID AgentId)

View File

@ -1494,7 +1494,7 @@ namespace OpenSim.Region.Environment.Scenes
protected internal void MakeObjectSearchable(IClientAPI remoteClient, bool IncludeInSearch, uint localID) protected internal void MakeObjectSearchable(IClientAPI remoteClient, bool IncludeInSearch, uint localID)
{ {
UUID user = remoteClient.AgentId; UUID user = remoteClient.AgentId;
UUID objid = null; UUID objid = UUID.Zero;
SceneObjectPart obj = null; SceneObjectPart obj = null;
List<EntityBase> EntityList = GetEntities(); List<EntityBase> EntityList = GetEntities();

View File

@ -1371,7 +1371,7 @@ namespace OpenSim.Region.Environment.Scenes
taskItem.Flags = itemBase.Flags; taskItem.Flags = itemBase.Flags;
taskItem.PermsGranter = UUID.Zero; taskItem.PermsGranter = UUID.Zero;
taskItem.PermsMask = 0; taskItem.PermsMask = 0;
taskItem.AssetID = asset.ID; taskItem.AssetID = asset.FullID;
part.AddInventoryItem(taskItem); part.AddInventoryItem(taskItem);
part.GetProperties(remoteClient); part.GetProperties(remoteClient);
@ -1616,7 +1616,7 @@ namespace OpenSim.Region.Environment.Scenes
// FIXME: This needs to be fixed. // FIXME: This needs to be fixed.
m_log.ErrorFormat( m_log.ErrorFormat(
"[AGENT INVENTORY]: Queued deletion of scene object to agent {0} {1} failed: {2}", "[AGENT INVENTORY]: Queued deletion of scene object to agent {0} {1} failed: {2}",
(x != null ? x.remoteClient.Name : "unavailable"), (x != null ? x.remoteClient.AgentId : "unavailable"), e.ToString()); (x != null ? x.remoteClient.Name : "unavailable"), (x != null ? x.remoteClient.AgentId.ToString() : "unavailable"), e.ToString());
} }
m_log.Info("No objects left in inventory delete queue."); m_log.Info("No objects left in inventory delete queue.");

View File

@ -915,7 +915,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
return part.UUID; return part.UUID;
} }
return null; return UUID.Zero;
} }
public void ObjectGrabHandler(uint localId, Vector3 offsetPos, IClientAPI remoteClient) public void ObjectGrabHandler(uint localId, Vector3 offsetPos, IClientAPI remoteClient)

View File

@ -396,8 +396,7 @@ namespace OpenSim.Region.Examples.SimpleModule
{ {
} }
public virtual void SendWindData(float[] map) { } public virtual void SendWindData(Vector2[] windSpeeds) { }
public virtual void SendWindData(int p1x, int p1y, int p2x, int p2y, float[] map) { }
public virtual void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) public virtual void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look)
{ {

View File

@ -269,7 +269,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (inv.Value.Type != type) if (inv.Value.Type != type)
return UUID.Zero; return UUID.Zero;
return inv.Value.AssetID.ToString(); return inv.Value.AssetID;
} }
} }
return UUID.Zero; return UUID.Zero;
@ -282,7 +282,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
if (inv.Value.Name == name) if (inv.Value.Name == name)
{ {
return inv.Value.AssetID.ToString(); return inv.Value.AssetID;
} }
} }
return UUID.Zero; return UUID.Zero;
@ -2766,7 +2766,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
if (m_host.ParentGroup.RootPart.IsAttachment && agent == m_host.ParentGroup.RootPart.AttachedAvatar) if (m_host.ParentGroup.RootPart.IsAttachment && (UUID)agent == m_host.ParentGroup.RootPart.AttachedAvatar)
{ {
// When attached, certain permissions are implicit if requested from owner // When attached, certain permissions are implicit if requested from owner
int implicitPerms = ScriptBaseClass.PERMISSION_TAKE_CONTROLS | int implicitPerms = ScriptBaseClass.PERMISSION_TAKE_CONTROLS |
@ -2919,7 +2919,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return; return;
} }
IClientAPI client = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter).ControllingClient; IClientAPI client = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter).ControllingClient;
SceneObjectPart targetPart = World.GetSceneObjectPart(target); SceneObjectPart targetPart = World.GetSceneObjectPart((UUID)target);
SceneObjectGroup parentPrim = null, childPrim = null; SceneObjectGroup parentPrim = null, childPrim = null;
if (targetPart != null) if (targetPart != null)
{ {
@ -3131,7 +3131,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (World.GetScenePresence(destId) != null) if (World.GetScenePresence(destId) != null)
{ {
// destination is an avatar // destination is an avatar
World.MoveTaskInventoryItem(destId, null, m_host, objId); World.MoveTaskInventoryItem(destId, UUID.Zero, m_host, objId);
} }
else else
{ {
@ -3180,11 +3180,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
UUID uuid = (UUID)id;
UserProfileData userProfile = UserProfileData userProfile =
World.CommsManager.UserService.GetUserProfile(id); World.CommsManager.UserService.GetUserProfile(uuid);
UserAgentData userAgent = UserAgentData userAgent =
World.CommsManager.UserService.GetAgentByUUID(id); World.CommsManager.UserService.GetAgentByUUID(uuid);
if (userProfile == null || userAgent == null) if (userProfile == null || userAgent == null)
return UUID.Zero.ToString(); return UUID.Zero.ToString();
@ -3503,7 +3505,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local) public void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
SceneObjectPart targ = World.GetSceneObjectPart(target); SceneObjectPart targ = World.GetSceneObjectPart((UUID)target);
if (targ == null) if (targ == null)
return; return;
targ.ApplyImpulse(new Vector3((float)impulse.x, (float)impulse.y, (float)impulse.z), local != 0); targ.ApplyImpulse(new Vector3((float)impulse.x, (float)impulse.y, (float)impulse.z), local != 0);
@ -4683,7 +4685,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Vector llGetAgentSize(string id) public LSL_Vector llGetAgentSize(string id)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
ScenePresence avatar = World.GetScenePresence(id); ScenePresence avatar = World.GetScenePresence((UUID)id);
LSL_Vector agentSize; LSL_Vector agentSize;
if (avatar == null) if (avatar == null)
{ {
@ -5164,7 +5166,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (UUID.TryParse(avatar, out key)) if (UUID.TryParse(avatar, out key))
{ {
entry.AgentID = key; entry.AgentID = key;
entry.Flags = ParcelManager.AccessList.Access; entry.Flags = AccessList.Access;
entry.Time = DateTime.Now.AddHours(hours); entry.Time = DateTime.Now.AddHours(hours);
land.ParcelAccessList.Add(entry); land.ParcelAccessList.Add(entry);
} }
@ -5365,7 +5367,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
xmlrpcMod.CloseXMLRPCChannel(channel); xmlrpcMod.CloseXMLRPCChannel((UUID)channel);
// ScriptSleep(1000); // ScriptSleep(1000);
} }
@ -6081,7 +6083,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
LSL_List l = new LSL_List(); LSL_List l = new LSL_List();
ScenePresence av = World.GetScenePresence(id); ScenePresence av = World.GetScenePresence((UUID)id);
if (av == null) if (av == null)
return l; return l;
UUID[] anims; UUID[] anims;
@ -7544,7 +7546,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (UUID.TryParse(avatar, out key)) if (UUID.TryParse(avatar, out key))
{ {
entry.AgentID = key; entry.AgentID = key;
entry.Flags = ParcelManager.AccessList.Ban; entry.Flags = AccessList.Ban;
entry.Time = DateTime.Now.AddHours(hours); entry.Time = DateTime.Now.AddHours(hours);
land.ParcelAccessList.Add(entry); land.ParcelAccessList.Add(entry);
} }
@ -7563,7 +7565,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
{ {
if (entry.AgentID == key && entry.Flags == ParcelManager.AccessList.Access) if (entry.AgentID == key && entry.Flags == AccessList.Access)
{ {
land.ParcelAccessList.Remove(entry); land.ParcelAccessList.Remove(entry);
break; break;
@ -7585,7 +7587,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
{ {
if (entry.AgentID == key && entry.Flags == ParcelManager.AccessList.Ban) if (entry.AgentID == key && entry.Flags == AccessList.Ban)
{ {
land.ParcelAccessList.Remove(entry); land.ParcelAccessList.Remove(entry);
break; break;
@ -7795,7 +7797,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
{ {
if (entry.Flags == ParcelManager.AccessList.Ban) if (entry.Flags == AccessList.Ban)
{ {
land.ParcelAccessList.Remove(entry); land.ParcelAccessList.Remove(entry);
} }
@ -7812,7 +7814,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
{ {
if (entry.Flags == ParcelManager.AccessList.Access) if (entry.Flags == AccessList.Access)
{ {
land.ParcelAccessList.Remove(entry); land.ParcelAccessList.Remove(entry);
} }

View File

@ -496,10 +496,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
CheckThreatLevel(ThreatLevel.VeryHigh, "osAvatarPlayAnimation"); CheckThreatLevel(ThreatLevel.VeryHigh, "osAvatarPlayAnimation");
UUID avatarID = (UUID)avatar;
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
if (World.Entities.ContainsKey(avatar) && World.Entities[avatar] is ScenePresence) if (World.Entities.ContainsKey((UUID)avatar) && World.Entities[avatarID] is ScenePresence)
{ {
ScenePresence target = (ScenePresence)World.Entities[avatar]; ScenePresence target = (ScenePresence)World.Entities[avatarID];
target.AddAnimation(animation); target.AddAnimation(animation);
} }
} }
@ -508,10 +510,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
CheckThreatLevel(ThreatLevel.VeryHigh, "osAvatarStopAnimation"); CheckThreatLevel(ThreatLevel.VeryHigh, "osAvatarStopAnimation");
UUID avatarID = (UUID)avatar;
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
if (World.Entities.ContainsKey(avatar) && World.Entities[avatar] is ScenePresence) if (World.Entities.ContainsKey(avatarID) && World.Entities[avatarID] is ScenePresence)
{ {
ScenePresence target = (ScenePresence)World.Entities[avatar]; ScenePresence target = (ScenePresence)World.Entities[avatarID];
target.RemoveAnimation(animation); target.RemoveAnimation(animation);
} }
} }

Binary file not shown.

Binary file not shown.