Revert "refactoring to allow Scene.GetLandData to accept Vector3 as an argument. Note that the prior work on LSL_Vector implicit operators means one does not need to explicitly cast a LSL_Vector to Vector3"
This reverts commit f8612b0d1b
.
0.7.4-extended
parent
44699b07e4
commit
2226dd1efb
|
@ -4303,16 +4303,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return LandChannel.GetLandObject(x, y).LandData;
|
return LandChannel.GetLandObject(x, y).LandData;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Get LandData by position.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="pos"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public LandData GetLandData(Vector3 pos)
|
|
||||||
{
|
|
||||||
return GetLandData(pos.X, pos.Y);
|
|
||||||
}
|
|
||||||
|
|
||||||
public LandData GetLandData(uint x, uint y)
|
public LandData GetLandData(uint x, uint y)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[SCENE]: returning land for {0},{1}", x, y);
|
m_log.DebugFormat("[SCENE]: returning land for {0},{1}", x, y);
|
||||||
|
|
|
@ -447,7 +447,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
||||||
// settings allow voice, then whether parcel allows
|
// settings allow voice, then whether parcel allows
|
||||||
// voice, if all do retrieve or obtain the parcel
|
// voice, if all do retrieve or obtain the parcel
|
||||||
// voice channel
|
// voice channel
|
||||||
LandData land = scene.GetLandData(avatar.AbsolutePosition);
|
LandData land = scene.GetLandData(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
|
||||||
|
|
||||||
//m_log.DebugFormat("[FreeSwitchVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": request: {4}, path: {5}, param: {6}",
|
//m_log.DebugFormat("[FreeSwitchVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": request: {4}, path: {5}, param: {6}",
|
||||||
// scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, request, path, param);
|
// scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, request, path, param);
|
||||||
|
|
|
@ -623,7 +623,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
// settings allow voice, then whether parcel allows
|
// settings allow voice, then whether parcel allows
|
||||||
// voice, if all do retrieve or obtain the parcel
|
// voice, if all do retrieve or obtain the parcel
|
||||||
// voice channel
|
// voice channel
|
||||||
LandData land = scene.GetLandData(avatar.AbsolutePosition);
|
LandData land = scene.GetLandData(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
|
||||||
|
|
||||||
m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": request: {4}, path: {5}, param: {6}",
|
m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": request: {4}, path: {5}, param: {6}",
|
||||||
scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, request, path, param);
|
scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, request, path, param);
|
||||||
|
|
|
@ -1979,8 +1979,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
// this could possibly be done in the above else-if block, but we're doing the check here to keep the code easier to read.
|
// this could possibly be done in the above else-if block, but we're doing the check here to keep the code easier to read.
|
||||||
|
|
||||||
Vector3 objectPos = m_host.ParentGroup.RootPart.AbsolutePosition;
|
Vector3 objectPos = m_host.ParentGroup.RootPart.AbsolutePosition;
|
||||||
LandData here = World.GetLandData(objectPos);
|
LandData here = World.GetLandData((float)objectPos.X, (float)objectPos.Y);
|
||||||
LandData there = World.GetLandData(pos);
|
LandData there = World.GetLandData((float)pos.x, (float)pos.y);
|
||||||
|
|
||||||
// we're only checking prim limits if it's moving to a different parcel under the assumption that if the object got onto the parcel without exceeding the prim limits.
|
// we're only checking prim limits if it's moving to a different parcel under the assumption that if the object got onto the parcel without exceeding the prim limits.
|
||||||
|
|
||||||
|
@ -9699,20 +9699,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
switch ((ParcelMediaCommandEnum) aList.Data[i])
|
switch ((ParcelMediaCommandEnum) aList.Data[i])
|
||||||
{
|
{
|
||||||
case ParcelMediaCommandEnum.Url:
|
case ParcelMediaCommandEnum.Url:
|
||||||
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition).MediaURL));
|
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaURL));
|
||||||
break;
|
break;
|
||||||
case ParcelMediaCommandEnum.Desc:
|
case ParcelMediaCommandEnum.Desc:
|
||||||
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition).Description));
|
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).Description));
|
||||||
break;
|
break;
|
||||||
case ParcelMediaCommandEnum.Texture:
|
case ParcelMediaCommandEnum.Texture:
|
||||||
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition).MediaID.ToString()));
|
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaID.ToString()));
|
||||||
break;
|
break;
|
||||||
case ParcelMediaCommandEnum.Type:
|
case ParcelMediaCommandEnum.Type:
|
||||||
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition).MediaType));
|
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaType));
|
||||||
break;
|
break;
|
||||||
case ParcelMediaCommandEnum.Size:
|
case ParcelMediaCommandEnum.Size:
|
||||||
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition).MediaWidth));
|
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaWidth));
|
||||||
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition).MediaHeight));
|
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaHeight));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ParcelMediaCommandEnum mediaCommandEnum = ParcelMediaCommandEnum.Url;
|
ParcelMediaCommandEnum mediaCommandEnum = ParcelMediaCommandEnum.Url;
|
||||||
|
@ -10329,7 +10329,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param)
|
public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param)
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
LandData land = World.GetLandData(pos);
|
LandData land = World.GetLandData((float)pos.x, (float)pos.y);
|
||||||
if (land == null)
|
if (land == null)
|
||||||
{
|
{
|
||||||
return new LSL_List(0);
|
return new LSL_List(0);
|
||||||
|
|
|
@ -2911,7 +2911,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
ScenePresence presence = World.GetScenePresence(avatarId);
|
ScenePresence presence = World.GetScenePresence(avatarId);
|
||||||
if (presence != null)
|
if (presence != null)
|
||||||
{
|
{
|
||||||
LandData land = World.GetLandData(pos);
|
LandData land = World.GetLandData((float)pos.X, (float)pos.Y);
|
||||||
if ((land.Flags & (uint)ParcelFlags.AllowDamage) == (uint)ParcelFlags.AllowDamage)
|
if ((land.Flags & (uint)ParcelFlags.AllowDamage) == (uint)ParcelFlags.AllowDamage)
|
||||||
{
|
{
|
||||||
float health = presence.Health;
|
float health = presence.Health;
|
||||||
|
|
Loading…
Reference in New Issue