mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs OpenSim/Services/LLLoginService/LLLoginResponse.cs OpenSim/Services/LLLoginService/LLLoginService.cs
This commit is contained in:
@@ -1664,6 +1664,75 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_host.SetFaceColorAlpha(face, color, null);
|
||||
}
|
||||
|
||||
/*
|
||||
public void llSetContentType(LSL_Key id, LSL_Integer type)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
if (m_UrlModule == null)
|
||||
return;
|
||||
|
||||
// Make sure the content type is text/plain to start with
|
||||
m_UrlModule.HttpContentType(new UUID(id), "text/plain");
|
||||
|
||||
// Is the object owner online and in the region
|
||||
ScenePresence agent = World.GetScenePresence(m_host.ParentGroup.OwnerID);
|
||||
if (agent == null || agent.IsChildAgent)
|
||||
return; // Fail if the owner is not in the same region
|
||||
|
||||
// Is it the embeded browser?
|
||||
string userAgent = m_UrlModule.GetHttpHeader(new UUID(id), "user-agent");
|
||||
if (userAgent.IndexOf("SecondLife") < 0)
|
||||
return; // Not the embedded browser. Is this check good enough?
|
||||
|
||||
// Use the IP address of the client and check against the request
|
||||
// seperate logins from the same IP will allow all of them to get non-text/plain as long
|
||||
// as the owner is in the region. Same as SL!
|
||||
string logonFromIPAddress = agent.ControllingClient.RemoteEndPoint.Address.ToString();
|
||||
string requestFromIPAddress = m_UrlModule.GetHttpHeader(new UUID(id), "remote_addr");
|
||||
//m_log.Debug("IP from header='" + requestFromIPAddress + "' IP from endpoint='" + logonFromIPAddress + "'");
|
||||
if (requestFromIPAddress == null || requestFromIPAddress.Trim() == "")
|
||||
return;
|
||||
if (logonFromIPAddress == null || logonFromIPAddress.Trim() == "")
|
||||
return;
|
||||
|
||||
// If the request isnt from the same IP address then the request cannot be from the owner
|
||||
if (!requestFromIPAddress.Trim().Equals(logonFromIPAddress.Trim()))
|
||||
return;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case ScriptBaseClass.CONTENT_TYPE_HTML:
|
||||
m_UrlModule.HttpContentType(new UUID(id), "text/html");
|
||||
break;
|
||||
case ScriptBaseClass.CONTENT_TYPE_XML:
|
||||
m_UrlModule.HttpContentType(new UUID(id), "application/xml");
|
||||
break;
|
||||
case ScriptBaseClass.CONTENT_TYPE_XHTML:
|
||||
m_UrlModule.HttpContentType(new UUID(id), "application/xhtml+xml");
|
||||
break;
|
||||
case ScriptBaseClass.CONTENT_TYPE_ATOM:
|
||||
m_UrlModule.HttpContentType(new UUID(id), "application/atom+xml");
|
||||
break;
|
||||
case ScriptBaseClass.CONTENT_TYPE_JSON:
|
||||
m_UrlModule.HttpContentType(new UUID(id), "application/json");
|
||||
break;
|
||||
case ScriptBaseClass.CONTENT_TYPE_LLSD:
|
||||
m_UrlModule.HttpContentType(new UUID(id), "application/llsd+xml");
|
||||
break;
|
||||
case ScriptBaseClass.CONTENT_TYPE_FORM:
|
||||
m_UrlModule.HttpContentType(new UUID(id), "application/x-www-form-urlencoded");
|
||||
break;
|
||||
case ScriptBaseClass.CONTENT_TYPE_RSS:
|
||||
m_UrlModule.HttpContentType(new UUID(id), "application/rss+xml");
|
||||
break;
|
||||
default:
|
||||
m_UrlModule.HttpContentType(new UUID(id), "text/plain");
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
public void SetTexGen(SceneObjectPart part, int face,int style)
|
||||
{
|
||||
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
|
||||
@@ -5117,13 +5186,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return new LSL_Rotation(x,y,z,s);
|
||||
}
|
||||
|
||||
|
||||
// Xantor 29/apr/2008
|
||||
// converts a Quaternion to X,Y,Z axis rotations
|
||||
/// <summary>
|
||||
/// Returns the axis of rotation for a quaternion
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <param name='rot'></param>
|
||||
public LSL_Vector llRot2Axis(LSL_Rotation rot)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
double x, y, z;
|
||||
|
||||
if (Math.Abs(rot.s) > 1) // normalization needed
|
||||
rot.Normalize();
|
||||
@@ -8238,7 +8308,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return null;
|
||||
|
||||
string ph = rules.Data[idx++].ToString();
|
||||
parentgrp.ScriptSetPhantomStatus(ph.Equals("1"));
|
||||
part.ParentGroup.ScriptSetPhantomStatus(ph.Equals("1"));
|
||||
|
||||
break;
|
||||
|
||||
@@ -8291,7 +8361,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return null;
|
||||
string temp = rules.Data[idx++].ToString();
|
||||
|
||||
parentgrp.ScriptSetTemporaryStatus(temp.Equals("1"));
|
||||
part.ParentGroup.ScriptSetTemporaryStatus(temp.Equals("1"));
|
||||
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user