From: chris yeoh <yeohc@au1.ibm.com>
Attached is a patch for LLGround which was just plain broken and could cause a runtime error. It now returns valid data with valid input (ie the offset does not take the position off the edge of the sim), but a runtime error will occur if invalid data is given. On invalid data the LL servers return the ground height based on a valid point closest to the effective position calculated using the supplied offset. Is the OpenSim convention to replicate the LL servers as closely as possible? If so I can submit an additional patch to replicate the LL behaviour.0.6.0-stable
parent
47c2bd2b95
commit
7d525843d0
|
@ -937,8 +937,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
public LSL_Float llGround(LSL_Vector offset)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
int x = (int)(m_host.OffsetPosition.X + offset.x);
|
||||
int y = (int)(m_host.OffsetPosition.Y + offset.y);
|
||||
Vector3 pos = m_host.GetWorldPosition();
|
||||
int x = (int)(pos.X + offset.x);
|
||||
int y = (int)(pos.Y + offset.y);
|
||||
return World.GetLandHeight(x, y);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue