Formatting cleanup.
parent
aec16c2a0a
commit
a1786d4c39
|
@ -1849,16 +1849,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
|
||||
ScriptSleep(200);
|
||||
}
|
||||
|
||||
// Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos)
|
||||
// note linked setpos is capped "differently"
|
||||
private LSL_Vector SetPosAdjust(LSL_Vector start, LSL_Vector end)
|
||||
{
|
||||
if ( llVecDist(start, end) > 10.0f * m_ScriptDistanceFactor ) {
|
||||
if (llVecDist(start, end) > 10.0f * m_ScriptDistanceFactor)
|
||||
return start + m_ScriptDistanceFactor * 10.0f * llVecNorm(end - start);
|
||||
} else {
|
||||
else
|
||||
return end;
|
||||
}
|
||||
}
|
||||
|
||||
protected void SetPos(SceneObjectPart part, LSL_Vector targetPos)
|
||||
{
|
||||
// Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos)
|
||||
|
@ -1867,13 +1868,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
float ground = World.GetGroundHeight((float)targetPos.x, (float)targetPos.y);
|
||||
bool disable_underground_movement = m_ScriptEngine.Config.GetBoolean("DisableUndergroundMovement", true);
|
||||
|
||||
|
||||
if (part.ParentGroup == null)
|
||||
{
|
||||
if ((targetPos.z < ground) && disable_underground_movement)
|
||||
targetPos.z = ground;
|
||||
LSL_Vector real_vec = SetPosAdjust(currentPos, targetPos);
|
||||
part.UpdateOffSet(new Vector3((float)real_vec.x, (float)real_vec.y, (float)real_vec.z)); }
|
||||
part.UpdateOffSet(new Vector3((float)real_vec.x, (float)real_vec.y, (float)real_vec.z));
|
||||
}
|
||||
else if (part.ParentGroup.RootPart == part)
|
||||
{
|
||||
if ((targetPos.z < ground) && disable_underground_movement)
|
||||
|
@ -2072,7 +2073,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
m_host.ApplyAngularImpulse(new Vector3((float)force.x, (float)force.y, (float)force.z), local != 0);
|
||||
|
||||
}
|
||||
|
||||
public void llSetTorque(LSL_Vector torque, int local)
|
||||
|
@ -2512,8 +2512,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
return 0;
|
||||
}
|
||||
|
||||
bool result
|
||||
= money.ObjectGiveMoney(
|
||||
bool result = money.ObjectGiveMoney(
|
||||
m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount);
|
||||
|
||||
if (result)
|
||||
|
@ -3859,8 +3858,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
if (presence != null)
|
||||
{
|
||||
// agent must be over the owners land
|
||||
if (m_host.OwnerID
|
||||
== World.LandChannel.GetLandObject(
|
||||
if (m_host.OwnerID == World.LandChannel.GetLandObject(
|
||||
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID)
|
||||
{
|
||||
presence.ControllingClient.SendTeleportLocationStart();
|
||||
|
@ -3991,7 +3989,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
Vector3 PusheePos = Vector3.Zero;
|
||||
SceneObjectPart pusheeob = null;
|
||||
|
||||
|
||||
ScenePresence avatar = World.GetScenePresence(targetID);
|
||||
if (avatar != null)
|
||||
{
|
||||
|
@ -5397,8 +5394,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
if (presence != null)
|
||||
{
|
||||
// agent must be over the owners land
|
||||
if (m_host.OwnerID
|
||||
== World.LandChannel.GetLandObject(
|
||||
if (m_host.OwnerID == World.LandChannel.GetLandObject(
|
||||
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID)
|
||||
World.TeleportClientHome(agentId, presence.ControllingClient);
|
||||
}
|
||||
|
@ -5514,7 +5510,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
|
||||
/// <summary>
|
||||
/// According to http://lslwiki.net/lslwiki/wakka.php?wakka=llGetAgentSize
|
||||
/// only the height of avatars vary and that says:-
|
||||
/// only the height of avatars vary and that says:
|
||||
/// Width (x) and depth (y) are constant. (0.45m and 0.6m respectively).
|
||||
/// </summary>
|
||||
public LSL_Vector llGetAgentSize(string id)
|
||||
|
@ -7358,10 +7354,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
// vector tapera
|
||||
res.Add(new LSL_Vector(Shape.PathTaperX / 100.0, Shape.PathTaperY / 100.0, 0));
|
||||
|
||||
// float revolutions,
|
||||
// float revolutions
|
||||
res.Add(new LSL_Float(Shape.PathRevolutions / 50.0)); // needs fixing :(
|
||||
|
||||
// float radiusoffset,
|
||||
// float radiusoffset
|
||||
res.Add(new LSL_Float(Shape.PathRadiusOffset / 100.0));
|
||||
|
||||
// float skew
|
||||
|
@ -9012,8 +9008,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
IConfigSource config = m_ScriptEngine.ConfigSource;
|
||||
if (config.Configs["Network"] != null)
|
||||
{
|
||||
shard
|
||||
= config.Configs["Network"].GetString(
|
||||
shard = config.Configs["Network"].GetString(
|
||||
"user_server_url", "http://127.0.0.1:" + ConfigSettings.DefaultUserServerHttpPort.ToString());
|
||||
shard = config.Configs["Network"].GetString("shard", shard);
|
||||
}
|
||||
|
@ -9512,15 +9507,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
string data = enc.GetString(a.Data);
|
||||
//m_log.Debug(data);
|
||||
NotecardCache.Cache(id, data);
|
||||
AsyncCommands.
|
||||
DataserverPlugin.DataserverReply(id.ToString(),
|
||||
AsyncCommands.DataserverPlugin.DataserverReply(id.ToString(),
|
||||
NotecardCache.GetLine(id, line, m_notecardLineReadCharsMax));
|
||||
});
|
||||
|
||||
ConditionalScriptSleep(100);
|
||||
return tid.ToString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class NotecardCache
|
||||
|
|
Loading…
Reference in New Issue