From 01f454242d20dd513e82eae1eb79db7842e597ea Mon Sep 17 00:00:00 2001
From: PixelTomsen
Date: Sat, 25 Feb 2012 16:39:14 +0100
Subject: PRIM_SCULPT_FLAG_INVERT, PRIM_SCULPT_FLAG_MIRROR implemented
http://opensimulator.org/mantis/view.php?id=5763
---
.../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 10 ++++++----
.../Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | 2 ++
2 files changed, 8 insertions(+), 4 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 525c3c3..c5392b5 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7069,10 +7069,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
shapeBlock.PathScaleX = 100;
shapeBlock.PathScaleY = 150;
- if (type != (int)ScriptBaseClass.PRIM_SCULPT_TYPE_CYLINDER &&
- type != (int)ScriptBaseClass.PRIM_SCULPT_TYPE_PLANE &&
- type != (int)ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE &&
- type != (int)ScriptBaseClass.PRIM_SCULPT_TYPE_TORUS)
+ int flag = type & (ScriptBaseClass.PRIM_SCULPT_FLAG_INVERT | ScriptBaseClass.PRIM_SCULPT_FLAG_MIRROR);
+
+ if (type != (ScriptBaseClass.PRIM_SCULPT_TYPE_CYLINDER | flag) &&
+ type != (ScriptBaseClass.PRIM_SCULPT_TYPE_PLANE | flag) &&
+ type != (ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE | flag) &&
+ type != (ScriptBaseClass.PRIM_SCULPT_TYPE_TORUS | flag))
{
// default
type = (int)ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index bb498b5..5a53e15 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -378,6 +378,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public const int PRIM_SCULPT_TYPE_TORUS = 2;
public const int PRIM_SCULPT_TYPE_PLANE = 3;
public const int PRIM_SCULPT_TYPE_CYLINDER = 4;
+ public const int PRIM_SCULPT_FLAG_INVERT = 64;
+ public const int PRIM_SCULPT_FLAG_MIRROR = 128;
public const int MASK_BASE = 0;
public const int MASK_OWNER = 1;
--
cgit v1.1
From 142f8a4aeca211ff6f88c7227f8654cd43a0dbaf Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 25 Feb 2012 21:00:19 -0800
Subject: HG: Remove async in posting assets to foreign grid. Mono hates
concurrency there.
---
.../CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
index 0c4ff7f..d2fe388 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
@@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
string userAssetServer = string.Empty;
if (IsForeignUser(avatarID, out userAssetServer) && userAssetServer != string.Empty && m_OutboundPermission)
{
- Util.FireAndForget(delegate { m_assMapper.Post(assetID, avatarID, userAssetServer); });
+ m_assMapper.Post(assetID, avatarID, userAssetServer);
}
}
--
cgit v1.1
From 4268427ac36410452bcfee9fe51d7deeb0ef303d Mon Sep 17 00:00:00 2001
From: Mic Bowman
Date: Mon, 27 Feb 2012 15:15:03 -0800
Subject: Some clean up in WebUtil, remove unused ServiceRequest function.
---
OpenSim/Framework/WebUtil.cs | 78 ++++----------------------------------------
1 file changed, 7 insertions(+), 71 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index b761dfe..af25da9 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -63,77 +63,7 @@ namespace OpenSim.Framework
// a "long" call for warning & debugging purposes
public const int LongCallTime = 500;
-// ///
-// /// Send LLSD to an HTTP client in application/llsd+json form
-// ///
-// /// HTTP response to send the data in
-// /// LLSD to send to the client
-// public static void SendJSONResponse(OSHttpResponse response, OSDMap body)
-// {
-// byte[] responseData = Encoding.UTF8.GetBytes(OSDParser.SerializeJsonString(body));
-//
-// response.ContentEncoding = Encoding.UTF8;
-// response.ContentLength = responseData.Length;
-// response.ContentType = "application/llsd+json";
-// response.Body.Write(responseData, 0, responseData.Length);
-// }
-//
-// ///
-// /// Send LLSD to an HTTP client in application/llsd+xml form
-// ///
-// /// HTTP response to send the data in
-// /// LLSD to send to the client
-// public static void SendXMLResponse(OSHttpResponse response, OSDMap body)
-// {
-// byte[] responseData = OSDParser.SerializeLLSDXmlBytes(body);
-//
-// response.ContentEncoding = Encoding.UTF8;
-// response.ContentLength = responseData.Length;
-// response.ContentType = "application/llsd+xml";
-// response.Body.Write(responseData, 0, responseData.Length);
-// }
-
- ///
- /// Make a GET or GET-like request to a web service that returns LLSD
- /// or JSON data
- ///
- public static OSDMap ServiceRequest(string url, string httpVerb)
- {
- string errorMessage;
-
- try
- {
- HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
- request.Method = httpVerb;
-
- using (WebResponse response = request.GetResponse())
- {
- using (Stream responseStream = response.GetResponseStream())
- {
- try
- {
- string responseStr = responseStream.GetStreamString();
- OSD responseOSD = OSDParser.Deserialize(responseStr);
- if (responseOSD.Type == OSDType.Map)
- return (OSDMap)responseOSD;
- else
- errorMessage = "Response format was invalid.";
- }
- catch
- {
- errorMessage = "Failed to parse the response.";
- }
- }
- }
- }
- catch (Exception ex)
- {
- m_log.Warn(httpVerb + " on URL " + url + " failed: " + ex.Message);
- errorMessage = ex.Message;
- }
-
- return new OSDMap { { "Message", OSD.FromString("Service request failed. " + errorMessage) } };
- }
+ #region JSONRequest
///
/// PUT JSON-encoded data to a web service that returns LLSD or
@@ -303,6 +233,10 @@ namespace OpenSim.Framework
return result;
}
+ #endregion JSONRequest
+
+ #region FormRequest
+
///
/// POST URL-encoded form data to a web service that returns LLSD or
/// JSON data
@@ -397,6 +331,8 @@ namespace OpenSim.Framework
result["Message"] = OSD.FromString("Service request failed: " + msg);
return result;
}
+
+ #endregion FormRequest
#region Uri
--
cgit v1.1
From a813e7ffdd811979a0b326fd73f2199b528e95a6 Mon Sep 17 00:00:00 2001
From: Kevin Cozens
Date: Tue, 28 Feb 2012 15:45:07 -0500
Subject: Fixed two typos. White space cleanups.
Signed-off-by: nebadon
---
.../CoreModules/World/WorldMap/WorldMapModule.cs | 32 +++++++++++-----------
1 file changed, 16 insertions(+), 16 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 74b047b..fd122da 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -132,7 +132,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
{
}
- public Type ReplaceableInterface
+ public Type ReplaceableInterface
{
get { return null; }
}
@@ -220,7 +220,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
// There is a major hack going on in this method. The viewer doesn't request
// map blocks (RequestMapBlocks) above 2048. That means that if we don't hack,
// grids above that cell don't have a map at all. So, here's the hack: we wait
- // for this CAP request to come, and we inject the map blocks at this point.
+ // for this CAP request to come, and we inject the map blocks at this point.
// In a normal scenario, this request simply sends back the MapLayer (the blue color).
// In the hacked scenario, it also sends the map blocks via UDP.
//
@@ -751,7 +751,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
{
uint x = 0, y = 0;
Utils.LongToUInts(regionhandle, out x, out y);
- GridRegion mreg = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, (int)x, (int)y);
+ GridRegion mreg = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, (int)x, (int)y);
if (mreg != null)
{
@@ -857,7 +857,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
finally
{
if (os != null)
- os.Close();
+ os.Close();
}
string response_mapItems_reply = null;
@@ -960,16 +960,16 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
// on an unloaded square.
// But make sure: Look whether the one we requested is in there
List regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
- minX * (int)Constants.RegionSize,
- maxX * (int)Constants.RegionSize,
- minY * (int)Constants.RegionSize,
+ minX * (int)Constants.RegionSize,
+ maxX * (int)Constants.RegionSize,
+ minY * (int)Constants.RegionSize,
maxY * (int)Constants.RegionSize);
if (regions != null)
{
foreach (GridRegion r in regions)
{
- if ((r.RegionLocX == minX * (int)Constants.RegionSize) &&
+ if ((r.RegionLocX == minX * (int)Constants.RegionSize) &&
(r.RegionLocY == minY * (int)Constants.RegionSize))
{
// found it => add it to response
@@ -1004,7 +1004,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
{
List mapBlocks = new List();
List regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
- (minX - 4) * (int)Constants.RegionSize,
+ (minX - 4) * (int)Constants.RegionSize,
(maxX + 4) * (int)Constants.RegionSize,
(minY - 4) * (int)Constants.RegionSize,
(maxY + 4) * (int)Constants.RegionSize);
@@ -1336,7 +1336,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
// Cannot create a map for a nonexistant heightmap
if (m_scene.Heightmap == null)
return;
-
+
//create a texture asset of the terrain
IMapImageGenerator terrain = m_scene.RequestModuleInterface();
if (terrain == null)
@@ -1345,7 +1345,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
byte[] data = terrain.WriteJpeg2000Image();
if (data == null)
return;
-
+
byte[] overlay = GenerateOverlay();
m_log.Debug("[WORLDMAP]: STORING MAPTILE IMAGE");
@@ -1366,7 +1366,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
// Store the new one
m_log.DebugFormat("[WORLDMAP]: Storing map tile {0}", asset.ID);
m_scene.AssetService.Store(asset);
-
+
if (overlay != null)
{
parcelImageID = UUID.Random();
@@ -1390,7 +1390,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
m_scene.RegionInfo.RegionSettings.TerrainImageID = terrainImageID;
m_scene.RegionInfo.RegionSettings.ParcelImageID = parcelImageID;
m_scene.RegionInfo.RegionSettings.Save();
-
+
// Delete the old one
// m_log.DebugFormat("[WORLDMAP]: Deleting old map tile {0}", lastTerrainImageID);
m_scene.AssetService.Delete(lastTerrainImageID.ToString());
@@ -1469,18 +1469,18 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
if ((land.LandData.Flags & (uint)ParcelFlags.ForSale) != 0)
{
landForSale = true;
-
+
saleBitmap = land.MergeLandBitmaps(saleBitmap, land.GetLandBitmap());
}
}
if (!landForSale)
{
- m_log.DebugFormat("[WORLD MAP]: Region {0} has no parcels for sale, not geenrating overlay", m_scene.RegionInfo.RegionName);
+ m_log.DebugFormat("[WORLD MAP]: Region {0} has no parcels for sale, not generating overlay", m_scene.RegionInfo.RegionName);
return null;
}
- m_log.DebugFormat("[WORLD MAP]: Region {0} has parcels for sale, genrating overlay", m_scene.RegionInfo.RegionName);
+ m_log.DebugFormat("[WORLD MAP]: Region {0} has parcels for sale, generating overlay", m_scene.RegionInfo.RegionName);
for (int x = 0 ; x < 64 ; x++)
{
--
cgit v1.1