diff options
author | Jeff Ames | 2008-08-17 02:31:45 +0000 |
---|---|---|
committer | Jeff Ames | 2008-08-17 02:31:45 +0000 |
commit | 796ccd3d37cb132c4c4f12c791fcdf76513c5cf0 (patch) | |
tree | e9cbe45df68bfb99d5a874072483db39eeab277e /OpenSim/Region | |
parent | Mantis#1971. Thank you kindly, BlueWall for a patch that: (diff) | |
download | opensim-SC_OLD-796ccd3d37cb132c4c4f12c791fcdf76513c5cf0.zip opensim-SC_OLD-796ccd3d37cb132c4c4f12c791fcdf76513c5cf0.tar.gz opensim-SC_OLD-796ccd3d37cb132c4c4f12c791fcdf76513c5cf0.tar.bz2 opensim-SC_OLD-796ccd3d37cb132c4c4f12c791fcdf76513c5cf0.tar.xz |
Update svn properties, minor formatting cleanup.
Diffstat (limited to '')
3 files changed, 54 insertions, 46 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs index 46f108e..9b1b9b5 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -1135,20 +1135,20 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
1135 | { | 1135 | { |
1136 | Hashtable hash = new Hashtable(); | 1136 | Hashtable hash = new Hashtable(); |
1137 | hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request)); | 1137 | hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request)); |
1138 | if(hash.ContainsKey("region_id") && hash.ContainsKey("location")) | 1138 | if (hash.ContainsKey("region_id") && hash.ContainsKey("location")) |
1139 | { | 1139 | { |
1140 | LLUUID regionID = (LLUUID)hash["region_id"]; | 1140 | LLUUID regionID = (LLUUID)hash["region_id"]; |
1141 | ArrayList list = (ArrayList)hash["location"]; | 1141 | ArrayList list = (ArrayList)hash["location"]; |
1142 | uint x = (uint)(double)list[0]; | 1142 | uint x = (uint)(double)list[0]; |
1143 | uint y = (uint)(double)list[1]; | 1143 | uint y = (uint)(double)list[1]; |
1144 | if(hash.ContainsKey("region_handle")) | 1144 | if (hash.ContainsKey("region_handle")) |
1145 | { | 1145 | { |
1146 | // if you do a "About Landmark" on a landmark a second time, the viewer sends the | 1146 | // if you do a "About Landmark" on a landmark a second time, the viewer sends the |
1147 | // region_handle it got earlier via RegionHandleRequest | 1147 | // region_handle it got earlier via RegionHandleRequest |
1148 | ulong regionHandle = Helpers.BytesToUInt64((byte[])hash["region_handle"]); | 1148 | ulong regionHandle = Helpers.BytesToUInt64((byte[])hash["region_handle"]); |
1149 | parcelID = Util.BuildFakeParcelID(regionHandle, x, y); | 1149 | parcelID = Util.BuildFakeParcelID(regionHandle, x, y); |
1150 | } | 1150 | } |
1151 | else if(regionID == m_scene.RegionInfo.RegionID) | 1151 | else if (regionID == m_scene.RegionInfo.RegionID) |
1152 | { | 1152 | { |
1153 | // a parcel request for a local parcel => no need to query the grid | 1153 | // a parcel request for a local parcel => no need to query the grid |
1154 | parcelID = Util.BuildFakeParcelID(m_scene.RegionInfo.RegionHandle, x, y); | 1154 | parcelID = Util.BuildFakeParcelID(m_scene.RegionInfo.RegionHandle, x, y); |
@@ -1157,7 +1157,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
1157 | { | 1157 | { |
1158 | // a parcel request for a parcel in another region. Ask the grid about the region | 1158 | // a parcel request for a parcel in another region. Ask the grid about the region |
1159 | RegionInfo info = m_scene.CommsManager.GridService.RequestNeighbourInfo(regionID); | 1159 | RegionInfo info = m_scene.CommsManager.GridService.RequestNeighbourInfo(regionID); |
1160 | if(info != null) parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y); | 1160 | if (info != null) |
1161 | parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y); | ||
1161 | } | 1162 | } |
1162 | } | 1163 | } |
1163 | } | 1164 | } |
@@ -1182,7 +1183,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
1182 | 1183 | ||
1183 | private void handleParcelInfo(IClientAPI remoteClient, LLUUID parcelID) | 1184 | private void handleParcelInfo(IClientAPI remoteClient, LLUUID parcelID) |
1184 | { | 1185 | { |
1185 | if(parcelID == LLUUID.Zero) return; | 1186 | if (parcelID == LLUUID.Zero) |
1187 | return; | ||
1186 | 1188 | ||
1187 | // assume we've got the parcelID we just computed in RemoteParcelRequest | 1189 | // assume we've got the parcelID we just computed in RemoteParcelRequest |
1188 | ulong regionHandle; | 1190 | ulong regionHandle; |
@@ -1191,17 +1193,19 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
1191 | m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", regionHandle, x, y); | 1193 | m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", regionHandle, x, y); |
1192 | 1194 | ||
1193 | LandData landData; | 1195 | LandData landData; |
1194 | if(regionHandle == m_scene.RegionInfo.RegionHandle) landData = this.GetLandObject(x, y).landData; | 1196 | if (regionHandle == m_scene.RegionInfo.RegionHandle) |
1195 | else landData = m_scene.CommsManager.GridService.RequestLandData(regionHandle, x, y); | 1197 | landData = this.GetLandObject(x, y).landData; |
1198 | else | ||
1199 | landData = m_scene.CommsManager.GridService.RequestLandData(regionHandle, x, y); | ||
1196 | 1200 | ||
1197 | if(landData != null) | 1201 | if (landData != null) |
1198 | { | 1202 | { |
1199 | // we need to transfer the fake parcelID, not the one in landData, so the viewer can match it to the landmark. | 1203 | // we need to transfer the fake parcelID, not the one in landData, so the viewer can match it to the landmark. |
1200 | m_log.Debug("[LAND] got parcelinfo; sending"); | 1204 | m_log.Debug("[LAND] got parcelinfo; sending"); |
1201 | remoteClient.SendParcelInfo(m_scene.RegionInfo, landData, parcelID, x, y); | 1205 | remoteClient.SendParcelInfo(m_scene.RegionInfo, landData, parcelID, x, y); |
1202 | } | 1206 | } |
1203 | else m_log.Debug("[LAND] got no parcelinfo; not sending"); | 1207 | else |
1208 | m_log.Debug("[LAND] got no parcelinfo; not sending"); | ||
1204 | } | 1209 | } |
1205 | } | 1210 | } |
1206 | |||
1207 | } | 1211 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index f5117b9..e060f3d 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -3872,9 +3872,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
3872 | public void RegionHandleRequest(IClientAPI client, LLUUID regionID) | 3872 | public void RegionHandleRequest(IClientAPI client, LLUUID regionID) |
3873 | { | 3873 | { |
3874 | RegionInfo info; | 3874 | RegionInfo info; |
3875 | if(regionID == RegionInfo.RegionID) info = RegionInfo; | 3875 | if (regionID == RegionInfo.RegionID) |
3876 | else info = CommsManager.GridService.RequestNeighbourInfo(regionID); | 3876 | info = RegionInfo; |
3877 | if(info != null) client.SendRegionHandle(regionID, info.RegionHandle); | 3877 | else |
3878 | info = CommsManager.GridService.RequestNeighbourInfo(regionID); | ||
3879 | |||
3880 | if (info != null) | ||
3881 | client.SendRegionHandle(regionID, info.RegionHandle); | ||
3878 | } | 3882 | } |
3879 | 3883 | ||
3880 | 3884 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index a1d2446..3e59129 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1088,32 +1088,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1088 | return; | 1088 | return; |
1089 | } | 1089 | } |
1090 | } | 1090 | } |
1091 | 1091 | ||
1092 | public void SetFullBright(SceneObjectPart part, int face, bool bright) | 1092 | public void SetFullBright(SceneObjectPart part, int face, bool bright) |
1093 | { | 1093 | { |
1094 | LLObject.TextureEntry tex = part.Shape.Textures; | 1094 | LLObject.TextureEntry tex = part.Shape.Textures; |
1095 | if (face > -1) | 1095 | if (face > -1) |
1096 | { | 1096 | { |
1097 | tex.CreateFace((uint) face); | 1097 | tex.CreateFace((uint) face); |
1098 | tex.FaceTextures[face].Fullbright = bright; | 1098 | tex.FaceTextures[face].Fullbright = bright; |
1099 | part.UpdateTexture(tex); | 1099 | part.UpdateTexture(tex); |
1100 | return; | 1100 | return; |
1101 | } | 1101 | } |
1102 | else if (face == -1) | 1102 | else if (face == -1) |
1103 | { | 1103 | { |
1104 | for (uint i = 0; i < 32; i++) | 1104 | for (uint i = 0; i < 32; i++) |
1105 | { | 1105 | { |
1106 | if (tex.FaceTextures[i] != null) | 1106 | if (tex.FaceTextures[i] != null) |
1107 | { | 1107 | { |
1108 | tex.FaceTextures[i].Fullbright = bright; | 1108 | tex.FaceTextures[i].Fullbright = bright; |
1109 | } | 1109 | } |
1110 | } | 1110 | } |
1111 | tex.DefaultTexture.Fullbright = bright; | 1111 | tex.DefaultTexture.Fullbright = bright; |
1112 | part.UpdateTexture(tex); | 1112 | part.UpdateTexture(tex); |
1113 | return; | 1113 | return; |
1114 | } | 1114 | } |
1115 | } | 1115 | } |
1116 | 1116 | ||
1117 | public double llGetAlpha(int face) | 1117 | public double llGetAlpha(int face) |
1118 | { | 1118 | { |
1119 | m_host.AddScriptLPS(1); | 1119 | m_host.AddScriptLPS(1); |
@@ -5523,20 +5523,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5523 | SetShiny(part, face, shiny, bump); | 5523 | SetShiny(part, face, shiny, bump); |
5524 | 5524 | ||
5525 | break; | 5525 | break; |
5526 | case (int)ScriptBaseClass.PRIM_FULLBRIGHT: | 5526 | case (int)ScriptBaseClass.PRIM_FULLBRIGHT: |
5527 | if (remain < 2) | 5527 | if (remain < 2) |
5528 | return; | 5528 | return; |
5529 | face = Convert.ToInt32(rules.Data[idx++]); | 5529 | face = Convert.ToInt32(rules.Data[idx++]); |
5530 | string bv = rules.Data[idx++].ToString(); | 5530 | string bv = rules.Data[idx++].ToString(); |
5531 | bool st; | 5531 | bool st; |
5532 | if(bv.Equals("1")) | 5532 | if (bv.Equals("1")) |
5533 | st = true; | 5533 | st = true; |
5534 | else | 5534 | else |
5535 | st = false; | 5535 | st = false; |
5536 | 5536 | ||
5537 | SetFullBright(part, face , st); | 5537 | SetFullBright(part, face , st); |
5538 | break; | 5538 | break; |
5539 | } | 5539 | } |
5540 | } | 5540 | } |
5541 | } | 5541 | } |
5542 | 5542 | ||