Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

iar_mods
BlueWall 2011-11-26 17:20:20 -05:00
commit 19c10c892a
14 changed files with 144 additions and 213 deletions

View File

@ -42,7 +42,6 @@ using Caps = OpenSim.Framework.Capabilities.Caps;
namespace OpenSim.Capabilities.Handlers namespace OpenSim.Capabilities.Handlers
{ {
public class WebFetchInvDescHandler public class WebFetchInvDescHandler
{ {
private static readonly ILog m_log = private static readonly ILog m_log =
@ -50,7 +49,7 @@ namespace OpenSim.Capabilities.Handlers
private IInventoryService m_InventoryService; private IInventoryService m_InventoryService;
private ILibraryService m_LibraryService; private ILibraryService m_LibraryService;
private object m_fetchLock = new Object(); // private object m_fetchLock = new Object();
public WebFetchInvDescHandler(IInventoryService invService, ILibraryService libService) public WebFetchInvDescHandler(IInventoryService invService, ILibraryService libService)
{ {
@ -60,39 +59,40 @@ namespace OpenSim.Capabilities.Handlers
public string FetchInventoryDescendentsRequest(string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) public string FetchInventoryDescendentsRequest(string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{ {
// m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Received request"); // lock (m_fetchLock)
// {
// m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Received request {0}", request);
// nasty temporary hack here, the linden client falsely
// identifies the uuid 00000000-0000-0000-0000-000000000000
// as a string which breaks us
//
// correctly mark it as a uuid
//
request = request.Replace("<string>00000000-0000-0000-0000-000000000000</string>", "<uuid>00000000-0000-0000-0000-000000000000</uuid>");
// another hack <integer>1</integer> results in a
// System.ArgumentException: Object type System.Int32 cannot
// be converted to target type: System.Boolean
//
request = request.Replace("<key>fetch_folders</key><integer>0</integer>", "<key>fetch_folders</key><boolean>0</boolean>");
request = request.Replace("<key>fetch_folders</key><integer>1</integer>", "<key>fetch_folders</key><boolean>1</boolean>");
Hashtable hash = new Hashtable();
try
{
hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request));
}
catch (LLSD.LLSDParseException e)
{
m_log.ErrorFormat("[WEB FETCH INV DESC HANDLER]: Fetch error: {0}{1}" + e.Message, e.StackTrace);
m_log.Error("Request: " + request);
}
ArrayList foldersrequested = (ArrayList)hash["folders"];
string response = "";
// nasty temporary hack here, the linden client falsely
// identifies the uuid 00000000-0000-0000-0000-000000000000
// as a string which breaks us
//
// correctly mark it as a uuid
//
request = request.Replace("<string>00000000-0000-0000-0000-000000000000</string>", "<uuid>00000000-0000-0000-0000-000000000000</uuid>");
// another hack <integer>1</integer> results in a
// System.ArgumentException: Object type System.Int32 cannot
// be converted to target type: System.Boolean
//
request = request.Replace("<key>fetch_folders</key><integer>0</integer>", "<key>fetch_folders</key><boolean>0</boolean>");
request = request.Replace("<key>fetch_folders</key><integer>1</integer>", "<key>fetch_folders</key><boolean>1</boolean>");
Hashtable hash = new Hashtable();
try
{
hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request));
}
catch (LLSD.LLSDParseException pe)
{
m_log.Error("[AGENT INVENTORY]: Fetch error: " + pe.Message);
m_log.Error("Request: " + request.ToString());
}
ArrayList foldersrequested = (ArrayList)hash["folders"];
string response = "";
lock (m_fetchLock)
{
for (int i = 0; i < foldersrequested.Count; i++) for (int i = 0; i < foldersrequested.Count; i++)
{ {
string inventoryitemstr = ""; string inventoryitemstr = "";
@ -106,7 +106,7 @@ namespace OpenSim.Capabilities.Handlers
} }
catch (Exception e) catch (Exception e)
{ {
m_log.Debug("[CAPS]: caught exception doing OSD deserialize" + e); m_log.Debug("[WEB FETCH INV DESC HANDLER]: caught exception doing OSD deserialize" + e);
} }
LLSDInventoryDescendents reply = FetchInventoryReply(llsdRequest); LLSDInventoryDescendents reply = FetchInventoryReply(llsdRequest);
@ -117,7 +117,6 @@ namespace OpenSim.Capabilities.Handlers
response += inventoryitemstr; response += inventoryitemstr;
} }
if (response.Length == 0) if (response.Length == 0)
{ {
// Ter-guess: If requests fail a lot, the client seems to stop requesting descendants. // Ter-guess: If requests fail a lot, the client seems to stop requesting descendants.
@ -131,11 +130,12 @@ namespace OpenSim.Capabilities.Handlers
response = "<llsd><map><key>folders</key><array>" + response + "</array></map></llsd>"; response = "<llsd><map><key>folders</key><array>" + response + "</array></map></llsd>";
} }
//m_log.DebugFormat("[CAPS]: Replying to CAPS fetch inventory request with following xml"); // m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Replying to CAPS fetch inventory request");
//m_log.Debug("[CAPS] "+response); //m_log.Debug("[WEB FETCH INV DESC HANDLER] "+response);
} return response;
return response;
// }
} }
/// <summary> /// <summary>
@ -184,16 +184,31 @@ namespace OpenSim.Capabilities.Handlers
return reply; return reply;
} }
public InventoryCollection Fetch(UUID agentID, UUID folderID, UUID ownerID, /// <summary>
bool fetchFolders, bool fetchItems, int sortOrder, out int version) /// Handle the caps inventory descendents fetch.
/// </summary>
/// <param name="agentID"></param>
/// <param name="folderID"></param>
/// <param name="ownerID"></param>
/// <param name="fetchFolders"></param>
/// <param name="fetchItems"></param>
/// <param name="sortOrder"></param>
/// <param name="version"></param>
/// <returns>An empty InventoryCollection if the inventory look up failed</returns>
public InventoryCollection Fetch(
UUID agentID, UUID folderID, UUID ownerID,
bool fetchFolders, bool fetchItems, int sortOrder, out int version)
{ {
m_log.DebugFormat( // m_log.DebugFormat(
"[WEB FETCH INV DESC HANDLER]: Fetching folders ({0}), items ({1}) from {2} for agent {3}", // "[WEB FETCH INV DESC HANDLER]: Fetching folders ({0}), items ({1}) from {2} for agent {3}",
fetchFolders, fetchItems, folderID, agentID); // fetchFolders, fetchItems, folderID, agentID);
// FIXME MAYBE: We're not handling sortOrder!
version = 0; version = 0;
InventoryFolderImpl fold; InventoryFolderImpl fold;
if (m_LibraryService != null && m_LibraryService.LibraryRootFolder != null && agentID == m_LibraryService.LibraryRootFolder.Owner) if (m_LibraryService != null && m_LibraryService.LibraryRootFolder != null && agentID == m_LibraryService.LibraryRootFolder.Owner)
{
if ((fold = m_LibraryService.LibraryRootFolder.FindFolder(folderID)) != null) if ((fold = m_LibraryService.LibraryRootFolder.FindFolder(folderID)) != null)
{ {
InventoryCollection ret = new InventoryCollection(); InventoryCollection ret = new InventoryCollection();
@ -202,6 +217,7 @@ namespace OpenSim.Capabilities.Handlers
return ret; return ret;
} }
}
InventoryCollection contents = new InventoryCollection(); InventoryCollection contents = new InventoryCollection();
@ -217,7 +233,7 @@ namespace OpenSim.Capabilities.Handlers
} }
else else
{ {
// Lost itemsm don't really need a version // Lost items don't really need a version
version = 1; version = 1;
} }
@ -235,10 +251,11 @@ namespace OpenSim.Capabilities.Handlers
llsdFolder.folder_id = invFolder.ID; llsdFolder.folder_id = invFolder.ID;
llsdFolder.parent_id = invFolder.ParentID; llsdFolder.parent_id = invFolder.ParentID;
llsdFolder.name = invFolder.Name; llsdFolder.name = invFolder.Name;
if (invFolder.Type < 0 || invFolder.Type >= TaskInventoryItem.Types.Length)
if (invFolder.Type == (short)AssetType.Unknown || !Enum.IsDefined(typeof(AssetType), (sbyte)invFolder.Type))
llsdFolder.type = "-1"; llsdFolder.type = "-1";
else else
llsdFolder.type = TaskInventoryItem.Types[invFolder.Type]; llsdFolder.type = Utils.AssetTypeToString((AssetType)invFolder.Type);
llsdFolder.preferred_type = "-1"; llsdFolder.preferred_type = "-1";
return llsdFolder; return llsdFolder;

View File

@ -565,7 +565,7 @@ namespace OpenSim.Framework.Console
/// </summary> /// </summary>
public class CommandConsole : ConsoleBase, ICommandConsole public class CommandConsole : ConsoleBase, ICommandConsole
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public ICommands Commands { get; private set; } public ICommands Commands { get; private set; }

View File

@ -40,63 +40,6 @@ namespace OpenSim.Framework
/// </summary> /// </summary>
private const uint FULL_MASK_PERMISSIONS_GENERAL = 2147483647; private const uint FULL_MASK_PERMISSIONS_GENERAL = 2147483647;
/// <summary>
/// Inventory types
/// </summary>
public static string[] InvTypes = new string[]
{
"texture",
"sound",
"calling_card",
"landmark",
String.Empty,
String.Empty,
"object",
"notecard",
String.Empty,
String.Empty,
"lsl_text",
String.Empty,
String.Empty,
"bodypart",
String.Empty,
"snapshot",
String.Empty,
String.Empty,
"wearable",
"animation",
"gesture"
};
/// <summary>
/// Asset types
/// </summary>
public static string[] Types = new string[]
{
"texture",
"sound",
"callcard",
"landmark",
"clothing", // Deprecated
"clothing",
"object",
"notecard",
"category",
"root",
"lsltext",
"lslbyte",
"txtr_tga",
"bodypart",
"trash",
"snapshot",
"lstndfnd",
"snd_wav",
"img_tga",
"jpeg",
"animatn",
"gesture"
};
private UUID _assetID = UUID.Zero; private UUID _assetID = UUID.Zero;
private uint _baseMask = FULL_MASK_PERMISSIONS_GENERAL; private uint _baseMask = FULL_MASK_PERMISSIONS_GENERAL;

View File

@ -294,7 +294,7 @@ namespace OpenSim.Framework
return result; return result;
} }
} }
catch (Exception e) catch
{ {
// don't need to treat this as an error... we're just guessing anyway // don't need to treat this as an error... we're just guessing anyway
// m_log.DebugFormat("[WEB UTIL] couldn't decode <{0}>: {1}",response,e.Message); // m_log.DebugFormat("[WEB UTIL] couldn't decode <{0}>: {1}",response,e.Message);

View File

@ -134,7 +134,6 @@ namespace OpenSim.Region.ClientStack.Linden
AddNewInventoryItem = m_Scene.AddUploadedInventoryItem; AddNewInventoryItem = m_Scene.AddUploadedInventoryItem;
ItemUpdatedCall = m_Scene.CapsUpdateInventoryItemAsset; ItemUpdatedCall = m_Scene.CapsUpdateInventoryItemAsset;
TaskScriptUpdatedCall = m_Scene.CapsUpdateTaskInventoryScriptAsset; TaskScriptUpdatedCall = m_Scene.CapsUpdateTaskInventoryScriptAsset;
CAPSFetchInventoryDescendents = m_Scene.HandleFetchInventoryDescendentsCAPS;
GetClient = m_Scene.SceneGraph.GetControllingClient; GetClient = m_Scene.SceneGraph.GetControllingClient;
} }

View File

@ -42,18 +42,25 @@ using OpenSim.Capabilities.Handlers;
namespace OpenSim.Region.ClientStack.Linden namespace OpenSim.Region.ClientStack.Linden
{ {
/// <summary>
/// This module implements both WebFetchInventoryDescendents and FetchInventoryDescendents2 capabilities.
/// </summary>
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class WebFetchInvDescModule : INonSharedRegionModule public class WebFetchInvDescModule : INonSharedRegionModule
{ {
private static readonly ILog m_log = // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Scene m_scene; private Scene m_scene;
private IInventoryService m_InventoryService; private IInventoryService m_InventoryService;
private ILibraryService m_LibraryService; private ILibraryService m_LibraryService;
private bool m_Enabled = false;
private string m_URL; private bool m_Enabled;
private string m_fetchInventoryDescendents2Url;
private string m_webFetchInventoryDescendentsUrl;
private WebFetchInvDescHandler m_webFetchHandler;
#region ISharedRegionModule Members #region ISharedRegionModule Members
@ -63,10 +70,13 @@ namespace OpenSim.Region.ClientStack.Linden
if (config == null) if (config == null)
return; return;
m_URL = config.GetString("Cap_WebFetchInventoryDescendents", string.Empty); m_fetchInventoryDescendents2Url = config.GetString("Cap_FetchInventoryDescendents2", string.Empty);
// Cap doesn't exist m_webFetchInventoryDescendentsUrl = config.GetString("Cap_WebFetchInventoryDescendents", string.Empty);
if (m_URL != string.Empty)
if (m_fetchInventoryDescendents2Url != string.Empty || m_webFetchInventoryDescendentsUrl != string.Empty)
{
m_Enabled = true; m_Enabled = true;
}
} }
public void AddRegion(Scene s) public void AddRegion(Scene s)
@ -91,8 +101,13 @@ namespace OpenSim.Region.ClientStack.Linden
if (!m_Enabled) if (!m_Enabled)
return; return;
m_InventoryService = m_scene.InventoryService; ; m_InventoryService = m_scene.InventoryService;
m_LibraryService = m_scene.LibraryService; m_LibraryService = m_scene.LibraryService;
// We'll reuse the same handler for all requests.
if (m_fetchInventoryDescendents2Url == "localhost" || m_webFetchInventoryDescendentsUrl == "localhost")
m_webFetchHandler = new WebFetchInvDescHandler(m_InventoryService, m_LibraryService);
m_scene.EventManager.OnRegisterCaps += RegisterCaps; m_scene.EventManager.OnRegisterCaps += RegisterCaps;
} }
@ -111,26 +126,38 @@ namespace OpenSim.Region.ClientStack.Linden
#endregion #endregion
public void RegisterCaps(UUID agentID, Caps caps) private void RegisterCaps(UUID agentID, Caps caps)
{ {
UUID capID = UUID.Random(); if (m_webFetchInventoryDescendentsUrl != "")
RegisterFetchCap(agentID, caps, "WebFetchInventoryDescendents", m_webFetchInventoryDescendentsUrl);
//caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture)); if (m_fetchInventoryDescendents2Url != "")
if (m_URL == "localhost") RegisterFetchCap(agentID, caps, "FetchInventoryDescendents2", m_fetchInventoryDescendents2Url);
}
private void RegisterFetchCap(UUID agentID, Caps caps, string capName, string url)
{
string capUrl;
if (url == "localhost")
{ {
m_log.InfoFormat("[WEBFETCHINVENTORYDESCENDANTS]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); capUrl = "/CAPS/" + UUID.Random();
WebFetchInvDescHandler webFetchHandler = new WebFetchInvDescHandler(m_InventoryService, m_LibraryService);
IRequestHandler reqHandler = new RestStreamHandler("POST", "/CAPS/" + UUID.Random(), webFetchHandler.FetchInventoryDescendentsRequest); IRequestHandler reqHandler
caps.RegisterHandler("WebFetchInventoryDescendents", reqHandler); = new RestStreamHandler("POST", capUrl, m_webFetchHandler.FetchInventoryDescendentsRequest);
// caps.RegisterHandler("FetchInventoryDescendents2", reqHandler);
caps.RegisterHandler(capName, reqHandler);
} }
else else
{ {
m_log.InfoFormat("[WEBFETCHINVENTORYDESCENDANTS]: {0} in region {1}", m_URL, m_scene.RegionInfo.RegionName); capUrl = url;
caps.RegisterHandler("WebFetchInventoryDescendents", m_URL);
// caps.RegisterHandler("FetchInventoryDescendents2", m_URL);
}
}
caps.RegisterHandler(capName, capUrl);
}
// m_log.DebugFormat(
// "[WEB FETCH INV DESC MODULE]: Registered capability {0} at {1} in region {2} for {3}",
// capName, capUrl, m_scene.RegionInfo.RegionName, agentID);
}
} }
} }

View File

@ -330,7 +330,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
} }
} }
public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs)
{ {
@ -484,6 +484,7 @@ namespace OpenSim.Region.Framework.Scenes
// can be handled transparently). // can be handled transparently).
InventoryFolderImpl fold = null; InventoryFolderImpl fold = null;
if (LibraryService != null && LibraryService.LibraryRootFolder != null) if (LibraryService != null && LibraryService.LibraryRootFolder != null)
{
if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null) if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null)
{ {
remoteClient.SendInventoryFolderDetails( remoteClient.SendInventoryFolderDetails(
@ -491,6 +492,7 @@ namespace OpenSim.Region.Framework.Scenes
fold.RequestListOfFolders(), fold.Version, fetchFolders, fetchItems); fold.RequestListOfFolders(), fold.Version, fetchFolders, fetchItems);
return; return;
} }
}
// We're going to send the reply async, because there may be // We're going to send the reply async, because there may be
// an enormous quantity of packets -- basically the entire inventory! // an enormous quantity of packets -- basically the entire inventory!
@ -511,64 +513,6 @@ namespace OpenSim.Region.Framework.Scenes
SendInventoryDelegate d = (SendInventoryDelegate)iar.AsyncState; SendInventoryDelegate d = (SendInventoryDelegate)iar.AsyncState;
d.EndInvoke(iar); d.EndInvoke(iar);
} }
/// <summary>
/// Handle the caps inventory descendents fetch.
///
/// Since the folder structure is sent to the client on login, I believe we only need to handle items.
/// Diva comment 8/13/2009: what if someone gave us a folder in the meantime??
/// </summary>
/// <param name="agentID"></param>
/// <param name="folderID"></param>
/// <param name="ownerID"></param>
/// <param name="fetchFolders"></param>
/// <param name="fetchItems"></param>
/// <param name="sortOrder"></param>
/// <returns>null if the inventory look up failed</returns>
public InventoryCollection HandleFetchInventoryDescendentsCAPS(UUID agentID, UUID folderID, UUID ownerID,
bool fetchFolders, bool fetchItems, int sortOrder, out int version)
{
m_log.DebugFormat(
"[INVENTORY CACHE]: Fetching folders ({0}), items ({1}) from {2} for agent {3}",
fetchFolders, fetchItems, folderID, agentID);
// FIXME MAYBE: We're not handling sortOrder!
// TODO: This code for looking in the folder for the library should be folded back into the
// CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc.
// can be handled transparently).
InventoryFolderImpl fold;
if (LibraryService != null && LibraryService.LibraryRootFolder != null)
if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null)
{
version = 0;
InventoryCollection ret = new InventoryCollection();
ret.Folders = new List<InventoryFolderBase>();
ret.Items = fold.RequestListOfItems();
return ret;
}
InventoryCollection contents = new InventoryCollection();
if (folderID != UUID.Zero)
{
contents = InventoryService.GetFolderContent(agentID, folderID);
InventoryFolderBase containingFolder = new InventoryFolderBase();
containingFolder.ID = folderID;
containingFolder.Owner = agentID;
containingFolder = InventoryService.GetFolder(containingFolder);
version = containingFolder.Version;
}
else
{
// Lost itemsm don't really need a version
version = 1;
}
return contents;
}
/// <summary> /// <summary>
/// Handle an inventory folder creation request from the client. /// Handle an inventory folder creation request from the client.
@ -643,14 +587,13 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
delegate void PurgeFolderDelegate(UUID userID, UUID folder);
/// <summary> /// <summary>
/// This should delete all the items and folders in the given directory. /// This should delete all the items and folders in the given directory.
/// </summary> /// </summary>
/// <param name="remoteClient"></param> /// <param name="remoteClient"></param>
/// <param name="folderID"></param> /// <param name="folderID"></param>
delegate void PurgeFolderDelegate(UUID userID, UUID folder);
public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID) public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID)
{ {
PurgeFolderDelegate d = PurgeFolderAsync; PurgeFolderDelegate d = PurgeFolderAsync;
@ -664,7 +607,6 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
private void PurgeFolderAsync(UUID userID, UUID folderID) private void PurgeFolderAsync(UUID userID, UUID folderID)
{ {
InventoryFolderBase folder = new InventoryFolderBase(folderID, userID); InventoryFolderBase folder = new InventoryFolderBase(folderID, userID);

View File

@ -832,8 +832,8 @@ namespace OpenSim.Region.Framework.Scenes
invString.AddSectionEnd(); invString.AddSectionEnd();
invString.AddNameValueLine("asset_id", item.AssetID.ToString()); invString.AddNameValueLine("asset_id", item.AssetID.ToString());
invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]); invString.AddNameValueLine("type", Utils.AssetTypeToString((AssetType)item.Type));
invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]); invString.AddNameValueLine("inv_type", Utils.InventoryTypeToString((InventoryType)item.InvType));
invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags)); invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags));
invString.AddSaleStart(); invString.AddSaleStart();

View File

@ -56,7 +56,7 @@ namespace OpenSim.Region.Physics.Manager
public abstract class PhysicsScene public abstract class PhysicsScene
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
/// <summary> /// <summary>
/// Name of this scene. Useful in debug messages to distinguish one OdeScene instance from another. /// Name of this scene. Useful in debug messages to distinguish one OdeScene instance from another.

View File

@ -86,7 +86,7 @@ namespace OpenSim.Region.Physics.OdePlugin
private float CAPSULE_RADIUS = 0.37f; private float CAPSULE_RADIUS = 0.37f;
private float CAPSULE_LENGTH = 2.140599f; private float CAPSULE_LENGTH = 2.140599f;
private float m_tensor = 3800000f; private float m_tensor = 3800000f;
private float heightFudgeFactor = 0.52f; // private float heightFudgeFactor = 0.52f;
private float walkDivisor = 1.3f; private float walkDivisor = 1.3f;
private float runDivisor = 0.8f; private float runDivisor = 0.8f;
private bool flying = false; private bool flying = false;
@ -149,7 +149,7 @@ namespace OpenSim.Region.Physics.OdePlugin
public OdeCharacter( public OdeCharacter(
String avName, OdeScene parent_scene, Vector3 pos, Vector3 size, float pid_d, float pid_p, String avName, OdeScene parent_scene, Vector3 pos, Vector3 size, float pid_d, float pid_p,
float capsule_radius, float tensor, float density, float height_fudge_factor, float capsule_radius, float tensor, float density,
float walk_divisor, float rundivisor) float walk_divisor, float rundivisor)
{ {
m_uuid = UUID.Random(); m_uuid = UUID.Random();
@ -187,7 +187,7 @@ namespace OpenSim.Region.Physics.OdePlugin
CAPSULE_RADIUS = capsule_radius; CAPSULE_RADIUS = capsule_radius;
m_tensor = tensor; m_tensor = tensor;
m_density = density; m_density = density;
heightFudgeFactor = height_fudge_factor; // heightFudgeFactor = height_fudge_factor;
walkDivisor = walk_divisor; walkDivisor = walk_divisor;
runDivisor = rundivisor; runDivisor = rundivisor;

View File

@ -156,7 +156,7 @@ namespace OpenSim.Region.Physics.OdePlugin
private bool avCapsuleTilted = true; // true = old compatibility mode with leaning capsule; false = new corrected mode private bool avCapsuleTilted = true; // true = old compatibility mode with leaning capsule; false = new corrected mode
public bool IsAvCapsuleTilted { get { return avCapsuleTilted; } set { avCapsuleTilted = value; } } public bool IsAvCapsuleTilted { get { return avCapsuleTilted; } set { avCapsuleTilted = value; } }
private float avDensity = 80f; private float avDensity = 80f;
private float avHeightFudgeFactor = 0.52f; // private float avHeightFudgeFactor = 0.52f;
private float avMovementDivisorWalk = 1.3f; private float avMovementDivisorWalk = 1.3f;
private float avMovementDivisorRun = 0.8f; private float avMovementDivisorRun = 0.8f;
private float minimumGroundFlightOffset = 3f; private float minimumGroundFlightOffset = 3f;
@ -316,7 +316,7 @@ namespace OpenSim.Region.Physics.OdePlugin
private int m_physicsiterations = 10; private int m_physicsiterations = 10;
private const float m_SkipFramesAtms = 0.40f; // Drop frames gracefully at a 400 ms lag private const float m_SkipFramesAtms = 0.40f; // Drop frames gracefully at a 400 ms lag
private readonly PhysicsActor PANull = new NullPhysicsActor(); private readonly PhysicsActor PANull = new NullPhysicsActor();
private float step_time = 0.0f; // private float step_time = 0.0f;
//Ckrinke: Comment out until used. We declare it, initialize it, but do not use it //Ckrinke: Comment out until used. We declare it, initialize it, but do not use it
//Ckrinke private int ms = 0; //Ckrinke private int ms = 0;
public IntPtr world; public IntPtr world;
@ -479,7 +479,7 @@ namespace OpenSim.Region.Physics.OdePlugin
m_physicsiterations = physicsconfig.GetInt("world_internal_steps_without_collisions", 10); m_physicsiterations = physicsconfig.GetInt("world_internal_steps_without_collisions", 10);
avDensity = physicsconfig.GetFloat("av_density", 80f); avDensity = physicsconfig.GetFloat("av_density", 80f);
avHeightFudgeFactor = physicsconfig.GetFloat("av_height_fudge_factor", 0.52f); // avHeightFudgeFactor = physicsconfig.GetFloat("av_height_fudge_factor", 0.52f);
avMovementDivisorWalk = physicsconfig.GetFloat("av_movement_divisor_walk", 1.3f); avMovementDivisorWalk = physicsconfig.GetFloat("av_movement_divisor_walk", 1.3f);
avMovementDivisorRun = physicsconfig.GetFloat("av_movement_divisor_run", 0.8f); avMovementDivisorRun = physicsconfig.GetFloat("av_movement_divisor_run", 0.8f);
avCapRadius = physicsconfig.GetFloat("av_capsule_radius", 0.37f); avCapRadius = physicsconfig.GetFloat("av_capsule_radius", 0.37f);
@ -1706,7 +1706,7 @@ namespace OpenSim.Region.Physics.OdePlugin
OdeCharacter newAv OdeCharacter newAv
= new OdeCharacter( = new OdeCharacter(
avName, this, pos, size, avPIDD, avPIDP, avName, this, pos, size, avPIDD, avPIDP,
avCapRadius, avStandupTensor, avDensity, avHeightFudgeFactor, avCapRadius, avStandupTensor, avDensity,
avMovementDivisorWalk, avMovementDivisorRun); avMovementDivisorWalk, avMovementDivisorRun);
newAv.Flying = isFlying; newAv.Flying = isFlying;

View File

@ -140,7 +140,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
List<SenseRepeatClass> NewSensors = new List<SenseRepeatClass>(); List<SenseRepeatClass> NewSensors = new List<SenseRepeatClass>();
foreach (SenseRepeatClass ts in SenseRepeaters) foreach (SenseRepeatClass ts in SenseRepeaters)
{ {
if (ts.localID != m_localID && ts.itemID != m_itemID) if (ts.localID != m_localID || ts.itemID != m_itemID)
{ {
NewSensors.Add(ts); NewSensors.Add(ts);
} }

View File

@ -55,7 +55,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
{ {
public class ScriptInstance : MarshalByRefObject, IScriptInstance public class ScriptInstance : MarshalByRefObject, IScriptInstance
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private IScriptEngine m_Engine; private IScriptEngine m_Engine;
private IScriptWorkItem m_CurrentResult = null; private IScriptWorkItem m_CurrentResult = null;

View File

@ -507,8 +507,7 @@
; silly vanity "Facelights" dead. Sorry, head mounted miner's lamps ; silly vanity "Facelights" dead. Sorry, head mounted miner's lamps
; will also be affected. ; will also be affected.
; ;
;DisableFacelights = "false" ;DisableFacelights = "false(1815)
[ClientStack.LindenCaps] [ClientStack.LindenCaps]
;; Long list of capabilities taken from ;; Long list of capabilities taken from
@ -574,11 +573,14 @@
Cap_UploadObjectAsset = "localhost" Cap_UploadObjectAsset = "localhost"
Cap_ViewerStartAuction = "" Cap_ViewerStartAuction = ""
Cap_ViewerStats = "" Cap_ViewerStats = ""
; This last one is supported by OpenSim, but may
; lead to poor sim performance if served by the simulators,
; so it is disabled by default.
Cap_WebFetchInventoryDescendents = ""
; The fetch inventory descendents caps are supported by OpenSim, but may
; lead to poor sim performance if served by the simulators,
; so they are disabled by default.
; FetchInventoryDescendents2 is the one used in the latest Linden Lab viewers (from some point in the v2 series and above)
Cap_WebFetchInventoryDescendents = ""
Cap_FetchInventoryDescendents2 = ""
[Chat] [Chat]
; Controls whether the chat module is enabled. Default is true. ; Controls whether the chat module is enabled. Default is true.
@ -722,7 +724,8 @@
av_density = 80 av_density = 80
; use this value to cut 52% of the height the sim gives us ; use this value to cut 52% of the height the sim gives us
av_height_fudge_factor = 0.52 ; Currently unused
; av_height_fudge_factor = 0.52
; Movement. Smaller is faster. ; Movement. Smaller is faster.