Make all of the toggles go live. Utilizes the new database table for almost everything. Remove lots of now unneeded settings from the EstateSettings class
0.6.0-stable
Melanie Thielker 2008-07-14 01:32:16 +00:00
parent 12173034d9
commit eaf9383b59
3 changed files with 29 additions and 324 deletions

View File

@ -60,25 +60,9 @@ namespace OpenSim.Framework
private int m_redirectGridY; private int m_redirectGridY;
private float m_sunHour; private float m_sunHour;
private LLVector3 m_sunPosition; private LLVector3 m_sunPosition;
private LLUUID m_terrainBase0;
private LLUUID m_terrainBase1;
private LLUUID m_terrainBase2;
private LLUUID m_terrainBase3;
private LLUUID m_terrainDetail0;
private LLUUID m_terrainDetail1;
private LLUUID m_terrainDetail2;
private LLUUID m_terrainDetail3;
private string m_terrainFile; private string m_terrainFile;
private float m_terrainHeightRange0;
private float m_terrainHeightRange1;
private float m_terrainHeightRange2;
private float m_terrainHeightRange3;
private LLUUID m_terrainImageID; private LLUUID m_terrainImageID;
private double m_terrainMultiplier; private double m_terrainMultiplier;
private float m_terrainStartHeight0;
private float m_terrainStartHeight1;
private float m_terrainStartHeight2;
private float m_terrainStartHeight3;
public EstateSettings() public EstateSettings()
{ {
@ -172,179 +156,8 @@ namespace OpenSim.Framework
} }
// Region Information
// Low resolution 'base' textures. No longer used.
public LLUUID terrainBase0
{
get { return m_terrainBase0; }
set
{
m_terrainBase0 = value;
configMember.forceSetConfigurationOption("terrain_base_0", m_terrainBase0.ToString());
}
}
public LLUUID terrainBase1
{
get { return m_terrainBase1; }
set
{
m_terrainBase1 = value;
configMember.forceSetConfigurationOption("terrain_base_1", m_terrainBase1.ToString());
}
}
public LLUUID terrainBase2
{
get { return m_terrainBase2; }
set
{
m_terrainBase2 = value;
configMember.forceSetConfigurationOption("terrain_base_2", m_terrainBase2.ToString());
}
}
public LLUUID terrainBase3
{
get { return m_terrainBase3; }
set
{
m_terrainBase3 = value;
configMember.forceSetConfigurationOption("terrain_base_3", m_terrainBase3.ToString());
}
}
// Higher resolution terrain textures
public LLUUID terrainDetail0
{
get { return m_terrainDetail0; }
set
{
m_terrainDetail0 = value;
configMember.forceSetConfigurationOption("terrain_detail_0", m_terrainDetail0.ToString());
}
}
public LLUUID terrainDetail1
{
get { return m_terrainDetail1; }
set
{
m_terrainDetail1 = value;
configMember.forceSetConfigurationOption("terrain_detail_1", m_terrainDetail1.ToString());
}
}
public LLUUID terrainDetail2
{
get { return m_terrainDetail2; }
set
{
m_terrainDetail2 = value;
configMember.forceSetConfigurationOption("terrain_detail_2", m_terrainDetail2.ToString());
}
}
public LLUUID terrainDetail3
{
get { return m_terrainDetail3; }
set
{
m_terrainDetail3 = value;
configMember.forceSetConfigurationOption("terrain_detail_3", m_terrainDetail3.ToString());
}
}
// First quad - each point is bilinearly interpolated at each meter of terrain // First quad - each point is bilinearly interpolated at each meter of terrain
public float terrainStartHeight0
{
get { return m_terrainStartHeight0; }
set
{
m_terrainStartHeight0 = value;
configMember.forceSetConfigurationOption("terrain_start_height_0", m_terrainStartHeight0.ToString());
}
}
public float terrainStartHeight1
{
get { return m_terrainStartHeight1; }
set
{
m_terrainStartHeight1 = value;
configMember.forceSetConfigurationOption("terrain_start_height_1", m_terrainStartHeight1.ToString());
}
}
public float terrainStartHeight2
{
get { return m_terrainStartHeight2; }
set
{
m_terrainStartHeight2 = value;
configMember.forceSetConfigurationOption("terrain_start_height_2", m_terrainStartHeight2.ToString());
}
}
public float terrainStartHeight3
{
get { return m_terrainStartHeight3; }
set
{
m_terrainStartHeight3 = value;
configMember.forceSetConfigurationOption("terrain_start_height_3", m_terrainStartHeight3.ToString());
}
}
// Second quad - also bilinearly interpolated.
// Terrain texturing is done that:
// 0..3 (0 = base0, 3 = base3) = (terrain[x,y] - start[x,y]) / range[x,y]
public float terrainHeightRange0
{
get { return m_terrainHeightRange0; }
set
{
m_terrainHeightRange0 = value;
configMember.forceSetConfigurationOption("terrain_height_range_0", m_terrainHeightRange0.ToString());
}
}
public float terrainHeightRange1
{
get { return m_terrainHeightRange1; }
set
{
m_terrainHeightRange1 = value;
configMember.forceSetConfigurationOption("terrain_height_range_1", m_terrainHeightRange1.ToString());
}
}
public float terrainHeightRange2
{
get { return m_terrainHeightRange2; }
set
{
m_terrainHeightRange2 = value;
configMember.forceSetConfigurationOption("terrain_height_range_2", m_terrainHeightRange2.ToString());
}
}
public float terrainHeightRange3
{
get { return m_terrainHeightRange3; }
set
{
m_terrainHeightRange3 = value;
configMember.forceSetConfigurationOption("terrain_height_range_3", m_terrainHeightRange3.ToString());
}
}
// Terrain Default (Must be in F32 Format!) // Terrain Default (Must be in F32 Format!)
public string terrainFile public string terrainFile
@ -655,42 +468,6 @@ namespace OpenSim.Framework
configMember.addConfigurationOption("price_per_meter", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, configMember.addConfigurationOption("price_per_meter", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
String.Empty, "1", true); String.Empty, "1", true);
configMember.addConfigurationOption("terrain_base_0", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, String.Empty,
"b8d3965a-ad78-bf43-699b-bff8eca6c975", true);
configMember.addConfigurationOption("terrain_base_1", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, String.Empty,
"abb783e6-3e93-26c0-248a-247666855da3", true);
configMember.addConfigurationOption("terrain_base_2", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, String.Empty,
"179cdabd-398a-9b6b-1391-4dc333ba321f", true);
configMember.addConfigurationOption("terrain_base_3", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, String.Empty,
"beb169c7-11ea-fff2-efe5-0f24dc881df2", true);
configMember.addConfigurationOption("terrain_detail_0", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
String.Empty, "00000000-0000-0000-0000-000000000000", true);
configMember.addConfigurationOption("terrain_detail_1", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
String.Empty, "00000000-0000-0000-0000-000000000000", true);
configMember.addConfigurationOption("terrain_detail_2", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
String.Empty, "00000000-0000-0000-0000-000000000000", true);
configMember.addConfigurationOption("terrain_detail_3", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
String.Empty, "00000000-0000-0000-0000-000000000000", true);
configMember.addConfigurationOption("terrain_start_height_0",
ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, String.Empty, "10.0", true);
configMember.addConfigurationOption("terrain_start_height_1",
ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, String.Empty, "10.0", true);
configMember.addConfigurationOption("terrain_start_height_2",
ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, String.Empty, "10.0", true);
configMember.addConfigurationOption("terrain_start_height_3",
ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, String.Empty, "10.0", true);
configMember.addConfigurationOption("terrain_height_range_0",
ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, String.Empty, "60.0", true);
configMember.addConfigurationOption("terrain_height_range_1",
ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, String.Empty, "60.0", true);
configMember.addConfigurationOption("terrain_height_range_2",
ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, String.Empty, "60.0", true);
configMember.addConfigurationOption("terrain_height_range_3",
ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, String.Empty, "60.0", true);
configMember.addConfigurationOption("terrain_file", configMember.addConfigurationOption("terrain_file",
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, String.Empty, ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, String.Empty,
"default.r32", true); "default.r32", true);
@ -751,58 +528,6 @@ namespace OpenSim.Framework
m_pricePerMeter = Convert.ToInt32(configuration_result); m_pricePerMeter = Convert.ToInt32(configuration_result);
break; break;
case "terrain_base_0":
m_terrainBase0 = (LLUUID) configuration_result;
break;
case "terrain_base_1":
m_terrainBase1 = (LLUUID) configuration_result;
break;
case "terrain_base_2":
m_terrainBase2 = (LLUUID) configuration_result;
break;
case "terrain_base_3":
m_terrainBase3 = (LLUUID) configuration_result;
break;
case "terrain_detail_0":
m_terrainDetail0 = (LLUUID) configuration_result;
break;
case "terrain_detail_1":
m_terrainDetail1 = (LLUUID) configuration_result;
break;
case "terrain_detail_2":
m_terrainDetail2 = (LLUUID) configuration_result;
break;
case "terrain_detail_3":
m_terrainDetail3 = (LLUUID) configuration_result;
break;
case "terrain_start_height_0":
m_terrainStartHeight0 = (float) configuration_result;
break;
case "terrain_start_height_1":
m_terrainStartHeight1 = (float) configuration_result;
break;
case "terrain_start_height_2":
m_terrainStartHeight2 = (float) configuration_result;
break;
case "terrain_start_height_3":
m_terrainStartHeight3 = (float) configuration_result;
break;
case "terrain_height_range_0":
m_terrainHeightRange0 = (float) configuration_result;
break;
case "terrain_height_range_1":
m_terrainHeightRange1 = (float) configuration_result;
break;
case "terrain_height_range_2":
m_terrainHeightRange2 = (float) configuration_result;
break;
case "terrain_height_range_3":
m_terrainHeightRange3 = (float) configuration_result;
break;
case "terrain_file": case "terrain_file":
m_terrainFile = (string) configuration_result; m_terrainFile = (string) configuration_result;
break; break;

View File

@ -106,35 +106,16 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
switch (corner) switch (corner)
{ {
case 0: case 0:
m_scene.RegionInfo.EstateSettings.terrainBase0 = texture; m_scene.RegionInfo.RegionSettings.TerrainTexture1 = texture;
break; break;
case 1: case 1:
m_scene.RegionInfo.EstateSettings.terrainBase1 = texture; m_scene.RegionInfo.RegionSettings.TerrainTexture2 = texture;
break; break;
case 2: case 2:
m_scene.RegionInfo.EstateSettings.terrainBase2 = texture; m_scene.RegionInfo.RegionSettings.TerrainTexture3 = texture;
break; break;
case 3: case 3:
m_scene.RegionInfo.EstateSettings.terrainBase3 = texture; m_scene.RegionInfo.RegionSettings.TerrainTexture4 = texture;
break;
}
}
public void setEstateTerrainDetailTexture(IClientAPI client, int corner, LLUUID textureUUID)
{
switch (corner)
{
case 0:
m_scene.RegionInfo.EstateSettings.terrainDetail0 = textureUUID;
break;
case 1:
m_scene.RegionInfo.EstateSettings.terrainDetail1 = textureUUID;
break;
case 2:
m_scene.RegionInfo.EstateSettings.terrainDetail2 = textureUUID;
break;
case 3:
m_scene.RegionInfo.EstateSettings.terrainDetail3 = textureUUID;
break; break;
} }
} }
@ -144,20 +125,20 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
switch (corner) switch (corner)
{ {
case 0: case 0:
m_scene.RegionInfo.EstateSettings.terrainStartHeight0 = lowValue; m_scene.RegionInfo.RegionSettings.Elevation1SW = lowValue;
m_scene.RegionInfo.EstateSettings.terrainHeightRange0 = highValue; m_scene.RegionInfo.RegionSettings.Elevation2SW = highValue;
break; break;
case 1: case 1:
m_scene.RegionInfo.EstateSettings.terrainStartHeight1 = lowValue; m_scene.RegionInfo.RegionSettings.Elevation1NW = lowValue;
m_scene.RegionInfo.EstateSettings.terrainHeightRange1 = highValue; m_scene.RegionInfo.RegionSettings.Elevation2NW = highValue;
break; break;
case 2: case 2:
m_scene.RegionInfo.EstateSettings.terrainStartHeight2 = lowValue; m_scene.RegionInfo.RegionSettings.Elevation1SE = lowValue;
m_scene.RegionInfo.EstateSettings.terrainHeightRange2 = highValue; m_scene.RegionInfo.RegionSettings.Elevation2SE = highValue;
break; break;
case 3: case 3:
m_scene.RegionInfo.EstateSettings.terrainStartHeight3 = lowValue; m_scene.RegionInfo.RegionSettings.Elevation1NE = lowValue;
m_scene.RegionInfo.EstateSettings.terrainHeightRange3 = highValue; m_scene.RegionInfo.RegionSettings.Elevation2NE = highValue;
break; break;
} }
} }
@ -532,14 +513,14 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
args.isEstateManager = estatemanager; args.isEstateManager = estatemanager;
args.billableFactor = m_scene.RegionInfo.EstateSettings.billableFactor; args.billableFactor = m_scene.RegionInfo.EstateSettings.billableFactor;
args.terrainHeightRange0 = m_scene.RegionInfo.EstateSettings.terrainHeightRange0; args.terrainStartHeight0 = (float)m_scene.RegionInfo.RegionSettings.Elevation1SW;
args.terrainHeightRange1 = m_scene.RegionInfo.EstateSettings.terrainHeightRange1; args.terrainHeightRange0 = (float)m_scene.RegionInfo.RegionSettings.Elevation2SW;
args.terrainHeightRange2 = m_scene.RegionInfo.EstateSettings.terrainHeightRange2; args.terrainStartHeight1 = (float)m_scene.RegionInfo.RegionSettings.Elevation1NW;
args.terrainHeightRange3 = m_scene.RegionInfo.EstateSettings.terrainHeightRange3; args.terrainHeightRange1 = (float)m_scene.RegionInfo.RegionSettings.Elevation2NW;
args.terrainStartHeight0 = m_scene.RegionInfo.EstateSettings.terrainStartHeight0; args.terrainStartHeight2 = (float)m_scene.RegionInfo.RegionSettings.Elevation1SE;
args.terrainStartHeight1 = m_scene.RegionInfo.EstateSettings.terrainStartHeight1; args.terrainHeightRange2 = (float)m_scene.RegionInfo.RegionSettings.Elevation2SE;
args.terrainStartHeight2 = m_scene.RegionInfo.EstateSettings.terrainStartHeight2; args.terrainStartHeight3 = (float)m_scene.RegionInfo.RegionSettings.Elevation1NE;
args.terrainStartHeight3 = m_scene.RegionInfo.EstateSettings.terrainStartHeight3; args.terrainHeightRange3 = (float)m_scene.RegionInfo.RegionSettings.Elevation2NE;
byte mature = 13; byte mature = 13;
if(m_scene.RegionInfo.RegionSettings.Maturity == 1) if(m_scene.RegionInfo.RegionSettings.Maturity == 1)
mature = 21; mature = 21;
@ -549,14 +530,14 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
args.regionFlags = GetRegionFlags(); args.regionFlags = GetRegionFlags();
args.regionName = m_scene.RegionInfo.RegionName; args.regionName = m_scene.RegionInfo.RegionName;
args.SimOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID; args.SimOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID;
args.terrainBase0 = m_scene.RegionInfo.EstateSettings.terrainBase0; args.terrainBase0 = m_scene.RegionInfo.RegionSettings.TerrainTexture1;
args.terrainBase1 = m_scene.RegionInfo.EstateSettings.terrainBase1; args.terrainBase1 = m_scene.RegionInfo.RegionSettings.TerrainTexture2;
args.terrainBase2 = m_scene.RegionInfo.EstateSettings.terrainBase2; args.terrainBase2 = m_scene.RegionInfo.RegionSettings.TerrainTexture3;
args.terrainBase3 = m_scene.RegionInfo.EstateSettings.terrainBase3; args.terrainBase3 = m_scene.RegionInfo.RegionSettings.TerrainTexture4;
args.terrainDetail0 = m_scene.RegionInfo.EstateSettings.terrainDetail0; args.terrainDetail0 = m_scene.RegionInfo.RegionSettings.TerrainTexture1;
args.terrainDetail1 = m_scene.RegionInfo.EstateSettings.terrainDetail1; args.terrainDetail1 = m_scene.RegionInfo.RegionSettings.TerrainTexture2;
args.terrainDetail2 = m_scene.RegionInfo.EstateSettings.terrainDetail2; args.terrainDetail2 = m_scene.RegionInfo.RegionSettings.TerrainTexture3;
args.terrainDetail3 = m_scene.RegionInfo.EstateSettings.terrainDetail3; args.terrainDetail3 = m_scene.RegionInfo.RegionSettings.TerrainTexture4;
remoteClient.SendRegionHandshake(m_scene.RegionInfo,args); remoteClient.SendRegionHandshake(m_scene.RegionInfo,args);
} }
@ -617,7 +598,6 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
client.OnDetailedEstateDataRequest += sendDetailedEstateData; client.OnDetailedEstateDataRequest += sendDetailedEstateData;
client.OnSetEstateFlagsRequest += estateSetRegionInfoHandler; client.OnSetEstateFlagsRequest += estateSetRegionInfoHandler;
client.OnSetEstateTerrainBaseTexture += setEstateTerrainBaseTexture; client.OnSetEstateTerrainBaseTexture += setEstateTerrainBaseTexture;
client.OnSetEstateTerrainDetailTexture += setEstateTerrainDetailTexture;
client.OnSetEstateTerrainTextureHeights += setEstateTerrainTextureHeights; client.OnSetEstateTerrainTextureHeights += setEstateTerrainTextureHeights;
client.OnCommitEstateTerrainTextureRequest += handleCommitEstateTerrainTextureRequest; client.OnCommitEstateTerrainTextureRequest += handleCommitEstateTerrainTextureRequest;
client.OnSetRegionTerrainSettings += setRegionTerrainSettings; client.OnSetRegionTerrainSettings += setRegionTerrainSettings;

View File

@ -300,7 +300,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{ {
if (over.landData.localID == landData.localID) if (over.landData.localID == landData.localID)
{ {
if ((over.landData.landFlags & (uint)Parcel.ParcelFlags.AllowDamage) != 0) if (((over.landData.landFlags & (uint)Parcel.ParcelFlags.AllowDamage) != 0) && m_scene.RegionInfo.RegionSettings.AllowDamage)
avatars[i].Invulnerable = false; avatars[i].Invulnerable = false;
else else
avatars[i].Invulnerable = true; avatars[i].Invulnerable = true;