mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 03:06:05 +08:00
Merge branch '0.6.9-post-fixes' into careminster
This commit is contained in:
@@ -69,7 +69,7 @@ namespace OpenSim.Framework
|
||||
private static UUID HAIR_ASSET = new UUID("d342e6c0-b9d2-11dc-95ff-0800200c9a66");
|
||||
private static UUID HAIR_ITEM = new UUID("d342e6c1-b9d2-11dc-95ff-0800200c9a66");
|
||||
|
||||
public readonly static int VISUALPARAM_COUNT = 218;
|
||||
public readonly static int VISUALPARAM_COUNT = 218;
|
||||
|
||||
protected UUID m_owner;
|
||||
|
||||
@@ -361,7 +361,7 @@ namespace OpenSim.Framework
|
||||
// This sets Visual Params with *less* weirder values then default. Instead of a ugly alien, it looks like a fat scientist
|
||||
SetDefaultParams(m_visualparams);
|
||||
SetDefaultWearables();
|
||||
m_texture = GetDefaultTexture();
|
||||
m_texture = GetDefaultTexture();
|
||||
}
|
||||
|
||||
public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, byte[] visualParams)
|
||||
@@ -390,11 +390,12 @@ namespace OpenSim.Framework
|
||||
+ 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height
|
||||
+ 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height
|
||||
+ 0.076f * (float)m_visualparams[(int)VPElement.SHAPE_NECK_LENGTH] / 255.0f; // Neck length
|
||||
m_hipOffset = (0.615385f // Half of avatar
|
||||
m_hipOffset = (((1.23077f // Half of avatar
|
||||
+ 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height
|
||||
+ 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f // Leg length
|
||||
+ 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height
|
||||
+ 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height
|
||||
+ 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f // Leg length
|
||||
- m_avatarHeight / 2) * 0.3f - 0.04f;
|
||||
) / 2) - m_avatarHeight / 2) * 0.31f - 0.0425f;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace OpenSim.Framework.Console
|
||||
{
|
||||
/// <summary>
|
||||
/// A console that uses cursor control and color
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
public class LocalConsole : CommandConsole
|
||||
{
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
@@ -100,8 +100,8 @@ namespace OpenSim.Framework.Console
|
||||
private int SetCursorTop(int top)
|
||||
{
|
||||
// From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try
|
||||
// to set a cursor row position with a currently invalid column, mono will throw an exception.
|
||||
// Therefore, we need to make sure that the column position is valid first.
|
||||
// to set a cursor row position with a currently invalid column, mono will throw an exception.
|
||||
// Therefore, we need to make sure that the column position is valid first.
|
||||
int left = System.Console.CursorLeft;
|
||||
|
||||
if (left < 0)
|
||||
@@ -129,12 +129,12 @@ namespace OpenSim.Framework.Console
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// The new cursor column.
|
||||
/// </returns>
|
||||
/// </returns>
|
||||
private int SetCursorLeft(int left)
|
||||
{
|
||||
// From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try
|
||||
// to set a cursor column position with a currently invalid row, mono will throw an exception.
|
||||
// Therefore, we need to make sure that the row position is valid first.
|
||||
// to set a cursor column position with a currently invalid row, mono will throw an exception.
|
||||
// Therefore, we need to make sure that the row position is valid first.
|
||||
int top = System.Console.CursorTop;
|
||||
|
||||
if (top < 0)
|
||||
@@ -183,7 +183,7 @@ namespace OpenSim.Framework.Console
|
||||
System.Console.Write("{0}", prompt);
|
||||
|
||||
SetCursorTop(new_y);
|
||||
SetCursorLeft(new_x);
|
||||
SetCursorLeft(new_x);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -302,9 +302,9 @@ namespace OpenSim.Framework.Console
|
||||
if (!UUID.TryParse(post["ID"].ToString(), out id))
|
||||
return reply;
|
||||
|
||||
lock(m_Connections)
|
||||
lock (m_Connections)
|
||||
{
|
||||
if(!m_Connections.ContainsKey(id))
|
||||
if (!m_Connections.ContainsKey(id))
|
||||
return reply;
|
||||
}
|
||||
|
||||
|
||||
@@ -152,6 +152,8 @@ namespace OpenSim.Framework
|
||||
|
||||
public delegate void AgentSit(IClientAPI remoteClient, UUID agentID);
|
||||
|
||||
public delegate void LandUndo(IClientAPI remoteClient);
|
||||
|
||||
public delegate void AvatarPickerRequest(IClientAPI remoteClient, UUID agentdata, UUID queryID, string UserQuery);
|
||||
|
||||
public delegate void GrabObject(
|
||||
@@ -419,9 +421,9 @@ namespace OpenSim.Framework
|
||||
public delegate void AcceptCallingCard(IClientAPI remoteClient, UUID transactionID, UUID folderID);
|
||||
|
||||
public delegate void DeclineCallingCard(IClientAPI remoteClient, UUID transactionID);
|
||||
|
||||
|
||||
public delegate void SoundTrigger(
|
||||
UUID soundId, UUID ownerid, UUID objid, UUID parentid, double Gain, Vector3 Position, UInt64 Handle);
|
||||
UUID soundId, UUID ownerid, UUID objid, UUID parentid, double Gain, Vector3 Position, UInt64 Handle, float radius);
|
||||
|
||||
public delegate void StartLure(byte lureType, string message, UUID targetID, IClientAPI client);
|
||||
public delegate void TeleportLureRequest(UUID lureID, uint teleportFlags, IClientAPI client);
|
||||
@@ -988,6 +990,8 @@ namespace OpenSim.Framework
|
||||
event ScriptAnswer OnScriptAnswer;
|
||||
|
||||
event AgentSit OnUndo;
|
||||
event AgentSit OnRedo;
|
||||
event LandUndo OnLandUndo;
|
||||
|
||||
event ForceReleaseControls OnForceReleaseControls;
|
||||
event GodLandStatRequest OnLandStatRequest;
|
||||
|
||||
@@ -358,6 +358,32 @@ namespace OpenSim.Framework
|
||||
}
|
||||
}
|
||||
|
||||
private int[] _mediaSize = new int[2];
|
||||
public int[] MediaSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return _mediaSize;
|
||||
}
|
||||
set
|
||||
{
|
||||
_mediaSize = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string _mediaType = "";
|
||||
public string MediaType
|
||||
{
|
||||
get
|
||||
{
|
||||
return _mediaType;
|
||||
}
|
||||
set
|
||||
{
|
||||
_mediaType = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// URL to the shoutcast music stream to play on the parcel
|
||||
/// </summary>
|
||||
|
||||
@@ -186,6 +186,40 @@ namespace OpenSim.Framework
|
||||
PCode = (byte)PCodeEnum.Primitive;
|
||||
ExtraParams = new byte[1];
|
||||
m_textureEntry = DEFAULT_TEXTURE;
|
||||
}
|
||||
|
||||
public PrimitiveBaseShape(Primitive prim)
|
||||
{
|
||||
PCode = (byte)prim.PrimData.PCode;
|
||||
ExtraParams = new byte[1];
|
||||
|
||||
State = prim.PrimData.State;
|
||||
PathBegin = Primitive.PackBeginCut(prim.PrimData.PathBegin);
|
||||
PathEnd = Primitive.PackEndCut(prim.PrimData.PathEnd);
|
||||
PathScaleX = Primitive.PackPathScale(prim.PrimData.PathScaleX);
|
||||
PathScaleY = Primitive.PackPathScale(prim.PrimData.PathScaleY);
|
||||
PathShearX = (byte)Primitive.PackPathShear(prim.PrimData.PathShearX);
|
||||
PathShearY = (byte)Primitive.PackPathShear(prim.PrimData.PathShearY);
|
||||
PathSkew = Primitive.PackPathTwist(prim.PrimData.PathSkew);
|
||||
ProfileBegin = Primitive.PackBeginCut(prim.PrimData.ProfileBegin);
|
||||
ProfileEnd = Primitive.PackEndCut(prim.PrimData.ProfileEnd);
|
||||
Scale = prim.Scale;
|
||||
PathCurve = (byte)prim.PrimData.PathCurve;
|
||||
ProfileCurve = (byte)prim.PrimData.ProfileCurve;
|
||||
ProfileHollow = Primitive.PackProfileHollow(prim.PrimData.ProfileHollow);
|
||||
PathRadiusOffset = Primitive.PackPathTwist(prim.PrimData.PathRadiusOffset);
|
||||
PathRevolutions = Primitive.PackPathRevolutions(prim.PrimData.PathRevolutions);
|
||||
PathTaperX = Primitive.PackPathTaper(prim.PrimData.PathTaperX);
|
||||
PathTaperY = Primitive.PackPathTaper(prim.PrimData.PathTaperY);
|
||||
PathTwist = Primitive.PackPathTwist(prim.PrimData.PathTwist);
|
||||
PathTwistBegin = Primitive.PackPathTwist(prim.PrimData.PathTwistBegin);
|
||||
|
||||
m_textureEntry = prim.Textures.GetBytes();
|
||||
|
||||
SculptEntry = (prim.Sculpt.Type != OpenMetaverse.SculptType.None);
|
||||
SculptData = prim.Sculpt.GetBytes();
|
||||
SculptTexture = prim.Sculpt.SculptTexture;
|
||||
SculptType = (byte)prim.Sculpt.Type;
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
|
||||
@@ -790,7 +790,6 @@ namespace OpenSim.Framework
|
||||
else
|
||||
m_externalHostName = externalName;
|
||||
|
||||
|
||||
// Master avatar cruft
|
||||
//
|
||||
string masterAvatarUUID;
|
||||
|
||||
@@ -589,11 +589,17 @@ namespace OpenSim.Framework
|
||||
|
||||
public static IPAddress GetLocalHost()
|
||||
{
|
||||
string dnsAddress = "localhost";
|
||||
IPAddress[] iplist = GetLocalHosts();
|
||||
|
||||
IPAddress[] hosts = Dns.GetHostEntry(dnsAddress).AddressList;
|
||||
if (iplist.Length == 0) // No accessible external interfaces
|
||||
{
|
||||
IPAddress[] loopback = Dns.GetHostAddresses("localhost");
|
||||
IPAddress localhost = loopback[0];
|
||||
|
||||
foreach (IPAddress host in hosts)
|
||||
return localhost;
|
||||
}
|
||||
|
||||
foreach (IPAddress host in iplist)
|
||||
{
|
||||
if (!IPAddress.IsLoopback(host) && host.AddressFamily == AddressFamily.InterNetwork)
|
||||
{
|
||||
@@ -601,15 +607,15 @@ namespace OpenSim.Framework
|
||||
}
|
||||
}
|
||||
|
||||
if (hosts.Length > 0)
|
||||
if (iplist.Length > 0)
|
||||
{
|
||||
foreach (IPAddress host in hosts)
|
||||
foreach (IPAddress host in iplist)
|
||||
{
|
||||
if (host.AddressFamily == AddressFamily.InterNetwork)
|
||||
return host;
|
||||
}
|
||||
// Well all else failed...
|
||||
return hosts[0];
|
||||
return iplist[0];
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user