Compare commits
21 Commits
master
...
0.6.0-stab
Author | SHA1 | Date |
---|---|---|
lbsa71 | 8acb60df0d | |
MW | 9eced15408 | |
MW | 17673df6f7 | |
MW | 8c19809ed2 | |
MW | d19212c3e4 | |
MW | 648de85737 | |
MW | 58f3fa71c2 | |
MW | 66737b9c0c | |
MW | 4295c125aa | |
MW | a2c55d7fdb | |
MW | fdbe41926b | |
Justin Clarke Casey | f9530eb0c7 | |
MW | c3bb6643e8 | |
MW | af4ff8686b | |
MW | 9cf75f649d | |
MW | afc2ddaaec | |
MW | 335cffbfed | |
MW | 8f0bf406fb | |
lbsa71 | f888656bca | |
lbsa71 | e762d9b612 | |
Charles Krinke | fbafaab342 |
|
@ -54,6 +54,7 @@ Patches
|
||||||
* jhurliman
|
* jhurliman
|
||||||
* jimbo2120 (IBM)
|
* jimbo2120 (IBM)
|
||||||
* John R Sohn (XenReborn)
|
* John R Sohn (XenReborn)
|
||||||
|
* jonc
|
||||||
* Junta Kohime
|
* Junta Kohime
|
||||||
* Kayne
|
* Kayne
|
||||||
* Kevin Cozens
|
* Kevin Cozens
|
||||||
|
@ -63,6 +64,7 @@ Patches
|
||||||
* M.Igarashi
|
* M.Igarashi
|
||||||
* Mic Bowman
|
* Mic Bowman
|
||||||
* mikkopa/_someone - RealXtend
|
* mikkopa/_someone - RealXtend
|
||||||
|
* Mircea Kitsune
|
||||||
* nlin
|
* nlin
|
||||||
* nornalbion
|
* nornalbion
|
||||||
* openlifegrid.com
|
* openlifegrid.com
|
||||||
|
@ -79,7 +81,6 @@ Patches
|
||||||
* Y. Nitta
|
* Y. Nitta
|
||||||
* YZh
|
* YZh
|
||||||
* Zha Ewry
|
* Zha Ewry
|
||||||
* Mircea Kitsune
|
|
||||||
|
|
||||||
|
|
||||||
LSL Devs
|
LSL Devs
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
BEGIN TRANSACTION
|
||||||
|
|
||||||
|
ALTER TABLE dbo.estate_managers DROP CONSTRAINT PK_estate_managers
|
||||||
|
|
||||||
|
CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers
|
||||||
|
(
|
||||||
|
EstateID
|
||||||
|
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||||
|
|
||||||
|
ALTER TABLE dbo.estate_groups DROP CONSTRAINT PK_estate_groups
|
||||||
|
|
||||||
|
CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups
|
||||||
|
(
|
||||||
|
EstateID
|
||||||
|
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE dbo.estate_users DROP CONSTRAINT PK_estate_users
|
||||||
|
|
||||||
|
CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users
|
||||||
|
(
|
||||||
|
EstateID
|
||||||
|
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||||
|
|
||||||
|
COMMIT
|
|
@ -0,0 +1,25 @@
|
||||||
|
BEGIN TRANSACTION
|
||||||
|
|
||||||
|
CREATE TABLE dbo.Tmp_estateban
|
||||||
|
(
|
||||||
|
EstateID int NOT NULL,
|
||||||
|
bannedUUID varchar(36) NOT NULL,
|
||||||
|
bannedIp varchar(16) NULL,
|
||||||
|
bannedIpHostMask varchar(16) NULL,
|
||||||
|
bannedNameMask varchar(64) NULL
|
||||||
|
) ON [PRIMARY]
|
||||||
|
|
||||||
|
IF EXISTS(SELECT * FROM dbo.estateban)
|
||||||
|
EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask)
|
||||||
|
SELECT EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban')
|
||||||
|
|
||||||
|
DROP TABLE dbo.estateban
|
||||||
|
|
||||||
|
EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT'
|
||||||
|
|
||||||
|
CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban
|
||||||
|
(
|
||||||
|
EstateID
|
||||||
|
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||||
|
|
||||||
|
COMMIT
|
|
@ -142,7 +142,12 @@ namespace OpenSim.Data.MySQL
|
||||||
MySqlDataReader reader = result.ExecuteReader();
|
MySqlDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
items.Add(readInventoryItem(reader));
|
{
|
||||||
|
// A null item (because something went wrong) breaks everything in the folder
|
||||||
|
InventoryItemBase item = readInventoryItem(reader);
|
||||||
|
if (item != null)
|
||||||
|
items.Add(item);
|
||||||
|
}
|
||||||
|
|
||||||
reader.Close();
|
reader.Close();
|
||||||
result.Dispose();
|
result.Dispose();
|
||||||
|
@ -301,24 +306,36 @@ namespace OpenSim.Data.MySQL
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
InventoryItemBase item = new InventoryItemBase();
|
InventoryItemBase item = new InventoryItemBase();
|
||||||
|
// Be a bit safer in parsing these because the
|
||||||
|
// database doesn't enforce them to be not null, and
|
||||||
|
// the inventory still works if these are weird in the
|
||||||
|
// db
|
||||||
|
|
||||||
|
UUID Owner = UUID.Zero;
|
||||||
|
UUID Creator = UUID.Zero;
|
||||||
|
UUID GroupID = UUID.Zero;
|
||||||
|
UUID.TryParse((string)reader["avatarID"], out Owner);
|
||||||
|
UUID.TryParse((string)reader["creatorID"], out Creator);
|
||||||
|
UUID.TryParse((string)reader["groupID"], out GroupID);
|
||||||
|
item.Owner = Owner;
|
||||||
|
item.Creator = Creator;
|
||||||
|
item.GroupID = GroupID;
|
||||||
|
|
||||||
|
// Rest of the parsing. If these UUID's fail, we're dead anyway
|
||||||
item.ID = new UUID((string) reader["inventoryID"]);
|
item.ID = new UUID((string) reader["inventoryID"]);
|
||||||
item.AssetID = new UUID((string) reader["assetID"]);
|
item.AssetID = new UUID((string) reader["assetID"]);
|
||||||
item.AssetType = (int) reader["assetType"];
|
item.AssetType = (int) reader["assetType"];
|
||||||
item.Folder = new UUID((string) reader["parentFolderID"]);
|
item.Folder = new UUID((string) reader["parentFolderID"]);
|
||||||
item.Owner = new UUID((string) reader["avatarID"]);
|
|
||||||
item.Name = (string) reader["inventoryName"];
|
item.Name = (string) reader["inventoryName"];
|
||||||
item.Description = (string) reader["inventoryDescription"];
|
item.Description = (string) reader["inventoryDescription"];
|
||||||
item.NextPermissions = (uint) reader["inventoryNextPermissions"];
|
item.NextPermissions = (uint) reader["inventoryNextPermissions"];
|
||||||
item.CurrentPermissions = (uint) reader["inventoryCurrentPermissions"];
|
item.CurrentPermissions = (uint) reader["inventoryCurrentPermissions"];
|
||||||
item.InvType = (int) reader["invType"];
|
item.InvType = (int) reader["invType"];
|
||||||
item.Creator = new UUID((string) reader["creatorID"]);
|
|
||||||
item.BasePermissions = (uint) reader["inventoryBasePermissions"];
|
item.BasePermissions = (uint) reader["inventoryBasePermissions"];
|
||||||
item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"];
|
item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"];
|
||||||
item.SalePrice = (int) reader["salePrice"];
|
item.SalePrice = (int) reader["salePrice"];
|
||||||
item.SaleType = Convert.ToByte(reader["saleType"]);
|
item.SaleType = Convert.ToByte(reader["saleType"]);
|
||||||
item.CreationDate = (int) reader["creationDate"];
|
item.CreationDate = (int) reader["creationDate"];
|
||||||
item.GroupID = new UUID(reader["groupID"].ToString());
|
|
||||||
item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]);
|
item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]);
|
||||||
item.Flags = (uint) reader["flags"];
|
item.Flags = (uint) reader["flags"];
|
||||||
|
|
||||||
|
@ -814,8 +831,11 @@ namespace OpenSim.Data.MySQL
|
||||||
|
|
||||||
List<InventoryItemBase> list = new List<InventoryItemBase>();
|
List<InventoryItemBase> list = new List<InventoryItemBase>();
|
||||||
while (result.Read())
|
while (result.Read())
|
||||||
list.Add(readInventoryItem(result));
|
{
|
||||||
|
InventoryItemBase item = readInventoryItem(result);
|
||||||
|
if (item != null)
|
||||||
|
list.Add(item);
|
||||||
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -231,6 +231,7 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
|
|
||||||
protected float m_avatarHeight = 0;
|
protected float m_avatarHeight = 0;
|
||||||
|
protected float m_hipOffset = 0;
|
||||||
|
|
||||||
public virtual float AvatarHeight
|
public virtual float AvatarHeight
|
||||||
{
|
{
|
||||||
|
@ -238,6 +239,11 @@ namespace OpenSim.Framework
|
||||||
set { m_avatarHeight = value; }
|
set { m_avatarHeight = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual float HipOffset
|
||||||
|
{
|
||||||
|
get { return m_hipOffset; }
|
||||||
|
}
|
||||||
|
|
||||||
public AvatarAppearance()
|
public AvatarAppearance()
|
||||||
{
|
{
|
||||||
m_wearables = new AvatarWearable[MAX_WEARABLES];
|
m_wearables = new AvatarWearable[MAX_WEARABLES];
|
||||||
|
@ -271,22 +277,20 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
Primitive.TextureEntry textureEnt = new Primitive.TextureEntry(texture, 0, texture.Length);
|
Primitive.TextureEntry textureEnt = new Primitive.TextureEntry(texture, 0, texture.Length);
|
||||||
m_texture = textureEnt;
|
m_texture = textureEnt;
|
||||||
|
|
||||||
// m_log.DebugFormat("[APPEARANCE]: Setting an avatar appearance with {0} faces", m_texture.FaceTextures.Length);
|
|
||||||
// for (int i = 0; i < m_texture.FaceTextures.Length; i++)
|
|
||||||
// {
|
|
||||||
// Primitive.TextureEntryFace face = m_texture.FaceTextures[i];
|
|
||||||
// String textureIdString = (face != null ? face.TextureID.ToString() : "none");
|
|
||||||
// m_log.DebugFormat("[APPEARANCE]: Texture {0} is {1}", i, textureIdString);
|
|
||||||
// }
|
|
||||||
|
|
||||||
m_visualparams = visualParam.ToArray();
|
m_visualparams = visualParam.ToArray();
|
||||||
|
m_avatarHeight = 1.23077f // Shortest possible avatar height
|
||||||
// Teravus : Nifty AV Height Getting Maaaaagical formula. Oh how we love turning 0-255 into meters.
|
+ 0.516945f * (float)m_visualparams[25] / 255.0f // Body height
|
||||||
// (float)m_visualParams[25] = Height
|
+ 0.072514f * (float)m_visualparams[120] / 255.0f // Head size
|
||||||
// (float)m_visualParams[125] = LegLength
|
+ 0.3836f * (float)m_visualparams[125] / 255.0f // Leg length
|
||||||
m_avatarHeight = (1.50856f + (((float) m_visualparams[25]/255.0f)*(2.525506f - 1.50856f)))
|
+ 0.08f * (float)m_visualparams[77] / 255.0f // Shoe heel height
|
||||||
+ (((float) m_visualparams[125]/255.0f)/1.5f);
|
+ 0.07f * (float)m_visualparams[78] / 255.0f // Shoe platform height
|
||||||
|
+ 0.076f * (float)m_visualparams[148] / 255.0f; // Neck length
|
||||||
|
m_hipOffset = (0.615385f // Half of avatar
|
||||||
|
+ 0.08f * (float)m_visualparams[77] / 255.0f // Shoe heel height
|
||||||
|
+ 0.07f * (float)m_visualparams[78] / 255.0f // Shoe platform height
|
||||||
|
+ 0.3836f * (float)m_visualparams[125] / 255.0f // Leg length
|
||||||
|
- m_avatarHeight / 2) * 0.3f - 0.04f;
|
||||||
|
System.Console.WriteLine("Height {0} Hip offset {1}", m_avatarHeight, m_hipOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void SetWearable(int wearableId, AvatarWearable wearable)
|
public virtual void SetWearable(int wearableId, AvatarWearable wearable)
|
||||||
|
|
|
@ -330,10 +330,11 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a folder in this agent's inventory.
|
/// Create a folder in this agent's inventory.
|
||||||
|
/// </summary>
|
||||||
///
|
///
|
||||||
/// If the inventory service has not yet delievered the inventory
|
/// If the inventory service has not yet delievered the inventory
|
||||||
/// for this user then the request will be queued.
|
/// for this user then the request will be queued.
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="parentID"></param>
|
/// <param name="parentID"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool CreateFolder(string folderName, UUID folderID, ushort folderType, UUID parentID)
|
public bool CreateFolder(string folderName, UUID folderID, ushort folderType, UUID parentID)
|
||||||
|
|
|
@ -224,11 +224,12 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handle a client request to update the inventory folder
|
/// Handle a client request to update the inventory folder
|
||||||
|
/// </summary>
|
||||||
///
|
///
|
||||||
/// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE
|
/// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE
|
||||||
/// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing,
|
/// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing,
|
||||||
/// and needs to be changed.
|
/// and needs to be changed.
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="remoteClient"></param>
|
/// <param name="remoteClient"></param>
|
||||||
/// <param name="folderID"></param>
|
/// <param name="folderID"></param>
|
||||||
/// <param name="type"></param>
|
/// <param name="type"></param>
|
||||||
|
|
|
@ -45,6 +45,7 @@ namespace OpenSim.Framework
|
||||||
public interface IScene
|
public interface IScene
|
||||||
{
|
{
|
||||||
RegionInfo RegionInfo { get; }
|
RegionInfo RegionInfo { get; }
|
||||||
|
uint NextAvatarLocalId { get; }
|
||||||
RegionStatus Region_Status { get; set; }
|
RegionStatus Region_Status { get; set; }
|
||||||
|
|
||||||
ClientManager ClientManager { get; }
|
ClientManager ClientManager { get; }
|
||||||
|
|
|
@ -470,6 +470,11 @@ namespace OpenSim.Framework.Servers
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw {0}", e);
|
m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw {0}", e);
|
||||||
}
|
}
|
||||||
|
catch (InvalidOperationException e)
|
||||||
|
{
|
||||||
|
m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw {0}", e);
|
||||||
|
SendHTML500(response);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool TryGetStreamHandler(string handlerKey, out IRequestHandler streamHandler)
|
private bool TryGetStreamHandler(string handlerKey, out IRequestHandler streamHandler)
|
||||||
|
|
|
@ -103,7 +103,7 @@ namespace OpenSim.Framework.Servers
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Should be overriden and referenced by descendents if they need to perform extra shutdown processing
|
/// Should be overriden and referenced by descendents if they need to perform extra shutdown processing
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual void ShutdownSpecific() {}
|
public virtual void ShutdownSpecific() {}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Print statistics to the logfile, if they are active
|
/// Print statistics to the logfile, if they are active
|
||||||
|
@ -373,7 +373,7 @@ namespace OpenSim.Framework.Servers
|
||||||
/// That is something that cannot be determined within this class. So
|
/// That is something that cannot be determined within this class. So
|
||||||
/// all attempts to use the console MUST be verified.
|
/// all attempts to use the console MUST be verified.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void Notice(string msg)
|
protected void Notice(string msg)
|
||||||
{
|
{
|
||||||
if (m_console != null)
|
if (m_console != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -195,7 +195,7 @@ namespace OpenSim.Grid.GridServer
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void ShutdownSpecific()
|
public override void ShutdownSpecific()
|
||||||
{
|
{
|
||||||
foreach (IGridPlugin plugin in m_plugins) plugin.Dispose();
|
foreach (IGridPlugin plugin in m_plugins) plugin.Dispose();
|
||||||
}
|
}
|
||||||
|
|
|
@ -209,6 +209,23 @@ namespace OpenSim.Grid.InventoryServer
|
||||||
return invCollection;
|
return invCollection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<InventoryItemBase> GetFolderItems(Guid folderID)
|
||||||
|
{
|
||||||
|
List<InventoryItemBase> allItems = new List<InventoryItemBase>();
|
||||||
|
|
||||||
|
|
||||||
|
List<InventoryItemBase> items = RequestFolderItems(new UUID(folderID));
|
||||||
|
|
||||||
|
if (items != null)
|
||||||
|
{
|
||||||
|
allItems.InsertRange(0, items);
|
||||||
|
}
|
||||||
|
m_log.InfoFormat(
|
||||||
|
"[GRID AGENT INVENTORY]: Sending back inventory response containing {0} items", allItems.Count.ToString());
|
||||||
|
return allItems;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Guid to UUID wrapper for same name IInventoryServices method
|
/// Guid to UUID wrapper for same name IInventoryServices method
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -105,10 +105,18 @@ namespace OpenSim.Grid.InventoryServer
|
||||||
new RestDeserialiseSecureHandler<InventoryFolderBase, bool>(
|
new RestDeserialiseSecureHandler<InventoryFolderBase, bool>(
|
||||||
"POST", "/PurgeFolder/", m_inventoryService.PurgeFolder, m_inventoryService.CheckAuthSession));
|
"POST", "/PurgeFolder/", m_inventoryService.PurgeFolder, m_inventoryService.CheckAuthSession));
|
||||||
|
|
||||||
|
m_httpServer.AddStreamHandler(
|
||||||
|
new RestDeserialiseTrustedHandler<Guid, List<InventoryItemBase>>(
|
||||||
|
"POST", "/GetItems/", m_inventoryService.GetFolderItems, m_inventoryService.CheckTrustSource));
|
||||||
|
|
||||||
m_httpServer.AddStreamHandler(
|
m_httpServer.AddStreamHandler(
|
||||||
new RestDeserialiseSecureHandler<InventoryItemBase, bool>(
|
new RestDeserialiseSecureHandler<InventoryItemBase, bool>(
|
||||||
"POST", "/NewItem/", m_inventoryService.AddItem, m_inventoryService.CheckAuthSession));
|
"POST", "/NewItem/", m_inventoryService.AddItem, m_inventoryService.CheckAuthSession));
|
||||||
|
|
||||||
|
m_httpServer.AddStreamHandler(
|
||||||
|
new RestDeserialiseTrustedHandler<InventoryItemBase, bool>(
|
||||||
|
"POST", "/AddNewItem/", m_inventoryService.AddItem, m_inventoryService.CheckTrustSource));
|
||||||
|
|
||||||
m_httpServer.AddStreamHandler(
|
m_httpServer.AddStreamHandler(
|
||||||
new RestDeserialiseSecureHandler<InventoryItemBase, bool>(
|
new RestDeserialiseSecureHandler<InventoryItemBase, bool>(
|
||||||
"POST", "/DeleteItem/", m_inventoryService.DeleteItem, m_inventoryService.CheckAuthSession));
|
"POST", "/DeleteItem/", m_inventoryService.DeleteItem, m_inventoryService.CheckAuthSession));
|
||||||
|
|
|
@ -62,7 +62,7 @@ namespace OpenSim.Grid.MessagingServer
|
||||||
messageserver.Work();
|
messageserver.Work();
|
||||||
}
|
}
|
||||||
|
|
||||||
private OpenMessage_Main()
|
public OpenMessage_Main()
|
||||||
{
|
{
|
||||||
m_console = new ConsoleBase("Messaging", this);
|
m_console = new ConsoleBase("Messaging", this);
|
||||||
MainConsole.Instance = m_console;
|
MainConsole.Instance = m_console;
|
||||||
|
@ -174,7 +174,7 @@ namespace OpenSim.Grid.MessagingServer
|
||||||
m_console.Notice("register - (Re-)registers with user-server. This might be necessary if the userserver crashed/restarted");
|
m_console.Notice("register - (Re-)registers with user-server. This might be necessary if the userserver crashed/restarted");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void ShutdownSpecific()
|
public override void ShutdownSpecific()
|
||||||
{
|
{
|
||||||
msgsvc.deregisterWithUserServer();
|
msgsvc.deregisterWithUserServer();
|
||||||
}
|
}
|
||||||
|
|
|
@ -393,7 +393,7 @@ namespace OpenSim.Grid.UserServer
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void ShutdownSpecific()
|
public override void ShutdownSpecific()
|
||||||
{
|
{
|
||||||
m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation;
|
m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,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;
|
||||||
using OpenSim.Region.Environment.Modules.Avatar.Inventory.Archiver;
|
using OpenSim.Region.Environment.Modules.Avatar.Inventory.Archiver;
|
||||||
using Timer=System.Timers.Timer;
|
using Timer = System.Timers.Timer;
|
||||||
|
|
||||||
namespace OpenSim
|
namespace OpenSim
|
||||||
{
|
{
|
||||||
|
@ -63,7 +63,8 @@ namespace OpenSim
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static List<ConsolePluginCommand> m_PluginCommandInfos = new List<ConsolePluginCommand>();
|
private static List<ConsolePluginCommand> m_PluginCommandInfos = new List<ConsolePluginCommand>();
|
||||||
|
|
||||||
public OpenSim(IConfigSource configSource) : base(configSource)
|
public OpenSim(IConfigSource configSource)
|
||||||
|
: base(configSource)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +99,7 @@ namespace OpenSim
|
||||||
base.StartupSpecific();
|
base.StartupSpecific();
|
||||||
|
|
||||||
//Run Startup Commands
|
//Run Startup Commands
|
||||||
if (String.IsNullOrEmpty( m_startupCommandsFile ))
|
if (String.IsNullOrEmpty(m_startupCommandsFile))
|
||||||
{
|
{
|
||||||
m_log.Info("[STARTUP]: No startup command script specified. Moving on...");
|
m_log.Info("[STARTUP]: No startup command script specified. Moving on...");
|
||||||
}
|
}
|
||||||
|
@ -121,7 +122,7 @@ namespace OpenSim
|
||||||
RegisterCmd("kickuser", KickUserCommand, "kickuser [first] [last] - attempts to log off a user from any region we are serving");
|
RegisterCmd("kickuser", KickUserCommand, "kickuser [first] [last] - attempts to log off a user from any region we are serving");
|
||||||
|
|
||||||
// For now, start at the 'root' level by default
|
// For now, start at the 'root' level by default
|
||||||
ChangeSelectedRegion(new string[] {"root"});
|
ChangeSelectedRegion(new string[] { "root" });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RunAutoTimerScript(object sender, EventArgs e)
|
private void RunAutoTimerScript(object sender, EventArgs e)
|
||||||
|
@ -138,7 +139,7 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
for (int i = 0; i < cmdparams.Length; i++)
|
for (int i = 0; i < cmdparams.Length; i++)
|
||||||
{
|
{
|
||||||
m_log.Info("[EchoTest]: <arg" + i + ">"+cmdparams[i]+"</arg" + i + ">");
|
m_log.Info("[EchoTest]: <arg" + i + ">" + cmdparams[i] + "</arg" + i + ">");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,7 +217,7 @@ namespace OpenSim
|
||||||
public override void RunCmd(string command, string[] cmdparams)
|
public override void RunCmd(string command, string[] cmdparams)
|
||||||
{
|
{
|
||||||
base.RunCmd(command, cmdparams);
|
base.RunCmd(command, cmdparams);
|
||||||
RunPluginCommands(command , cmdparams);
|
RunPluginCommands(command, cmdparams);
|
||||||
|
|
||||||
switch (command)
|
switch (command)
|
||||||
{
|
{
|
||||||
|
@ -373,9 +374,9 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// IConfig c = DefaultConfig().Configs[cmdparams[1]];
|
// IConfig c = DefaultConfig().Configs[cmdparams[1]];
|
||||||
// if (c == null)
|
// if (c == null)
|
||||||
// c = DefaultConfig().AddConfig(cmdparams[1]);
|
// c = DefaultConfig().AddConfig(cmdparams[1]);
|
||||||
IConfig c;
|
IConfig c;
|
||||||
IConfigSource source = new IniConfigSource();
|
IConfigSource source = new IniConfigSource();
|
||||||
c = source.AddConfig(cmdparams[1]);
|
c = source.AddConfig(cmdparams[1]);
|
||||||
|
@ -728,9 +729,49 @@ namespace OpenSim
|
||||||
scene.RegionInfo.RegionLocY + " , Region Port: " + scene.RegionInfo.InternalEndPoint.Port.ToString());
|
scene.RegionInfo.RegionLocY + " , Region Port: " + scene.RegionInfo.InternalEndPoint.Port.ToString());
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case "queues":
|
||||||
|
Notice(GetQueuesReport());
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetQueuesReport()
|
||||||
|
{
|
||||||
|
string report = String.Empty;
|
||||||
|
|
||||||
|
m_sceneManager.ForEachScene(delegate(Scene scene)
|
||||||
|
{
|
||||||
|
scene.ForEachClient(delegate(IClientAPI client)
|
||||||
|
{
|
||||||
|
if (client is IStatsCollector)
|
||||||
|
{
|
||||||
|
report = report + client.FirstName +
|
||||||
|
" " + client.LastName + "\n";
|
||||||
|
|
||||||
|
IStatsCollector stats =
|
||||||
|
(IStatsCollector)client;
|
||||||
|
|
||||||
|
report = report + string.Format("{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}\n",
|
||||||
|
"Send",
|
||||||
|
"In",
|
||||||
|
"Out",
|
||||||
|
"Resend",
|
||||||
|
"Land",
|
||||||
|
"Wind",
|
||||||
|
"Cloud",
|
||||||
|
"Task",
|
||||||
|
"Texture",
|
||||||
|
"Asset");
|
||||||
|
report = report + stats.Report() +
|
||||||
|
"\n\n";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return report;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a new user
|
/// Create a new user
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -747,19 +788,19 @@ namespace OpenSim
|
||||||
firstName = MainConsole.Instance.CmdPrompt("First name", "Default");
|
firstName = MainConsole.Instance.CmdPrompt("First name", "Default");
|
||||||
else firstName = cmdparams[1];
|
else firstName = cmdparams[1];
|
||||||
|
|
||||||
if ( cmdparams.Length < 3 )
|
if (cmdparams.Length < 3)
|
||||||
lastName = MainConsole.Instance.CmdPrompt("Last name", "User");
|
lastName = MainConsole.Instance.CmdPrompt("Last name", "User");
|
||||||
else lastName = cmdparams[2];
|
else lastName = cmdparams[2];
|
||||||
|
|
||||||
if ( cmdparams.Length < 4 )
|
if (cmdparams.Length < 4)
|
||||||
password = MainConsole.Instance.PasswdPrompt("Password");
|
password = MainConsole.Instance.PasswdPrompt("Password");
|
||||||
else password = cmdparams[3];
|
else password = cmdparams[3];
|
||||||
|
|
||||||
if ( cmdparams.Length < 5 )
|
if (cmdparams.Length < 5)
|
||||||
regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", regX.ToString()));
|
regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", regX.ToString()));
|
||||||
else regX = Convert.ToUInt32(cmdparams[4]);
|
else regX = Convert.ToUInt32(cmdparams[4]);
|
||||||
|
|
||||||
if ( cmdparams.Length < 6 )
|
if (cmdparams.Length < 6)
|
||||||
regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString()));
|
regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString()));
|
||||||
else regY = Convert.ToUInt32(cmdparams[5]);
|
else regY = Convert.ToUInt32(cmdparams[5]);
|
||||||
|
|
||||||
|
@ -787,11 +828,11 @@ namespace OpenSim
|
||||||
firstName = MainConsole.Instance.CmdPrompt("First name");
|
firstName = MainConsole.Instance.CmdPrompt("First name");
|
||||||
else firstName = cmdparams[2];
|
else firstName = cmdparams[2];
|
||||||
|
|
||||||
if ( cmdparams.Length < 4 )
|
if (cmdparams.Length < 4)
|
||||||
lastName = MainConsole.Instance.CmdPrompt("Last name");
|
lastName = MainConsole.Instance.CmdPrompt("Last name");
|
||||||
else lastName = cmdparams[3];
|
else lastName = cmdparams[3];
|
||||||
|
|
||||||
if ( cmdparams.Length < 5 )
|
if (cmdparams.Length < 5)
|
||||||
newPassword = MainConsole.Instance.PasswdPrompt("New password");
|
newPassword = MainConsole.Instance.PasswdPrompt("New password");
|
||||||
else newPassword = cmdparams[4];
|
else newPassword = cmdparams[4];
|
||||||
|
|
||||||
|
@ -828,14 +869,14 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
if (cmdparams.Length > 2)
|
if (cmdparams.Length > 2)
|
||||||
{
|
{
|
||||||
loadOffset.X = (float) Convert.ToDecimal(cmdparams[2]);
|
loadOffset.X = (float)Convert.ToDecimal(cmdparams[2]);
|
||||||
if (cmdparams.Length > 3)
|
if (cmdparams.Length > 3)
|
||||||
{
|
{
|
||||||
loadOffset.Y = (float) Convert.ToDecimal(cmdparams[3]);
|
loadOffset.Y = (float)Convert.ToDecimal(cmdparams[3]);
|
||||||
}
|
}
|
||||||
if (cmdparams.Length > 4)
|
if (cmdparams.Length > 4)
|
||||||
{
|
{
|
||||||
loadOffset.Z = (float) Convert.ToDecimal(cmdparams[4]);
|
loadOffset.Z = (float)Convert.ToDecimal(cmdparams[4]);
|
||||||
}
|
}
|
||||||
m_console.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," +
|
m_console.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," +
|
||||||
loadOffset.Z + ">");
|
loadOffset.Z + ">");
|
||||||
|
@ -947,7 +988,7 @@ namespace OpenSim
|
||||||
string savePath = (cmdparams.Length > 3 ? cmdparams[3] : DEFAULT_INV_BACKUP_FILENAME);
|
string savePath = (cmdparams.Length > 3 ? cmdparams[3] : DEFAULT_INV_BACKUP_FILENAME);
|
||||||
|
|
||||||
new InventoryArchiveWriteRequest(
|
new InventoryArchiveWriteRequest(
|
||||||
m_sceneManager.CurrentOrFirstScene,m_commsManager).execute(
|
m_sceneManager.CurrentOrFirstScene, m_commsManager).execute(
|
||||||
firstName, lastName, invPath, savePath);
|
firstName, lastName, invPath, savePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -971,7 +1012,7 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
ConsolePluginCommand bestMatch = null;
|
ConsolePluginCommand bestMatch = null;
|
||||||
int bestLength = 0;
|
int bestLength = 0;
|
||||||
String cmdWithParams = cmd + " " + String.Join(" ",withParams);
|
String cmdWithParams = cmd + " " + String.Join(" ", withParams);
|
||||||
foreach (ConsolePluginCommand cmdinfo in m_PluginCommandInfos)
|
foreach (ConsolePluginCommand cmdinfo in m_PluginCommandInfos)
|
||||||
{
|
{
|
||||||
int matchLen = cmdinfo.matchLength(cmdWithParams);
|
int matchLen = cmdinfo.matchLength(cmdWithParams);
|
||||||
|
@ -982,7 +1023,7 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (bestMatch == null) return false;
|
if (bestMatch == null) return false;
|
||||||
bestMatch.Run(cmd,withParams);//.Substring(bestLength));
|
bestMatch.Run(cmd, withParams);//.Substring(bestLength));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -542,7 +542,7 @@ namespace OpenSim
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Performs any last-minute sanity checking and shuts down the region server
|
/// Performs any last-minute sanity checking and shuts down the region server
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected override void ShutdownSpecific()
|
public override void ShutdownSpecific()
|
||||||
{
|
{
|
||||||
if (proxyUrl.Length > 0)
|
if (proxyUrl.Length > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,7 +51,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// Handles new client connections
|
/// Handles new client connections
|
||||||
/// Constructor takes a single Packet and authenticates everything
|
/// Constructor takes a single Packet and authenticates everything
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class LLClientView : IClientAPI
|
public class LLClientView : IClientAPI, IStatsCollector
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
protected UUID m_activeGroupID = UUID.Zero;
|
protected UUID m_activeGroupID = UUID.Zero;
|
||||||
protected string m_activeGroupName = String.Empty;
|
protected string m_activeGroupName = String.Empty;
|
||||||
protected ulong m_activeGroupPowers;
|
protected ulong m_activeGroupPowers;
|
||||||
protected Dictionary<UUID,ulong> m_groupPowers = new Dictionary<UUID, ulong>();
|
protected Dictionary<UUID, ulong> m_groupPowers = new Dictionary<UUID, ulong>();
|
||||||
|
|
||||||
/* Instantiated Designated Event Delegates */
|
/* Instantiated Designated Event Delegates */
|
||||||
//- used so we don't create new objects for each incoming packet and then toss it out later */
|
//- used so we don't create new objects for each incoming packet and then toss it out later */
|
||||||
|
@ -2224,9 +2224,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
awb.ItemID = wearables[i].ItemID;
|
awb.ItemID = wearables[i].ItemID;
|
||||||
aw.WearableData[i] = awb;
|
aw.WearableData[i] = awb;
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}",
|
// "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}",
|
||||||
// awb.ItemID, awb.AssetID, i, Name);
|
// awb.ItemID, awb.AssetID, i, Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
OutPacket(aw, ThrottleOutPacketType.Task);
|
OutPacket(aw, ThrottleOutPacketType.Task);
|
||||||
|
@ -2732,7 +2732,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public void SendBannedUserList(UUID invoice, EstateBan[] bl, uint estateID)
|
public void SendBannedUserList(UUID invoice, EstateBan[] bl, uint estateID)
|
||||||
{
|
{
|
||||||
List<UUID>BannedUsers = new List<UUID>();
|
List<UUID> BannedUsers = new List<UUID>();
|
||||||
|
|
||||||
for (int i = 0; i < bl.Length; i++)
|
for (int i = 0; i < bl.Length; i++)
|
||||||
{
|
{
|
||||||
|
@ -3475,7 +3475,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public bool HandleGenericMessage(IClientAPI sender, Packet pack)
|
public bool HandleGenericMessage(IClientAPI sender, Packet pack)
|
||||||
{
|
{
|
||||||
GenericMessagePacket gmpack = (GenericMessagePacket) pack;
|
GenericMessagePacket gmpack = (GenericMessagePacket)pack;
|
||||||
handlerGenericMessage = OnGenericMessage;
|
handlerGenericMessage = OnGenericMessage;
|
||||||
|
|
||||||
List<string> msg = new List<string>();
|
List<string> msg = new List<string>();
|
||||||
|
@ -3888,7 +3888,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
public virtual void InPacket(object NewPack)
|
public virtual void InPacket(object NewPack)
|
||||||
{
|
{
|
||||||
// Cast NewPack to Packet.
|
// Cast NewPack to Packet.
|
||||||
m_PacketHandler.InPacket((Packet) NewPack);
|
m_PacketHandler.InPacket((Packet)NewPack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3981,7 +3981,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// Main packet processing conditional
|
// Main packet processing conditional
|
||||||
switch (Pack.Type)
|
switch (Pack.Type)
|
||||||
{
|
{
|
||||||
#region Scene/Avatar
|
#region Scene/Avatar
|
||||||
|
|
||||||
case PacketType.GenericMessage:
|
case PacketType.GenericMessage:
|
||||||
GenericMessagePacket gmpack = (GenericMessagePacket)Pack;
|
GenericMessagePacket gmpack = (GenericMessagePacket)Pack;
|
||||||
|
@ -4143,7 +4143,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.DeRezObject:
|
case PacketType.DeRezObject:
|
||||||
DeRezObjectPacket DeRezPacket = (DeRezObjectPacket) Pack;
|
DeRezObjectPacket DeRezPacket = (DeRezObjectPacket)Pack;
|
||||||
handlerDeRezObject = OnDeRezObject;
|
handlerDeRezObject = OnDeRezObject;
|
||||||
if (handlerDeRezObject != null)
|
if (handlerDeRezObject != null)
|
||||||
{
|
{
|
||||||
|
@ -4494,9 +4494,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Objects/m_sceneObjects
|
#region Objects/m_sceneObjects
|
||||||
|
|
||||||
case PacketType.ObjectLink:
|
case PacketType.ObjectLink:
|
||||||
ObjectLinkPacket link = (ObjectLinkPacket)Pack;
|
ObjectLinkPacket link = (ObjectLinkPacket)Pack;
|
||||||
|
@ -4950,9 +4950,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Inventory/Asset/Other related packets
|
#region Inventory/Asset/Other related packets
|
||||||
|
|
||||||
case PacketType.RequestImage:
|
case PacketType.RequestImage:
|
||||||
RequestImagePacket imageRequest = (RequestImagePacket)Pack;
|
RequestImagePacket imageRequest = (RequestImagePacket)Pack;
|
||||||
|
@ -5009,7 +5009,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (ti.OwnerID != AgentId)
|
if (ti.OwnerID != AgentId)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if ((ti.CurrentPermissions & ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer))
|
if ((ti.CurrentPermissions & ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (ti.AssetID != requestID)
|
if (ti.AssetID != requestID)
|
||||||
|
@ -5565,7 +5565,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
case PacketType.UUIDNameRequest:
|
case PacketType.UUIDNameRequest:
|
||||||
UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack;
|
UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack;
|
||||||
|
@ -5579,7 +5579,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#region Parcel related packets
|
#region Parcel related packets
|
||||||
|
|
||||||
case PacketType.RegionHandleRequest:
|
case PacketType.RegionHandleRequest:
|
||||||
RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack;
|
RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack;
|
||||||
|
@ -5774,9 +5774,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Estate Packets
|
#region Estate Packets
|
||||||
|
|
||||||
case PacketType.EstateOwnerMessage:
|
case PacketType.EstateOwnerMessage:
|
||||||
EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack;
|
EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack;
|
||||||
|
@ -5802,21 +5802,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
// case "texturebase":
|
// case "texturebase":
|
||||||
// if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
// if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||||
// {
|
// {
|
||||||
// foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
|
// foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
|
||||||
// {
|
// {
|
||||||
// string s = Utils.BytesToString(block.Parameter);
|
// string s = Utils.BytesToString(block.Parameter);
|
||||||
// string[] splitField = s.Split(' ');
|
// string[] splitField = s.Split(' ');
|
||||||
// if (splitField.Length == 2)
|
// if (splitField.Length == 2)
|
||||||
// {
|
// {
|
||||||
// UUID tempUUID = new UUID(splitField[1]);
|
// UUID tempUUID = new UUID(splitField[1]);
|
||||||
// OnSetEstateTerrainBaseTexture(this, Convert.ToInt16(splitField[0]), tempUUID);
|
// OnSetEstateTerrainBaseTexture(this, Convert.ToInt16(splitField[0]), tempUUID);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// break;
|
// break;
|
||||||
case "texturedetail":
|
case "texturedetail":
|
||||||
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
|
||||||
{
|
{
|
||||||
|
@ -6066,9 +6066,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region GodPackets
|
#region GodPackets
|
||||||
|
|
||||||
case PacketType.RequestGodlikePowers:
|
case PacketType.RequestGodlikePowers:
|
||||||
RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack;
|
RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack;
|
||||||
|
@ -6114,9 +6114,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
//OutPacket(kupack, ThrottleOutPacketType.Task);
|
//OutPacket(kupack, ThrottleOutPacketType.Task);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Economy/Transaction Packets
|
#region Economy/Transaction Packets
|
||||||
|
|
||||||
case PacketType.MoneyBalanceRequest:
|
case PacketType.MoneyBalanceRequest:
|
||||||
MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack;
|
MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack;
|
||||||
|
@ -6187,9 +6187,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Script Packets
|
#region Script Packets
|
||||||
|
|
||||||
case PacketType.GetScriptRunning:
|
case PacketType.GetScriptRunning:
|
||||||
GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack;
|
GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack;
|
||||||
|
@ -6218,9 +6218,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Gesture Managment
|
#region Gesture Managment
|
||||||
|
|
||||||
case PacketType.ActivateGestures:
|
case PacketType.ActivateGestures:
|
||||||
ActivateGesturesPacket activateGesturePacket = (ActivateGesturesPacket)Pack;
|
ActivateGesturesPacket activateGesturePacket = (ActivateGesturesPacket)Pack;
|
||||||
|
@ -6258,10 +6258,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region unimplemented handlers
|
#region unimplemented handlers
|
||||||
|
|
||||||
case PacketType.StartPingCheck:
|
case PacketType.StartPingCheck:
|
||||||
// Send the client the ping response back
|
// Send the client the ping response back
|
||||||
|
@ -6279,10 +6279,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
//m_log.Warn("[CLIENT]: unhandled ViewerStats packet");
|
//m_log.Warn("[CLIENT]: unhandled ViewerStats packet");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//case PacketType.GenericMessage:
|
//case PacketType.GenericMessage:
|
||||||
// TODO: handle this packet
|
// TODO: handle this packet
|
||||||
//m_log.Warn("[CLIENT]: unhandled GenericMessage packet");
|
//m_log.Warn("[CLIENT]: unhandled GenericMessage packet");
|
||||||
//break;
|
//break;
|
||||||
case PacketType.MapItemRequest:
|
case PacketType.MapItemRequest:
|
||||||
// TODO: handle this packet
|
// TODO: handle this packet
|
||||||
MapItemRequestPacket mirpk = (MapItemRequestPacket)Pack;
|
MapItemRequestPacket mirpk = (MapItemRequestPacket)Pack;
|
||||||
|
@ -6290,8 +6290,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
handlerMapItemRequest = OnMapItemRequest;
|
handlerMapItemRequest = OnMapItemRequest;
|
||||||
if (handlerMapItemRequest != null)
|
if (handlerMapItemRequest != null)
|
||||||
{
|
{
|
||||||
handlerMapItemRequest(this,mirpk.AgentData.Flags, mirpk.AgentData.EstateID,
|
handlerMapItemRequest(this, mirpk.AgentData.Flags, mirpk.AgentData.EstateID,
|
||||||
mirpk.AgentData.Godlike,mirpk.RequestData.ItemType,
|
mirpk.AgentData.Godlike, mirpk.RequestData.ItemType,
|
||||||
mirpk.RequestData.RegionHandle);
|
mirpk.RequestData.RegionHandle);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6894,7 +6894,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
m_log.Warn("[CLIENT]: unhandled packet " + Pack);
|
m_log.Warn("[CLIENT]: unhandled packet " + Pack);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
PacketPool.Instance.ReturnPacket(Pack);
|
PacketPool.Instance.ReturnPacket(Pack);
|
||||||
|
@ -7209,7 +7209,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
ParcelMediaCommandMessagePacket commandMessagePacket = new ParcelMediaCommandMessagePacket();
|
ParcelMediaCommandMessagePacket commandMessagePacket = new ParcelMediaCommandMessagePacket();
|
||||||
commandMessagePacket.CommandBlock.Flags = flags;
|
commandMessagePacket.CommandBlock.Flags = flags;
|
||||||
commandMessagePacket.CommandBlock.Command =(uint) command;
|
commandMessagePacket.CommandBlock.Command = (uint)command;
|
||||||
commandMessagePacket.CommandBlock.Time = time;
|
commandMessagePacket.CommandBlock.Time = time;
|
||||||
|
|
||||||
OutPacket(commandMessagePacket, ThrottleOutPacketType.Unknown);
|
OutPacket(commandMessagePacket, ThrottleOutPacketType.Unknown);
|
||||||
|
@ -7238,7 +7238,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
#region Camera
|
#region Camera
|
||||||
|
|
||||||
public void SendSetFollowCamProperties (UUID objectID, SortedDictionary<int, float> parameters)
|
public void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters)
|
||||||
{
|
{
|
||||||
SetFollowCamPropertiesPacket packet = (SetFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.SetFollowCamProperties);
|
SetFollowCamPropertiesPacket packet = (SetFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.SetFollowCamProperties);
|
||||||
packet.ObjectData.ObjectID = objectID;
|
packet.ObjectData.ObjectID = objectID;
|
||||||
|
@ -7256,7 +7256,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
OutPacket(packet, ThrottleOutPacketType.Task);
|
OutPacket(packet, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendClearFollowCamProperties (UUID objectID)
|
public void SendClearFollowCamProperties(UUID objectID)
|
||||||
{
|
{
|
||||||
ClearFollowCamPropertiesPacket packet = (ClearFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ClearFollowCamProperties);
|
ClearFollowCamPropertiesPacket packet = (ClearFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ClearFollowCamProperties);
|
||||||
packet.ObjectData.ObjectID = objectID;
|
packet.ObjectData.ObjectID = objectID;
|
||||||
|
@ -7265,7 +7265,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public void SendRegionHandle(UUID regionID, ulong handle) {
|
public void SendRegionHandle(UUID regionID, ulong handle)
|
||||||
|
{
|
||||||
RegionIDAndHandleReplyPacket reply = (RegionIDAndHandleReplyPacket)PacketPool.Instance.GetPacket(PacketType.RegionIDAndHandleReply);
|
RegionIDAndHandleReplyPacket reply = (RegionIDAndHandleReplyPacket)PacketPool.Instance.GetPacket(PacketType.RegionIDAndHandleReply);
|
||||||
reply.ReplyBlock.RegionID = regionID;
|
reply.ReplyBlock.RegionID = regionID;
|
||||||
reply.ReplyBlock.RegionHandle = handle;
|
reply.ReplyBlock.RegionHandle = handle;
|
||||||
|
@ -7321,14 +7322,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
switch (option)
|
switch (option)
|
||||||
{
|
{
|
||||||
case "ReliableIsImportant":
|
case "ReliableIsImportant":
|
||||||
bool val;
|
bool val;
|
||||||
|
|
||||||
if (bool.TryParse(value, out val))
|
if (bool.TryParse(value, out val))
|
||||||
m_PacketHandler.ReliableIsImportant = val;
|
m_PacketHandler.ReliableIsImportant = val;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7586,7 +7587,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
mirplk.AgentData.AgentID = AgentId;
|
mirplk.AgentData.AgentID = AgentId;
|
||||||
mirplk.RequestData.ItemType = mapitemtype;
|
mirplk.RequestData.ItemType = mapitemtype;
|
||||||
mirplk.Data = new MapItemReplyPacket.DataBlock[replies.Length];
|
mirplk.Data = new MapItemReplyPacket.DataBlock[replies.Length];
|
||||||
for (int i = 0; i < replies.Length; i++ )
|
for (int i = 0; i < replies.Length; i++)
|
||||||
{
|
{
|
||||||
MapItemReplyPacket.DataBlock mrdata = new MapItemReplyPacket.DataBlock();
|
MapItemReplyPacket.DataBlock mrdata = new MapItemReplyPacket.DataBlock();
|
||||||
mrdata.X = replies[i].x;
|
mrdata.X = replies[i].x;
|
||||||
|
@ -7676,5 +7677,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
KillPacket kp = new KillPacket();
|
KillPacket kp = new KillPacket();
|
||||||
OutPacket(kp, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority);
|
OutPacket(kp, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string Report()
|
||||||
|
{
|
||||||
|
LLPacketHandler handler = (LLPacketHandler)m_PacketHandler;
|
||||||
|
return handler.PacketQueue.GetStats();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -576,7 +576,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// See IPullStatsProvider
|
// See IPullStatsProvider
|
||||||
public string GetStats()
|
public string GetStats()
|
||||||
{
|
{
|
||||||
return string.Format("{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}",
|
return string.Format("{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}",
|
||||||
SendQueue.Count(),
|
SendQueue.Count(),
|
||||||
IncomingPacketQueue.Count,
|
IncomingPacketQueue.Count,
|
||||||
OutgoingPacketQueue.Count,
|
OutgoingPacketQueue.Count,
|
||||||
|
|
|
@ -1547,7 +1547,16 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
|
|
||||||
IPAddress ia;
|
IPAddress ia;
|
||||||
IPAddress.TryParse(address, out ia);
|
IPAddress.TryParse(address, out ia);
|
||||||
IPEndPoint m_EndPoint = new IPEndPoint(ia, (int)port);
|
IPEndPoint m_EndPoint;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
m_EndPoint = new IPEndPoint(ia, (int)port);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
m_log.Debug("[OGS1 GRID SERVICES]: Invalid remoting address: " + address);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
AsyncCallback callback = delegate(IAsyncResult iar)
|
AsyncCallback callback = delegate(IAsyncResult iar)
|
||||||
{
|
{
|
||||||
|
|
|
@ -105,7 +105,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory
|
||||||
|
|
||||||
public bool IsSharedModule
|
public bool IsSharedModule
|
||||||
{
|
{
|
||||||
get { return true; }
|
get { return false; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void NewClient(IClientAPI client)
|
public void NewClient(IClientAPI client)
|
||||||
|
|
|
@ -64,6 +64,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
||||||
// Bypasses the permissions engine
|
// Bypasses the permissions engine
|
||||||
private bool m_bypassPermissions = false;
|
private bool m_bypassPermissions = false;
|
||||||
private bool m_bypassPermissionsValue = true;
|
private bool m_bypassPermissionsValue = true;
|
||||||
|
private bool m_propagatePermissions = false;
|
||||||
private bool m_debugPermissions = false;
|
private bool m_debugPermissions = false;
|
||||||
private bool m_allowGridGods = false;
|
private bool m_allowGridGods = false;
|
||||||
private bool m_RegionOwnerIsGod = false;
|
private bool m_RegionOwnerIsGod = false;
|
||||||
|
@ -144,6 +145,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
||||||
m_allowGridGods = myConfig.GetBoolean("allow_grid_gods", false);
|
m_allowGridGods = myConfig.GetBoolean("allow_grid_gods", false);
|
||||||
|
|
||||||
m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true);
|
m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true);
|
||||||
|
m_propagatePermissions = myConfig.GetBoolean("propagate_permissions", true);
|
||||||
m_RegionOwnerIsGod = myConfig.GetBoolean("region_owner_is_god", true);
|
m_RegionOwnerIsGod = myConfig.GetBoolean("region_owner_is_god", true);
|
||||||
m_ParcelOwnerIsGod = myConfig.GetBoolean("parcel_owner_is_god", true);
|
m_ParcelOwnerIsGod = myConfig.GetBoolean("parcel_owner_is_god", true);
|
||||||
|
|
||||||
|
@ -276,7 +278,10 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
||||||
|
|
||||||
public bool PropagatePermissions()
|
public bool PropagatePermissions()
|
||||||
{
|
{
|
||||||
return false;
|
if (m_bypassPermissions)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return m_propagatePermissions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool BypassPermissions()
|
public bool BypassPermissions()
|
||||||
|
@ -586,6 +591,17 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
||||||
//They can't even edit the object
|
//They can't even edit the object
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SceneObjectPart part = scene.GetSceneObjectPart(objectID);
|
||||||
|
if (part == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ((part.OwnerMask & PERM_COPY) == 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ((part.ParentGroup.GetEffectivePermissions() & PERM_COPY) == 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
//If they can rez, they can duplicate
|
//If they can rez, they can duplicate
|
||||||
return CanRezObject(objectCount, owner, objectPosition, scene);
|
return CanRezObject(objectCount, owner, objectPosition, scene);
|
||||||
}
|
}
|
||||||
|
@ -983,7 +999,18 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
||||||
|
|
||||||
if ((task.RootPart.EveryoneMask & PERM_COPY) != 0)
|
if ((task.RootPart.EveryoneMask & PERM_COPY) != 0)
|
||||||
permission = true;
|
permission = true;
|
||||||
|
|
||||||
|
if ((task.GetEffectivePermissions() & PERM_COPY) == 0)
|
||||||
|
permission = false;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID];
|
||||||
|
|
||||||
|
if ((task.GetEffectivePermissions() & PERM_COPY) == 0)
|
||||||
|
permission = false;
|
||||||
|
}
|
||||||
|
|
||||||
return permission;
|
return permission;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,23 +88,23 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
|
||||||
FileStream s = file.Open(FileMode.Open, FileAccess.Read);
|
FileStream s = file.Open(FileMode.Open, FileAccess.Read);
|
||||||
BinaryReader bs = new BinaryReader(s);
|
BinaryReader bs = new BinaryReader(s);
|
||||||
|
|
||||||
int currFileYOffset = 0;
|
int currFileYOffset = fileHeight - 1;
|
||||||
|
|
||||||
// if our region isn't on the first Y section of the areas to be landscaped, then
|
// if our region isn't on the first Y section of the areas to be landscaped, then
|
||||||
// advance to our section of the file
|
// advance to our section of the file
|
||||||
while (currFileYOffset < offsetY)
|
while (currFileYOffset > offsetY)
|
||||||
{
|
{
|
||||||
// read a whole strip of regions
|
// read a whole strip of regions
|
||||||
int heightsToRead = sectionHeight * (fileWidth * sectionWidth);
|
int heightsToRead = sectionHeight * (fileWidth * sectionWidth);
|
||||||
bs.ReadBytes(heightsToRead * 13); // because there are 13 fun channels
|
bs.ReadBytes(heightsToRead * 13); // because there are 13 fun channels
|
||||||
currFileYOffset++;
|
currFileYOffset--;
|
||||||
}
|
}
|
||||||
|
|
||||||
// got to the Y start offset within the file of our region
|
// got to the Y start offset within the file of our region
|
||||||
// so read the file bits associated with our region
|
// so read the file bits associated with our region
|
||||||
int y;
|
int y;
|
||||||
// for each Y within our Y offset
|
// for each Y within our Y offset
|
||||||
for (y = 0; y < sectionHeight; y++)
|
for (y = sectionHeight - 1; y >= 0; y--)
|
||||||
{
|
{
|
||||||
int currFileXOffset = 0;
|
int currFileXOffset = 0;
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
|
||||||
int x;
|
int x;
|
||||||
for (x = 0; x < retval.Width; x++)
|
for (x = 0; x < retval.Width; x++)
|
||||||
{
|
{
|
||||||
retval[x, y] = bs.ReadByte() * (bs.ReadByte() / 128.0);
|
retval[x, (retval.Height - 1) - y] = bs.ReadByte() * (bs.ReadByte() / 128.0);
|
||||||
bs.ReadBytes(11); // Advance the stream to next bytes.
|
bs.ReadBytes(11); // Advance the stream to next bytes.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
|
||||||
{
|
{
|
||||||
for (int x = 0; x < map.Width; x++)
|
for (int x = 0; x < map.Width; x++)
|
||||||
{
|
{
|
||||||
double t = map[x, y];
|
double t = map[x, (map.Height - 1) - y];
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
|
||||||
// The lookup table is pre-sorted, so we either find an exact match or
|
// The lookup table is pre-sorted, so we either find an exact match or
|
||||||
|
|
|
@ -752,6 +752,47 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
|
||||||
CheckForTerrainUpdates();
|
CheckForTerrainUpdates();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InterfaceFlipTerrain(Object[] args)
|
||||||
|
{
|
||||||
|
String direction = (String)args[0];
|
||||||
|
|
||||||
|
if( direction.ToLower().StartsWith("y"))
|
||||||
|
{
|
||||||
|
for (int x = 0; x < Constants.RegionSize; x++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < Constants.RegionSize / 2; y++)
|
||||||
|
{
|
||||||
|
double height = m_channel[x, y];
|
||||||
|
double flippedHeight = m_channel[x, (int)Constants.RegionSize - 1 - y];
|
||||||
|
m_channel[x, y] = flippedHeight;
|
||||||
|
m_channel[x, (int)Constants.RegionSize - 1 - y] = height;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (direction.ToLower().StartsWith("x"))
|
||||||
|
{
|
||||||
|
for (int y = 0; y < Constants.RegionSize; y++)
|
||||||
|
{
|
||||||
|
for (int x = 0; x < Constants.RegionSize / 2; x++)
|
||||||
|
{
|
||||||
|
double height = m_channel[x, y];
|
||||||
|
double flippedHeight = m_channel[(int)Constants.RegionSize - 1 - x, y];
|
||||||
|
m_channel[x, y] = flippedHeight;
|
||||||
|
m_channel[(int)Constants.RegionSize - 1 - x, y] = height;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_log.Error("Unrecognised direction - need x or y");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
CheckForTerrainUpdates();
|
||||||
|
}
|
||||||
|
|
||||||
private void InterfaceElevateTerrain(Object[] args)
|
private void InterfaceElevateTerrain(Object[] args)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
|
@ -910,6 +951,10 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
|
||||||
Command revertRegionCommand =
|
Command revertRegionCommand =
|
||||||
new Command("revert", CommandIntentions.COMMAND_HAZARDOUS, InterfaceRevertTerrain, "Loads the revert map terrain into the regions heightmap.");
|
new Command("revert", CommandIntentions.COMMAND_HAZARDOUS, InterfaceRevertTerrain, "Loads the revert map terrain into the regions heightmap.");
|
||||||
|
|
||||||
|
Command flipCommand =
|
||||||
|
new Command("flip", CommandIntentions.COMMAND_HAZARDOUS, InterfaceFlipTerrain, "Flips the current terrain about the X or Y axis");
|
||||||
|
flipCommand.AddArgument("direction", "[x|y] the direction to flip the terrain in", "String");
|
||||||
|
|
||||||
// Debug
|
// Debug
|
||||||
Command showDebugStatsCommand =
|
Command showDebugStatsCommand =
|
||||||
new Command("stats", CommandIntentions.COMMAND_STATISTICAL, InterfaceShowDebugStats,
|
new Command("stats", CommandIntentions.COMMAND_STATISTICAL, InterfaceShowDebugStats,
|
||||||
|
@ -937,6 +982,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
|
||||||
m_commander.RegisterCommand("newbrushes", experimentalBrushesCommand);
|
m_commander.RegisterCommand("newbrushes", experimentalBrushesCommand);
|
||||||
m_commander.RegisterCommand("stats", showDebugStatsCommand);
|
m_commander.RegisterCommand("stats", showDebugStatsCommand);
|
||||||
m_commander.RegisterCommand("effect", pluginRunCommand);
|
m_commander.RegisterCommand("effect", pluginRunCommand);
|
||||||
|
m_commander.RegisterCommand("flip", flipCommand);
|
||||||
|
|
||||||
// Add this to our scene so scripts can call these functions
|
// Add this to our scene so scripts can call these functions
|
||||||
m_scene.RegisterModuleCommander("Terrain", m_commander);
|
m_scene.RegisterModuleCommander("Terrain", m_commander);
|
||||||
|
|
|
@ -163,6 +163,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
private Thread HeartbeatThread;
|
private Thread HeartbeatThread;
|
||||||
private volatile bool shuttingdown = false;
|
private volatile bool shuttingdown = false;
|
||||||
|
|
||||||
|
private object m_deleting_scene_object = new object();
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
|
@ -639,6 +641,17 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// Stop updating the scene objects and agents.
|
// Stop updating the scene objects and agents.
|
||||||
//m_heartbeatTimer.Close();
|
//m_heartbeatTimer.Close();
|
||||||
shuttingdown = true;
|
shuttingdown = true;
|
||||||
|
|
||||||
|
m_log.Debug("[SCENE]: Persisting changed objects");
|
||||||
|
List<EntityBase> entities = GetEntities();
|
||||||
|
foreach (EntityBase entity in entities)
|
||||||
|
{
|
||||||
|
if (!entity.IsDeleted && entity is SceneObjectGroup && ((SceneObjectGroup)entity).HasGroupChanged)
|
||||||
|
{
|
||||||
|
((SceneObjectGroup)entity).ProcessBackup(m_storageManager.DataStore);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// close the inner scene
|
// close the inner scene
|
||||||
m_innerScene.Close();
|
m_innerScene.Close();
|
||||||
// De-register with region communications (events cleanup)
|
// De-register with region communications (events cleanup)
|
||||||
|
@ -1823,7 +1836,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
//SceneObjectPart rootPart = group.GetChildPart(group.UUID);
|
//SceneObjectPart rootPart = group.GetChildPart(group.UUID);
|
||||||
|
|
||||||
group.RemoveScriptInstances();
|
// Serialise calls to RemoveScriptInstances to avoid
|
||||||
|
// deadlocking on m_parts inside SceneObjectGroup
|
||||||
|
lock (m_deleting_scene_object) {
|
||||||
|
group.RemoveScriptInstances();
|
||||||
|
}
|
||||||
|
|
||||||
foreach (SceneObjectPart part in group.Children.Values)
|
foreach (SceneObjectPart part in group.Children.Values)
|
||||||
{
|
{
|
||||||
|
@ -4030,7 +4047,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
return m_innerScene.TryGetAvatarByName(avatarName, out avatar);
|
return m_innerScene.TryGetAvatarByName(avatarName, out avatar);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void ForEachClient(Action<IClientAPI> action)
|
public void ForEachClient(Action<IClientAPI> action)
|
||||||
{
|
{
|
||||||
m_innerScene.ForEachClient(action);
|
m_innerScene.ForEachClient(action);
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,6 +80,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
get { return m_eventManager; }
|
get { return m_eventManager; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected SceneExternalChecks m_externalChecks;
|
protected SceneExternalChecks m_externalChecks;
|
||||||
public SceneExternalChecks ExternalChecks
|
public SceneExternalChecks ExternalChecks
|
||||||
{
|
{
|
||||||
|
@ -88,6 +89,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
protected string m_datastore;
|
protected string m_datastore;
|
||||||
|
|
||||||
|
private uint m_nextAvatarLocalId = 8880000;
|
||||||
|
|
||||||
private AssetCache m_assetCache;
|
private AssetCache m_assetCache;
|
||||||
|
|
||||||
public AssetCache AssetCache
|
public AssetCache AssetCache
|
||||||
|
@ -161,6 +164,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
get { return m_regInfo; }
|
get { return m_regInfo; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public uint NextAvatarLocalId
|
||||||
|
{
|
||||||
|
get { return m_nextAvatarLocalId++; }
|
||||||
|
}
|
||||||
|
|
||||||
#region admin stuff
|
#region admin stuff
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -1192,6 +1192,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="datastore"></param>
|
/// <param name="datastore"></param>
|
||||||
public void ProcessBackup(IRegionDataStore datastore)
|
public void ProcessBackup(IRegionDataStore datastore)
|
||||||
{
|
{
|
||||||
|
if (!m_isBackedUp)
|
||||||
|
return;
|
||||||
|
|
||||||
// Since this is the top of the section of call stack for backing up a particular scene object, don't let
|
// Since this is the top of the section of call stack for backing up a particular scene object, don't let
|
||||||
// any exception propogate upwards.
|
// any exception propogate upwards.
|
||||||
|
|
||||||
|
|
|
@ -492,7 +492,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
m_scene = world;
|
m_scene = world;
|
||||||
m_uuid = client.AgentId;
|
m_uuid = client.AgentId;
|
||||||
m_regionInfo = reginfo;
|
m_regionInfo = reginfo;
|
||||||
m_localId = m_scene.AllocateLocalId();
|
m_localId = m_scene.NextAvatarLocalId;
|
||||||
|
|
||||||
IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
|
IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
|
||||||
if (gm != null)
|
if (gm != null)
|
||||||
|
@ -758,7 +758,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
float posZLimit = (float)m_scene.GetLandHeight((int)pos.X, (int)pos.Y);
|
float posZLimit = (float)m_scene.GetLandHeight((int)pos.X, (int)pos.Y);
|
||||||
float newPosZ = posZLimit + localAVHeight;
|
float newPosZ = posZLimit + localAVHeight / 2;
|
||||||
if (posZLimit >= (pos.Z - (localAVHeight / 2)) && !(Single.IsInfinity(newPosZ) || Single.IsNaN(newPosZ)))
|
if (posZLimit >= (pos.Z - (localAVHeight / 2)) && !(Single.IsInfinity(newPosZ) || Single.IsNaN(newPosZ)))
|
||||||
{
|
{
|
||||||
pos.Z = newPosZ;
|
pos.Z = newPosZ;
|
||||||
|
@ -1751,6 +1751,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
Vector3 pos = m_pos;
|
Vector3 pos = m_pos;
|
||||||
Vector3 vel = Velocity;
|
Vector3 vel = Velocity;
|
||||||
Quaternion rot = m_bodyRot;
|
Quaternion rot = m_bodyRot;
|
||||||
|
pos.Z -= m_appearance.HipOffset;
|
||||||
remoteClient.SendAvatarTerseUpdate(m_regionHandle, (ushort)(m_scene.TimeDilation * (float)ushort.MaxValue), LocalId, new Vector3(pos.X, pos.Y, pos.Z),
|
remoteClient.SendAvatarTerseUpdate(m_regionHandle, (ushort)(m_scene.TimeDilation * (float)ushort.MaxValue), LocalId, new Vector3(pos.X, pos.Y, pos.Z),
|
||||||
new Vector3(vel.X, vel.Y, vel.Z), rot);
|
new Vector3(vel.X, vel.Y, vel.Z), rot);
|
||||||
|
|
||||||
|
@ -1834,6 +1835,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// Note: because Quaternion is a struct, it can't be null
|
// Note: because Quaternion is a struct, it can't be null
|
||||||
Quaternion rot = m_bodyRot;
|
Quaternion rot = m_bodyRot;
|
||||||
|
|
||||||
|
Vector3 pos = m_pos;
|
||||||
|
pos.Z -= m_appearance.HipOffset;
|
||||||
|
|
||||||
remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid,
|
remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid,
|
||||||
LocalId, m_pos, m_appearance.Texture.ToBytes(),
|
LocalId, m_pos, m_appearance.Texture.ToBytes(),
|
||||||
m_parentID, rot);
|
m_parentID, rot);
|
||||||
|
@ -1899,6 +1903,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// Note: because Quaternion is a struct, it can't be null
|
// Note: because Quaternion is a struct, it can't be null
|
||||||
Quaternion rot = m_bodyRot;
|
Quaternion rot = m_bodyRot;
|
||||||
|
|
||||||
|
Vector3 pos = m_pos;
|
||||||
|
pos.Z -= m_appearance.HipOffset;
|
||||||
|
|
||||||
m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId,
|
m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId,
|
||||||
m_pos, m_appearance.Texture.ToBytes(), m_parentID, rot);
|
m_pos, m_appearance.Texture.ToBytes(), m_parentID, rot);
|
||||||
|
|
||||||
|
@ -2214,6 +2221,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
CrossAttachmentsIntoNewRegion(neighbourHandle, true);
|
CrossAttachmentsIntoNewRegion(neighbourHandle, true);
|
||||||
|
|
||||||
|
// m_scene.SendKillObject(m_localId);
|
||||||
|
|
||||||
m_scene.NotifyMyCoarseLocationChange();
|
m_scene.NotifyMyCoarseLocationChange();
|
||||||
// the user may change their profile information in other region,
|
// the user may change their profile information in other region,
|
||||||
// so the userinfo in UserProfileCache is not reliable any more, delete it
|
// so the userinfo in UserProfileCache is not reliable any more, delete it
|
||||||
|
@ -2263,6 +2272,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void ChildAgentDataUpdate(ChildAgentDataUpdate cAgentData, uint tRegionX, uint tRegionY, uint rRegionX, uint rRegionY)
|
public void ChildAgentDataUpdate(ChildAgentDataUpdate cAgentData, uint tRegionX, uint tRegionY, uint rRegionX, uint rRegionY)
|
||||||
{
|
{
|
||||||
|
//
|
||||||
if (!IsChildAgent)
|
if (!IsChildAgent)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
}
|
}
|
||||||
public class OdeCharacter : PhysicsActor
|
public class OdeCharacter : PhysicsActor
|
||||||
{
|
{
|
||||||
//private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private PhysicsVector _position;
|
private PhysicsVector _position;
|
||||||
private d.Vector3 _zeroPosition;
|
private d.Vector3 _zeroPosition;
|
||||||
|
@ -145,7 +145,8 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
{
|
{
|
||||||
m_colliderarr[i] = false;
|
m_colliderarr[i] = false;
|
||||||
}
|
}
|
||||||
CAPSULE_LENGTH = (size.Z - ((size.Z * height_fudge_factor)));
|
CAPSULE_LENGTH = (size.Z * 1.15f) - CAPSULE_RADIUS * 2.0f;
|
||||||
|
//m_log.Info("[SIZE]: " + CAPSULE_LENGTH.ToString());
|
||||||
|
|
||||||
lock (_parent_scene.OdeLock)
|
lock (_parent_scene.OdeLock)
|
||||||
{
|
{
|
||||||
|
@ -395,7 +396,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
// float capsuleradius = CAPSULE_RADIUS;
|
// float capsuleradius = CAPSULE_RADIUS;
|
||||||
//capsuleradius = 0.2f;
|
//capsuleradius = 0.2f;
|
||||||
|
|
||||||
CAPSULE_LENGTH = (SetSize.Z - ((SetSize.Z * heightFudgeFactor))); // subtract 43% of the size
|
CAPSULE_LENGTH = (SetSize.Z * 1.15f) - CAPSULE_RADIUS * 2.0f;
|
||||||
//m_log.Info("[SIZE]: " + CAPSULE_LENGTH.ToString());
|
//m_log.Info("[SIZE]: " + CAPSULE_LENGTH.ToString());
|
||||||
d.BodyDestroy(Body);
|
d.BodyDestroy(Body);
|
||||||
|
|
||||||
|
|
|
@ -2589,6 +2589,7 @@
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
<Reference name="OpenSim.Data"/>
|
<Reference name="OpenSim.Data"/>
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
|
<Reference name="OpenSim.Framework.Statistics"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="OpenSim.Region.Environment"/>
|
<Reference name="OpenSim.Region.Environment"/>
|
||||||
<Reference name="OpenSim.Region.ClientStack"/>
|
<Reference name="OpenSim.Region.ClientStack"/>
|
||||||
|
|
Loading…
Reference in New Issue