Update svn properties, minor formatting cleanup.

0.6.0-stable
Jeff Ames 2008-08-17 02:31:45 +00:00
parent 60a676251a
commit 796ccd3d37
4 changed files with 96 additions and 88 deletions

View File

@ -1,42 +1,42 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using libsecondlife; using libsecondlife;
namespace OpenSim.Framework.Communications.Capabilities namespace OpenSim.Framework.Communications.Capabilities
{ {
[LLSDType("MAP")] [LLSDType("MAP")]
public class LLSDRemoteParcelResponse public class LLSDRemoteParcelResponse
{ {
public LLUUID parcel_id; public LLUUID parcel_id;
public LLSDRemoteParcelResponse() public LLSDRemoteParcelResponse()
{ {
} }
} }
} }

View File

@ -1,4 +1,4 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
@ -1135,20 +1135,20 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{ {
Hashtable hash = new Hashtable(); Hashtable hash = new Hashtable();
hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request)); hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request));
if(hash.ContainsKey("region_id") && hash.ContainsKey("location")) if (hash.ContainsKey("region_id") && hash.ContainsKey("location"))
{ {
LLUUID regionID = (LLUUID)hash["region_id"]; LLUUID regionID = (LLUUID)hash["region_id"];
ArrayList list = (ArrayList)hash["location"]; ArrayList list = (ArrayList)hash["location"];
uint x = (uint)(double)list[0]; uint x = (uint)(double)list[0];
uint y = (uint)(double)list[1]; uint y = (uint)(double)list[1];
if(hash.ContainsKey("region_handle")) if (hash.ContainsKey("region_handle"))
{ {
// if you do a "About Landmark" on a landmark a second time, the viewer sends the // if you do a "About Landmark" on a landmark a second time, the viewer sends the
// region_handle it got earlier via RegionHandleRequest // region_handle it got earlier via RegionHandleRequest
ulong regionHandle = Helpers.BytesToUInt64((byte[])hash["region_handle"]); ulong regionHandle = Helpers.BytesToUInt64((byte[])hash["region_handle"]);
parcelID = Util.BuildFakeParcelID(regionHandle, x, y); parcelID = Util.BuildFakeParcelID(regionHandle, x, y);
} }
else if(regionID == m_scene.RegionInfo.RegionID) else if (regionID == m_scene.RegionInfo.RegionID)
{ {
// a parcel request for a local parcel => no need to query the grid // a parcel request for a local parcel => no need to query the grid
parcelID = Util.BuildFakeParcelID(m_scene.RegionInfo.RegionHandle, x, y); parcelID = Util.BuildFakeParcelID(m_scene.RegionInfo.RegionHandle, x, y);
@ -1157,7 +1157,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{ {
// a parcel request for a parcel in another region. Ask the grid about the region // a parcel request for a parcel in another region. Ask the grid about the region
RegionInfo info = m_scene.CommsManager.GridService.RequestNeighbourInfo(regionID); RegionInfo info = m_scene.CommsManager.GridService.RequestNeighbourInfo(regionID);
if(info != null) parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y); if (info != null)
parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y);
} }
} }
} }
@ -1182,7 +1183,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land
private void handleParcelInfo(IClientAPI remoteClient, LLUUID parcelID) private void handleParcelInfo(IClientAPI remoteClient, LLUUID parcelID)
{ {
if(parcelID == LLUUID.Zero) return; if (parcelID == LLUUID.Zero)
return;
// assume we've got the parcelID we just computed in RemoteParcelRequest // assume we've got the parcelID we just computed in RemoteParcelRequest
ulong regionHandle; ulong regionHandle;
@ -1191,17 +1193,19 @@ namespace OpenSim.Region.Environment.Modules.World.Land
m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", regionHandle, x, y); m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", regionHandle, x, y);
LandData landData; LandData landData;
if(regionHandle == m_scene.RegionInfo.RegionHandle) landData = this.GetLandObject(x, y).landData; if (regionHandle == m_scene.RegionInfo.RegionHandle)
else landData = m_scene.CommsManager.GridService.RequestLandData(regionHandle, x, y); landData = this.GetLandObject(x, y).landData;
else
landData = m_scene.CommsManager.GridService.RequestLandData(regionHandle, x, y);
if(landData != null) if (landData != null)
{ {
// we need to transfer the fake parcelID, not the one in landData, so the viewer can match it to the landmark. // we need to transfer the fake parcelID, not the one in landData, so the viewer can match it to the landmark.
m_log.Debug("[LAND] got parcelinfo; sending"); m_log.Debug("[LAND] got parcelinfo; sending");
remoteClient.SendParcelInfo(m_scene.RegionInfo, landData, parcelID, x, y); remoteClient.SendParcelInfo(m_scene.RegionInfo, landData, parcelID, x, y);
} }
else m_log.Debug("[LAND] got no parcelinfo; not sending"); else
m_log.Debug("[LAND] got no parcelinfo; not sending");
} }
} }
} }

View File

@ -3872,9 +3872,13 @@ namespace OpenSim.Region.Environment.Scenes
public void RegionHandleRequest(IClientAPI client, LLUUID regionID) public void RegionHandleRequest(IClientAPI client, LLUUID regionID)
{ {
RegionInfo info; RegionInfo info;
if(regionID == RegionInfo.RegionID) info = RegionInfo; if (regionID == RegionInfo.RegionID)
else info = CommsManager.GridService.RequestNeighbourInfo(regionID); info = RegionInfo;
if(info != null) client.SendRegionHandle(regionID, info.RegionHandle); else
info = CommsManager.GridService.RequestNeighbourInfo(regionID);
if (info != null)
client.SendRegionHandle(regionID, info.RegionHandle);
} }

View File

@ -1088,32 +1088,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return; return;
} }
} }
public void SetFullBright(SceneObjectPart part, int face, bool bright) public void SetFullBright(SceneObjectPart part, int face, bool bright)
{ {
LLObject.TextureEntry tex = part.Shape.Textures; LLObject.TextureEntry tex = part.Shape.Textures;
if (face > -1) if (face > -1)
{ {
tex.CreateFace((uint) face); tex.CreateFace((uint) face);
tex.FaceTextures[face].Fullbright = bright; tex.FaceTextures[face].Fullbright = bright;
part.UpdateTexture(tex); part.UpdateTexture(tex);
return; return;
} }
else if (face == -1) else if (face == -1)
{ {
for (uint i = 0; i < 32; i++) for (uint i = 0; i < 32; i++)
{ {
if (tex.FaceTextures[i] != null) if (tex.FaceTextures[i] != null)
{ {
tex.FaceTextures[i].Fullbright = bright; tex.FaceTextures[i].Fullbright = bright;
} }
} }
tex.DefaultTexture.Fullbright = bright; tex.DefaultTexture.Fullbright = bright;
part.UpdateTexture(tex); part.UpdateTexture(tex);
return; return;
} }
} }
public double llGetAlpha(int face) public double llGetAlpha(int face)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
@ -5523,20 +5523,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
SetShiny(part, face, shiny, bump); SetShiny(part, face, shiny, bump);
break; break;
case (int)ScriptBaseClass.PRIM_FULLBRIGHT: case (int)ScriptBaseClass.PRIM_FULLBRIGHT:
if (remain < 2) if (remain < 2)
return; return;
face = Convert.ToInt32(rules.Data[idx++]); face = Convert.ToInt32(rules.Data[idx++]);
string bv = rules.Data[idx++].ToString(); string bv = rules.Data[idx++].ToString();
bool st; bool st;
if(bv.Equals("1")) if (bv.Equals("1"))
st = true; st = true;
else else
st = false; st = false;
SetFullBright(part, face , st); SetFullBright(part, face , st);
break; break;
} }
} }
} }