Merge branch 'master' of /home/opensim/var/repo/opensim
commit
1d4bee454e
|
@ -157,12 +157,18 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
sendRegionInfoPacketToAll();
|
||||
}
|
||||
|
||||
public void setEstateTerrainBaseTexture(IClientAPI remoteClient, int corner, UUID texture)
|
||||
public void setEstateTerrainBaseTexture(int level, UUID texture)
|
||||
{
|
||||
setEstateTerrainBaseTexture(null, level, texture);
|
||||
sendRegionHandshakeToAll();
|
||||
}
|
||||
|
||||
public void setEstateTerrainBaseTexture(IClientAPI remoteClient, int level, UUID texture)
|
||||
{
|
||||
if (texture == UUID.Zero)
|
||||
return;
|
||||
|
||||
switch (corner)
|
||||
switch (level)
|
||||
{
|
||||
case 0:
|
||||
Scene.RegionInfo.RegionSettings.TerrainTexture1 = texture;
|
||||
|
@ -182,6 +188,11 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
sendRegionInfoPacketToAll();
|
||||
}
|
||||
|
||||
public void setEstateTerrainTextureHeights(int corner, float lowValue, float highValue)
|
||||
{
|
||||
setEstateTerrainTextureHeights(null, corner, lowValue, highValue);
|
||||
}
|
||||
|
||||
public void setEstateTerrainTextureHeights(IClientAPI client, int corner, float lowValue, float highValue)
|
||||
{
|
||||
switch (corner)
|
||||
|
|
|
@ -45,5 +45,8 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
/// Tell all clients about the current state of the region (terrain textures, water height, etc.).
|
||||
/// </summary>
|
||||
void sendRegionHandshakeToAll();
|
||||
|
||||
void setEstateTerrainBaseTexture(int level, UUID texture);
|
||||
void setEstateTerrainTextureHeights(int corner, float lowValue, float highValue);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3049,5 +3049,60 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
|
||||
return ScriptBaseClass.TRUE;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets terrain estate texture
|
||||
/// </summary>
|
||||
/// <param name="level"></param>
|
||||
/// <param name="texture"></param>
|
||||
/// <returns></returns>
|
||||
public void osSetTerrainTexture(int level, LSL_Key texture)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.High, "osSetTerrainTexture");
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
//Check to make sure that the script's owner is the estate manager/master
|
||||
//World.Permissions.GenericEstatePermission(
|
||||
if (World.Permissions.IsGod(m_host.OwnerID))
|
||||
{
|
||||
if (level < 0 || level > 3)
|
||||
return;
|
||||
|
||||
UUID textureID = new UUID();
|
||||
if (!UUID.TryParse(texture, out textureID))
|
||||
return;
|
||||
|
||||
// estate module is required
|
||||
IEstateModule estate = World.RequestModuleInterface<IEstateModule>();
|
||||
if (estate != null)
|
||||
estate.setEstateTerrainBaseTexture(level, textureID);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets terrain heights of estate
|
||||
/// </summary>
|
||||
/// <param name="corner"></param>
|
||||
/// <param name="low"></param>
|
||||
/// <param name="high"></param>
|
||||
/// <returns></returns>
|
||||
public void osSetTerrainTextureHeight(int corner, double low, double high)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.High, "osSetTerrainTextureHeight");
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
//Check to make sure that the script's owner is the estate manager/master
|
||||
//World.Permissions.GenericEstatePermission(
|
||||
if (World.Permissions.IsGod(m_host.OwnerID))
|
||||
{
|
||||
if (corner < 0 || corner > 3)
|
||||
return;
|
||||
|
||||
// estate module is required
|
||||
IEstateModule estate = World.RequestModuleInterface<IEstateModule>();
|
||||
if (estate != null)
|
||||
estate.setEstateTerrainTextureHeights(corner, (float)low, (float)high);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -234,5 +234,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
|||
|
||||
LSL_Integer osInviteToGroup(LSL_Key agentId);
|
||||
LSL_Integer osEjectFromGroup(LSL_Key agentId);
|
||||
|
||||
void osSetTerrainTexture(int level, LSL_Key texture);
|
||||
void osSetTerrainTextureHeight(int corner, double low, double high);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -878,5 +878,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
|||
{
|
||||
return m_OSSL_Functions.osEjectFromGroup(agentId);
|
||||
}
|
||||
|
||||
public void osSetTerrainTexture(int level, LSL_Key texture)
|
||||
{
|
||||
m_OSSL_Functions.osSetTerrainTexture(level, texture);
|
||||
}
|
||||
|
||||
public void osSetTerrainTextureHeight(int corner, double low, double high)
|
||||
{
|
||||
m_OSSL_Functions.osSetTerrainTextureHeight(corner, low, high);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,29 +113,36 @@ namespace OpenSim.Services.Connectors
|
|||
}
|
||||
else if (replyData.ContainsKey("Result")&& (replyData["Result"].ToString().ToLower() == "failure"))
|
||||
{
|
||||
m_log.DebugFormat("[GRID CONNECTOR]: Registration failed: {0}", replyData["Message"].ToString());
|
||||
m_log.ErrorFormat(
|
||||
"[GRID CONNECTOR]: Registration failed: {0} when contacting {1}", replyData["Message"], uri);
|
||||
|
||||
return replyData["Message"].ToString();
|
||||
}
|
||||
else if (!replyData.ContainsKey("Result"))
|
||||
{
|
||||
m_log.DebugFormat("[GRID CONNECTOR]: reply data does not contain result field");
|
||||
m_log.ErrorFormat(
|
||||
"[GRID CONNECTOR]: reply data does not contain result field when contacting {0}", uri);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.DebugFormat("[GRID CONNECTOR]: unexpected result {0}", replyData["Result"].ToString());
|
||||
return "Unexpected result "+replyData["Result"].ToString();
|
||||
m_log.ErrorFormat(
|
||||
"[GRID CONNECTOR]: unexpected result {0} when contacting {1}", replyData["Result"], uri);
|
||||
|
||||
return "Unexpected result " + replyData["Result"].ToString();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
m_log.DebugFormat("[GRID CONNECTOR]: RegisterRegion received null reply");
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[GRID CONNECTOR]: RegisterRegion received null reply when contacting grid server at {0}", uri);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server at {0}: {1}", uri, e.Message);
|
||||
m_log.ErrorFormat("[GRID CONNECTOR]: Exception when contacting grid server at {0}: {1}", uri, e.Message);
|
||||
}
|
||||
|
||||
return "Error communicating with grid service";
|
||||
return string.Format("Error communicating with the grid service at {0}", uri);
|
||||
}
|
||||
|
||||
public bool DeregisterRegion(UUID regionID)
|
||||
|
|
Loading…
Reference in New Issue