Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
204c05974f
|
@ -319,6 +319,13 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
OSHttpRequest req = new OSHttpRequest(context, request);
|
OSHttpRequest req = new OSHttpRequest(context, request);
|
||||||
OSHttpResponse resp = new OSHttpResponse(new HttpResponse(context, request),context);
|
OSHttpResponse resp = new OSHttpResponse(new HttpResponse(context, request),context);
|
||||||
HandleRequest(req, resp);
|
HandleRequest(req, resp);
|
||||||
|
|
||||||
|
// !!!HACK ALERT!!!
|
||||||
|
// There seems to be a bug in the underlying http code that makes subsequent requests
|
||||||
|
// come up with trash in Accept headers. Until that gets fixed, we're cleaning them up here.
|
||||||
|
if (request.AcceptTypes != null)
|
||||||
|
for (int i = 0; i < request.AcceptTypes.Length; i++)
|
||||||
|
request.AcceptTypes[i] = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public void ConvertIHttpClientContextToOSHttp(object stateinfo)
|
// public void ConvertIHttpClientContextToOSHttp(object stateinfo)
|
||||||
|
|
|
@ -1929,7 +1929,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
protected void SetPos(SceneObjectPart part, LSL_Vector targetPos)
|
protected void SetPos(SceneObjectPart part, LSL_Vector targetPos)
|
||||||
{
|
{
|
||||||
// Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos)
|
// Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos)
|
||||||
LSL_Vector currentPos = llGetLocalPos();
|
LSL_Vector currentPos = GetPartLocalPos(part);
|
||||||
|
|
||||||
float ground = World.GetGroundHeight((float)targetPos.x, (float)targetPos.y);
|
float ground = World.GetGroundHeight((float)targetPos.x, (float)targetPos.y);
|
||||||
bool disable_underground_movement = m_ScriptEngine.Config.GetBoolean("DisableUndergroundMovement", true);
|
bool disable_underground_movement = m_ScriptEngine.Config.GetBoolean("DisableUndergroundMovement", true);
|
||||||
|
@ -1962,17 +1962,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public LSL_Vector llGetLocalPos()
|
public LSL_Vector llGetLocalPos()
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
if (m_host.ParentID != 0)
|
return GetPartLocalPos(m_host);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected LSL_Vector GetPartLocalPos(SceneObjectPart part)
|
||||||
{
|
{
|
||||||
return new LSL_Vector(m_host.OffsetPosition.X,
|
m_host.AddScriptLPS(1);
|
||||||
m_host.OffsetPosition.Y,
|
if (part.ParentID != 0)
|
||||||
m_host.OffsetPosition.Z);
|
{
|
||||||
|
return new LSL_Vector(part.OffsetPosition.X,
|
||||||
|
part.OffsetPosition.Y,
|
||||||
|
part.OffsetPosition.Z);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return new LSL_Vector(m_host.AbsolutePosition.X,
|
return new LSL_Vector(part.AbsolutePosition.X,
|
||||||
m_host.AbsolutePosition.Y,
|
part.AbsolutePosition.Y,
|
||||||
m_host.AbsolutePosition.Z);
|
part.AbsolutePosition.Z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue