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
|
||||
* jimbo2120 (IBM)
|
||||
* John R Sohn (XenReborn)
|
||||
* jonc
|
||||
* Junta Kohime
|
||||
* Kayne
|
||||
* Kevin Cozens
|
||||
|
@ -63,6 +64,7 @@ Patches
|
|||
* M.Igarashi
|
||||
* Mic Bowman
|
||||
* mikkopa/_someone - RealXtend
|
||||
* Mircea Kitsune
|
||||
* nlin
|
||||
* nornalbion
|
||||
* openlifegrid.com
|
||||
|
@ -79,7 +81,6 @@ Patches
|
|||
* Y. Nitta
|
||||
* YZh
|
||||
* Zha Ewry
|
||||
* Mircea Kitsune
|
||||
|
||||
|
||||
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();
|
||||
|
||||
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();
|
||||
result.Dispose();
|
||||
|
@ -301,24 +306,36 @@ namespace OpenSim.Data.MySQL
|
|||
try
|
||||
{
|
||||
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.AssetID = new UUID((string) reader["assetID"]);
|
||||
item.AssetType = (int) reader["assetType"];
|
||||
item.Folder = new UUID((string) reader["parentFolderID"]);
|
||||
item.Owner = new UUID((string) reader["avatarID"]);
|
||||
item.Name = (string) reader["inventoryName"];
|
||||
item.Description = (string) reader["inventoryDescription"];
|
||||
item.NextPermissions = (uint) reader["inventoryNextPermissions"];
|
||||
item.CurrentPermissions = (uint) reader["inventoryCurrentPermissions"];
|
||||
item.InvType = (int) reader["invType"];
|
||||
item.Creator = new UUID((string) reader["creatorID"]);
|
||||
item.BasePermissions = (uint) reader["inventoryBasePermissions"];
|
||||
item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"];
|
||||
item.SalePrice = (int) reader["salePrice"];
|
||||
item.SaleType = Convert.ToByte(reader["saleType"]);
|
||||
item.CreationDate = (int) reader["creationDate"];
|
||||
item.GroupID = new UUID(reader["groupID"].ToString());
|
||||
item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]);
|
||||
item.Flags = (uint) reader["flags"];
|
||||
|
||||
|
@ -814,8 +831,11 @@ namespace OpenSim.Data.MySQL
|
|||
|
||||
List<InventoryItemBase> list = new List<InventoryItemBase>();
|
||||
while (result.Read())
|
||||
list.Add(readInventoryItem(result));
|
||||
|
||||
{
|
||||
InventoryItemBase item = readInventoryItem(result);
|
||||
if (item != null)
|
||||
list.Add(item);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
|
@ -231,6 +231,7 @@ namespace OpenSim.Framework
|
|||
}
|
||||
|
||||
protected float m_avatarHeight = 0;
|
||||
protected float m_hipOffset = 0;
|
||||
|
||||
public virtual float AvatarHeight
|
||||
{
|
||||
|
@ -238,6 +239,11 @@ namespace OpenSim.Framework
|
|||
set { m_avatarHeight = value; }
|
||||
}
|
||||
|
||||
public virtual float HipOffset
|
||||
{
|
||||
get { return m_hipOffset; }
|
||||
}
|
||||
|
||||
public AvatarAppearance()
|
||||
{
|
||||
m_wearables = new AvatarWearable[MAX_WEARABLES];
|
||||
|
@ -271,22 +277,20 @@ namespace OpenSim.Framework
|
|||
{
|
||||
Primitive.TextureEntry textureEnt = new Primitive.TextureEntry(texture, 0, texture.Length);
|
||||
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();
|
||||
|
||||
// Teravus : Nifty AV Height Getting Maaaaagical formula. Oh how we love turning 0-255 into meters.
|
||||
// (float)m_visualParams[25] = Height
|
||||
// (float)m_visualParams[125] = LegLength
|
||||
m_avatarHeight = (1.50856f + (((float) m_visualparams[25]/255.0f)*(2.525506f - 1.50856f)))
|
||||
+ (((float) m_visualparams[125]/255.0f)/1.5f);
|
||||
m_avatarHeight = 1.23077f // Shortest possible avatar height
|
||||
+ 0.516945f * (float)m_visualparams[25] / 255.0f // Body height
|
||||
+ 0.072514f * (float)m_visualparams[120] / 255.0f // Head size
|
||||
+ 0.3836f * (float)m_visualparams[125] / 255.0f // Leg length
|
||||
+ 0.08f * (float)m_visualparams[77] / 255.0f // Shoe heel height
|
||||
+ 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)
|
||||
|
|
|
@ -330,10 +330,11 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
|
||||
/// <summary>
|
||||
/// Create a folder in this agent's inventory.
|
||||
/// </summary>
|
||||
///
|
||||
/// If the inventory service has not yet delievered the inventory
|
||||
/// for this user then the request will be queued.
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="parentID"></param>
|
||||
/// <returns></returns>
|
||||
public bool CreateFolder(string folderName, UUID folderID, ushort folderType, UUID parentID)
|
||||
|
|
|
@ -224,11 +224,12 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing,
|
||||
/// and needs to be changed.
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="remoteClient"></param>
|
||||
/// <param name="folderID"></param>
|
||||
/// <param name="type"></param>
|
||||
|
|
|
@ -45,6 +45,7 @@ namespace OpenSim.Framework
|
|||
public interface IScene
|
||||
{
|
||||
RegionInfo RegionInfo { get; }
|
||||
uint NextAvatarLocalId { get; }
|
||||
RegionStatus Region_Status { get; set; }
|
||||
|
||||
ClientManager ClientManager { get; }
|
||||
|
|
|
@ -470,6 +470,11 @@ namespace OpenSim.Framework.Servers
|
|||
{
|
||||
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)
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace OpenSim.Framework.Servers
|
|||
/// <summary>
|
||||
/// Should be overriden and referenced by descendents if they need to perform extra shutdown processing
|
||||
/// </summary>
|
||||
protected virtual void ShutdownSpecific() {}
|
||||
public virtual void ShutdownSpecific() {}
|
||||
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// all attempts to use the console MUST be verified.
|
||||
/// </summary>
|
||||
private void Notice(string msg)
|
||||
protected void Notice(string msg)
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
|
|
@ -209,6 +209,23 @@ namespace OpenSim.Grid.InventoryServer
|
|||
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>
|
||||
/// Guid to UUID wrapper for same name IInventoryServices method
|
||||
/// </summary>
|
||||
|
|
|
@ -105,10 +105,18 @@ namespace OpenSim.Grid.InventoryServer
|
|||
new RestDeserialiseSecureHandler<InventoryFolderBase, bool>(
|
||||
"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(
|
||||
new RestDeserialiseSecureHandler<InventoryItemBase, bool>(
|
||||
"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(
|
||||
new RestDeserialiseSecureHandler<InventoryItemBase, bool>(
|
||||
"POST", "/DeleteItem/", m_inventoryService.DeleteItem, m_inventoryService.CheckAuthSession));
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace OpenSim.Grid.MessagingServer
|
|||
messageserver.Work();
|
||||
}
|
||||
|
||||
private OpenMessage_Main()
|
||||
public OpenMessage_Main()
|
||||
{
|
||||
m_console = new ConsoleBase("Messaging", this);
|
||||
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");
|
||||
}
|
||||
|
||||
protected override void ShutdownSpecific()
|
||||
public override void ShutdownSpecific()
|
||||
{
|
||||
msgsvc.deregisterWithUserServer();
|
||||
}
|
||||
|
|
|
@ -393,7 +393,7 @@ namespace OpenSim.Grid.UserServer
|
|||
|
||||
}
|
||||
|
||||
protected override void ShutdownSpecific()
|
||||
public override void ShutdownSpecific()
|
||||
{
|
||||
m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation;
|
||||
}
|
||||
|
|
|
@ -63,7 +63,8 @@ namespace OpenSim
|
|||
/// </summary>
|
||||
private static List<ConsolePluginCommand> m_PluginCommandInfos = new List<ConsolePluginCommand>();
|
||||
|
||||
public OpenSim(IConfigSource configSource) : base(configSource)
|
||||
public OpenSim(IConfigSource configSource)
|
||||
: base(configSource)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -728,9 +729,49 @@ namespace OpenSim
|
|||
scene.RegionInfo.RegionLocY + " , Region Port: " + scene.RegionInfo.InternalEndPoint.Port.ToString());
|
||||
});
|
||||
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>
|
||||
/// Create a new user
|
||||
/// </summary>
|
||||
|
|
|
@ -542,7 +542,7 @@ namespace OpenSim
|
|||
/// <summary>
|
||||
/// Performs any last-minute sanity checking and shuts down the region server
|
||||
/// </summary>
|
||||
protected override void ShutdownSpecific()
|
||||
public override void ShutdownSpecific()
|
||||
{
|
||||
if (proxyUrl.Length > 0)
|
||||
{
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
/// Handles new client connections
|
||||
/// Constructor takes a single Packet and authenticates everything
|
||||
/// </summary>
|
||||
public class LLClientView : IClientAPI
|
||||
public class LLClientView : IClientAPI, IStatsCollector
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -7265,7 +7265,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
#endregion
|
||||
|
||||
public void SendRegionHandle(UUID regionID, ulong handle) {
|
||||
public void SendRegionHandle(UUID regionID, ulong handle)
|
||||
{
|
||||
RegionIDAndHandleReplyPacket reply = (RegionIDAndHandleReplyPacket)PacketPool.Instance.GetPacket(PacketType.RegionIDAndHandleReply);
|
||||
reply.ReplyBlock.RegionID = regionID;
|
||||
reply.ReplyBlock.RegionHandle = handle;
|
||||
|
@ -7676,5 +7677,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
KillPacket kp = new KillPacket();
|
||||
OutPacket(kp, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority);
|
||||
}
|
||||
|
||||
public string Report()
|
||||
{
|
||||
LLPacketHandler handler = (LLPacketHandler)m_PacketHandler;
|
||||
return handler.PacketQueue.GetStats();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1547,7 +1547,16 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
|
||||
IPAddress 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)
|
||||
{
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory
|
|||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public void NewClient(IClientAPI client)
|
||||
|
|
|
@ -64,6 +64,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
|||
// Bypasses the permissions engine
|
||||
private bool m_bypassPermissions = false;
|
||||
private bool m_bypassPermissionsValue = true;
|
||||
private bool m_propagatePermissions = false;
|
||||
private bool m_debugPermissions = false;
|
||||
private bool m_allowGridGods = 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_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true);
|
||||
m_propagatePermissions = myConfig.GetBoolean("propagate_permissions", true);
|
||||
m_RegionOwnerIsGod = myConfig.GetBoolean("region_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()
|
||||
{
|
||||
if (m_bypassPermissions)
|
||||
return false;
|
||||
|
||||
return m_propagatePermissions;
|
||||
}
|
||||
|
||||
public bool BypassPermissions()
|
||||
|
@ -586,6 +591,17 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
|||
//They can't even edit the object
|
||||
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
|
||||
return CanRezObject(objectCount, owner, objectPosition, scene);
|
||||
}
|
||||
|
@ -983,7 +999,18 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
|||
|
||||
if ((task.RootPart.EveryoneMask & PERM_COPY) != 0)
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,23 +88,23 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
|
|||
FileStream s = file.Open(FileMode.Open, FileAccess.Read);
|
||||
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
|
||||
// advance to our section of the file
|
||||
while (currFileYOffset < offsetY)
|
||||
while (currFileYOffset > offsetY)
|
||||
{
|
||||
// read a whole strip of regions
|
||||
int heightsToRead = sectionHeight * (fileWidth * sectionWidth);
|
||||
bs.ReadBytes(heightsToRead * 13); // because there are 13 fun channels
|
||||
currFileYOffset++;
|
||||
currFileYOffset--;
|
||||
}
|
||||
|
||||
// got to the Y start offset within the file of our region
|
||||
// so read the file bits associated with our region
|
||||
int y;
|
||||
// for each Y within our Y offset
|
||||
for (y = 0; y < sectionHeight; y++)
|
||||
for (y = sectionHeight - 1; y >= 0; y--)
|
||||
{
|
||||
int currFileXOffset = 0;
|
||||
|
||||
|
@ -155,7 +155,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
|
|||
int 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.
|
||||
}
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
|
|||
{
|
||||
for (int x = 0; x < map.Width; x++)
|
||||
{
|
||||
double t = map[x, y];
|
||||
double t = map[x, (map.Height - 1) - y];
|
||||
int index = 0;
|
||||
|
||||
// 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();
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
int x, y;
|
||||
|
@ -910,6 +951,10 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
|
|||
Command revertRegionCommand =
|
||||
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
|
||||
Command showDebugStatsCommand =
|
||||
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("stats", showDebugStatsCommand);
|
||||
m_commander.RegisterCommand("effect", pluginRunCommand);
|
||||
m_commander.RegisterCommand("flip", flipCommand);
|
||||
|
||||
// Add this to our scene so scripts can call these functions
|
||||
m_scene.RegisterModuleCommander("Terrain", m_commander);
|
||||
|
|
|
@ -163,6 +163,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
private Thread HeartbeatThread;
|
||||
private volatile bool shuttingdown = false;
|
||||
|
||||
private object m_deleting_scene_object = new object();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
@ -639,6 +641,17 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
// Stop updating the scene objects and agents.
|
||||
//m_heartbeatTimer.Close();
|
||||
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
|
||||
m_innerScene.Close();
|
||||
// De-register with region communications (events cleanup)
|
||||
|
@ -1823,7 +1836,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
//SceneObjectPart rootPart = group.GetChildPart(group.UUID);
|
||||
|
||||
// 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)
|
||||
{
|
||||
|
@ -4030,7 +4047,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
return m_innerScene.TryGetAvatarByName(avatarName, out avatar);
|
||||
}
|
||||
|
||||
internal void ForEachClient(Action<IClientAPI> action)
|
||||
public void ForEachClient(Action<IClientAPI> action)
|
||||
{
|
||||
m_innerScene.ForEachClient(action);
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
get { return m_eventManager; }
|
||||
}
|
||||
|
||||
|
||||
protected SceneExternalChecks m_externalChecks;
|
||||
public SceneExternalChecks ExternalChecks
|
||||
{
|
||||
|
@ -88,6 +89,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
protected string m_datastore;
|
||||
|
||||
private uint m_nextAvatarLocalId = 8880000;
|
||||
|
||||
private AssetCache m_assetCache;
|
||||
|
||||
public AssetCache AssetCache
|
||||
|
@ -161,6 +164,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
get { return m_regInfo; }
|
||||
}
|
||||
|
||||
public uint NextAvatarLocalId
|
||||
{
|
||||
get { return m_nextAvatarLocalId++; }
|
||||
}
|
||||
|
||||
#region admin stuff
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -1192,6 +1192,9 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
/// <param name="datastore"></param>
|
||||
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
|
||||
// any exception propogate upwards.
|
||||
|
||||
|
|
|
@ -492,7 +492,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
m_scene = world;
|
||||
m_uuid = client.AgentId;
|
||||
m_regionInfo = reginfo;
|
||||
m_localId = m_scene.AllocateLocalId();
|
||||
m_localId = m_scene.NextAvatarLocalId;
|
||||
|
||||
IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
|
||||
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 newPosZ = posZLimit + localAVHeight;
|
||||
float newPosZ = posZLimit + localAVHeight / 2;
|
||||
if (posZLimit >= (pos.Z - (localAVHeight / 2)) && !(Single.IsInfinity(newPosZ) || Single.IsNaN(newPosZ)))
|
||||
{
|
||||
pos.Z = newPosZ;
|
||||
|
@ -1751,6 +1751,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
Vector3 pos = m_pos;
|
||||
Vector3 vel = Velocity;
|
||||
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),
|
||||
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
|
||||
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,
|
||||
LocalId, m_pos, m_appearance.Texture.ToBytes(),
|
||||
m_parentID, rot);
|
||||
|
@ -1899,6 +1903,9 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
// Note: because Quaternion is a struct, it can't be null
|
||||
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_pos, m_appearance.Texture.ToBytes(), m_parentID, rot);
|
||||
|
||||
|
@ -2214,6 +2221,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
CrossAttachmentsIntoNewRegion(neighbourHandle, true);
|
||||
|
||||
// m_scene.SendKillObject(m_localId);
|
||||
|
||||
m_scene.NotifyMyCoarseLocationChange();
|
||||
// the user may change their profile information in other region,
|
||||
// so the userinfo in UserProfileCache is not reliable any more, delete it
|
||||
|
@ -2263,6 +2272,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
/// </summary>
|
||||
public void ChildAgentDataUpdate(ChildAgentDataUpdate cAgentData, uint tRegionX, uint tRegionY, uint rRegionX, uint rRegionY)
|
||||
{
|
||||
//
|
||||
if (!IsChildAgent)
|
||||
return;
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
}
|
||||
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 d.Vector3 _zeroPosition;
|
||||
|
@ -145,7 +145,8 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
{
|
||||
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)
|
||||
{
|
||||
|
@ -395,7 +396,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
// float capsuleradius = CAPSULE_RADIUS;
|
||||
//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());
|
||||
d.BodyDestroy(Body);
|
||||
|
||||
|
|
|
@ -2589,6 +2589,7 @@
|
|||
<Reference name="OpenSim.Framework"/>
|
||||
<Reference name="OpenSim.Data"/>
|
||||
<Reference name="OpenSim.Framework.Servers"/>
|
||||
<Reference name="OpenSim.Framework.Statistics"/>
|
||||
<Reference name="OpenSim.Framework.Console"/>
|
||||
<Reference name="OpenSim.Region.Environment"/>
|
||||
<Reference name="OpenSim.Region.ClientStack"/>
|
||||
|
|
Loading…
Reference in New Issue