*Added Estate Tools for terrain texturing, terrain texturing heights per corner, water height, region flags, etc basic settings

*Parcel now sends ParcelProperties when the owner changes information as soon as the information is changed
zircon^2
mingchen 2007-06-08 03:54:03 +00:00
parent 5caf2faa24
commit 269ff893df
16 changed files with 520 additions and 291 deletions

View File

@ -159,7 +159,7 @@
<Compile Include="Properties\AssemblyInfo.cs"> <Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="Types\AgentCircuitData.cs"> <Compile Include="Types\EstateSettings.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="Types\AssetBase.cs"> <Compile Include="Types\AssetBase.cs">
@ -186,7 +186,7 @@
<Compile Include="Types\PrimData.cs"> <Compile Include="Types\PrimData.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="Types\EstateSettings.cs"> <Compile Include="Types\AgentCircuitData.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
</ItemGroup> </ItemGroup>

View File

@ -36,7 +36,7 @@
<include name="Interfaces/IScriptAPI.cs" /> <include name="Interfaces/IScriptAPI.cs" />
<include name="Interfaces/ILocalStorage.cs" /> <include name="Interfaces/ILocalStorage.cs" />
<include name="Properties/AssemblyInfo.cs" /> <include name="Properties/AssemblyInfo.cs" />
<include name="Types/AgentCircuitData.cs" /> <include name="Types/EstateSettings.cs" />
<include name="Types/AssetBase.cs" /> <include name="Types/AssetBase.cs" />
<include name="Types/AssetLandmark.cs" /> <include name="Types/AssetLandmark.cs" />
<include name="Types/AssetStorage.cs" /> <include name="Types/AssetStorage.cs" />
@ -45,7 +45,7 @@
<include name="Types/OSVector3.cs" /> <include name="Types/OSVector3.cs" />
<include name="Types/ParcelData.cs" /> <include name="Types/ParcelData.cs" />
<include name="Types/PrimData.cs" /> <include name="Types/PrimData.cs" />
<include name="Types/EstateSettings.cs" /> <include name="Types/AgentCircuitData.cs" />
</sources> </sources>
<references basedir="${project::get-base-directory()}"> <references basedir="${project::get-base-directory()}">
<lib> <lib>

View File

@ -46,15 +46,14 @@ namespace OpenSim.Framework.Types
public int redirectGridX = 0; //?? public int redirectGridX = 0; //??
public int redirectGridY = 0; //?? public int redirectGridY = 0; //??
public uint regionFlags = 0; //?? public libsecondlife.Simulator.RegionFlags regionFlags = libsecondlife.Simulator.RegionFlags.None; //Booleam values of various region settings
public libsecondlife.Simulator.SimAccess simAccess = libsecondlife.Simulator.SimAccess.Mature; //Is sim PG, Mature, etc? Mature by default.
public byte simAccess = 0; //??
public float sunHour = 0; public float sunHour = 0;
public float terrainRaiseLimit = 0; public float terrainRaiseLimit = 0;
public float terrainLowerLimit = 0; public float terrainLowerLimit = 0;
public bool useEstateSun = false; public bool useFixedSun = false;
public int pricePerMeter = 1; public int pricePerMeter = 1;
public ushort regionWaterHeight = 20; public ushort regionWaterHeight = 20;
@ -74,18 +73,18 @@ namespace OpenSim.Framework.Types
public LLUUID terrainDetail3 = new LLUUID("00000000-0000-0000-0000-000000000000"); public LLUUID terrainDetail3 = new LLUUID("00000000-0000-0000-0000-000000000000");
// 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 terrainStartHeightNW = 10.0f; // NW Corner ( I think ) public float terrainStartHeight0 = 10.0f;
public float terrainStartHeightNE = 10.0f; // NE Corner ( I think ) public float terrainStartHeight1 = 10.0f;
public float terrainStartHeightSW = 10.0f; // SW Corner ( I think ) public float terrainStartHeight2 = 10.0f;
public float terrainStartHeightSE = 10.0f; // SE Corner ( I think ) public float terrainStartHeight3 = 10.0f;
// Second quad - also bilinearly interpolated. // Second quad - also bilinearly interpolated.
// Terrain texturing is done that: // Terrain texturing is done that:
// 0..3 (0 = base0, 3 = base3) = (terrain[x,y] - start[x,y]) / range[x,y] // 0..3 (0 = base0, 3 = base3) = (terrain[x,y] - start[x,y]) / range[x,y]
public float terrainHeightRangeNW = 60.0f; //00 public float terrainHeightRange0 = 60.0f; //00
public float terrainHeightRangeNE = 60.0f; //01 public float terrainHeightRange1 = 60.0f; //01
public float terrainHeightRangeSW = 60.0f; //10 public float terrainHeightRange2 = 60.0f; //10
public float terrainHeightRangeSE = 60.0f; //11 public float terrainHeightRange3 = 60.0f; //11
// Terrain Default (Must be in F32 Format!) // Terrain Default (Must be in F32 Format!)
public string terrainFile = "default.r32"; public string terrainFile = "default.r32";

View File

@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 9.00 Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C# Express 2005 # Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenUser.Config.UserConfigDb4o", "OpenGridServices\OpenUser.Config\UserConfigDb4o\OpenUser.Config.UserConfigDb4o.csproj", "{7E494328-0000-0000-0000-000000000000}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenUser.Config.UserConfigDb4o", "OpenGridServices\OpenUser.Config\UserConfigDb4o\OpenUser.Config.UserConfigDb4o.csproj", "{7E494328-0000-0000-0000-000000000000}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGridServices.AssetServer", "OpenGridServices\OpenGridServices.AssetServer\OpenGridServices.AssetServer.csproj", "{0021261B-0000-0000-0000-000000000000}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGridServices.AssetServer", "OpenGridServices\OpenGridServices.AssetServer\OpenGridServices.AssetServer.csproj", "{0021261B-0000-0000-0000-000000000000}"
@ -31,6 +31,16 @@ Global
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
({1E3F341A-0000-0000-0000-000000000000}).4 = ({62CDF671-0000-0000-0000-000000000000})
({39BD9497-0000-0000-0000-000000000000}).3 = ({62CDF671-0000-0000-0000-000000000000})
({21BFC8E2-0000-0000-0000-000000000000}).6 = ({62CDF671-0000-0000-0000-000000000000})
({21BFC8E2-0000-0000-0000-000000000000}).7 = ({7924FD35-0000-0000-0000-000000000000})
({0A563AC1-0000-0000-0000-000000000000}).3 = ({62CDF671-0000-0000-0000-000000000000})
({338FA00B-0000-0000-0000-000000000000}).6 = ({62CDF671-0000-0000-0000-000000000000})
({66591469-0000-0000-0000-000000000000}).5 = ({62CDF671-0000-0000-0000-000000000000})
({0F3C3AC1-0000-0000-0000-000000000000}).3 = ({62CDF671-0000-0000-0000-000000000000})
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU {7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU

View File

@ -1,4 +1,4 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ProjectType>Local</ProjectType> <ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion> <ProductVersion>8.0.50727</ProductVersion>
@ -6,8 +6,7 @@
<ProjectGuid>{E141F4EE-0000-0000-0000-000000000000}</ProjectGuid> <ProjectGuid>{E141F4EE-0000-0000-0000-000000000000}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon> <ApplicationIcon></ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName> <AssemblyKeyContainerName>
</AssemblyKeyContainerName> </AssemblyKeyContainerName>
<AssemblyName>ServiceManager</AssemblyName> <AssemblyName>ServiceManager</AssemblyName>
@ -16,11 +15,9 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema> <DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign> <DelaySign>false</DelaySign>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<AppDesignerFolder> <AppDesignerFolder></AppDesignerFolder>
</AppDesignerFolder>
<RootNamespace>ServiceManager</RootNamespace> <RootNamespace>ServiceManager</RootNamespace>
<StartupObject> <StartupObject></StartupObject>
</StartupObject>
<FileUpgradeFlags> <FileUpgradeFlags>
</FileUpgradeFlags> </FileUpgradeFlags>
</PropertyGroup> </PropertyGroup>
@ -31,8 +28,7 @@
<ConfigurationOverrideFile> <ConfigurationOverrideFile>
</ConfigurationOverrideFile> </ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG</DefineConstants> <DefineConstants>TRACE;DEBUG</DefineConstants>
<DocumentationFile> <DocumentationFile></DocumentationFile>
</DocumentationFile>
<DebugSymbols>True</DebugSymbols> <DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize> <Optimize>False</Optimize>
@ -41,8 +37,7 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks> <RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoWarn> <NoWarn></NoWarn>
</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@ -51,8 +46,7 @@
<ConfigurationOverrideFile> <ConfigurationOverrideFile>
</ConfigurationOverrideFile> </ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<DocumentationFile> <DocumentationFile></DocumentationFile>
</DocumentationFile>
<DebugSymbols>False</DebugSymbols> <DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize> <Optimize>True</Optimize>
@ -61,31 +55,30 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks> <RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoWarn> <NoWarn></NoWarn>
</NoWarn>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System"> <Reference Include="System" >
<HintPath>System.dll</HintPath> <HintPath>System.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="System.ServiceProcess"> <Reference Include="System.ServiceProcess" >
<HintPath>System.ServiceProcess.dll</HintPath> <HintPath>System.ServiceProcess.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="System.Xml"> <Reference Include="System.Xml" >
<HintPath>System.Xml.dll</HintPath> <HintPath>System.Xml.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="libsecondlife.dll"> <Reference Include="libsecondlife.dll" >
<HintPath>..\..\bin\libsecondlife.dll</HintPath> <HintPath>..\..\bin\libsecondlife.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="OpenSim.GenericConfig.Xml"> <Reference Include="OpenSim.GenericConfig.Xml" >
<HintPath>OpenSim.GenericConfig.Xml.dll</HintPath> <HintPath>OpenSim.GenericConfig.Xml.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="OpenSim.Framework.dll"> <Reference Include="OpenSim.Framework.dll" >
<HintPath>..\..\bin\OpenSim.Framework.dll</HintPath> <HintPath>..\..\bin\OpenSim.Framework.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
@ -94,7 +87,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="ServiceManager.cs"> <Compile Include="ServiceManager.cs">
<SubType>Component</SubType> <SubType>Code</SubType>
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />

View File

@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 9.00 Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C# Express 2005 # Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Terrain.BasicTerrain", "OpenSim\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj", "{2270B8FE-0000-0000-0000-000000000000}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Terrain.BasicTerrain", "OpenSim\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj", "{2270B8FE-0000-0000-0000-000000000000}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Storage.LocalStorageBerkeleyDB", "OpenSim\OpenSim.Storage\LocalStorageBerkeleyDB\OpenSim.Storage.LocalStorageBerkeleyDB.csproj", "{EE9E5D96-0000-0000-0000-000000000000}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Storage.LocalStorageBerkeleyDB", "OpenSim\OpenSim.Storage\LocalStorageBerkeleyDB\OpenSim.Storage.LocalStorageBerkeleyDB.csproj", "{EE9E5D96-0000-0000-0000-000000000000}"
@ -41,6 +41,45 @@ Global
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
({EE9E5D96-0000-0000-0000-000000000000}).6 = ({8ACA2445-0000-0000-0000-000000000000})
({EE9E5D96-0000-0000-0000-000000000000}).7 = ({A7CD0630-0000-0000-0000-000000000000})
({63A05FE9-0000-0000-0000-000000000000}).2 = ({8BE16150-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).5 = ({2270B8FE-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).6 = ({8ACA2445-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).7 = ({A7CD0630-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).8 = ({8BE16150-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).9 = ({8BB20F0A-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).10 = ({632E1BFD-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).11 = ({E88EF749-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).12 = ({8E81D43C-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).5 = ({2270B8FE-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).6 = ({8ACA2445-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).7 = ({A7CD0630-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).8 = ({E88EF749-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).9 = ({8BE16150-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).10 = ({8BB20F0A-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).11 = ({8E81D43C-0000-0000-0000-000000000000})
({E88EF749-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
({8BE16150-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
({8BE16150-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
({4F874463-0000-0000-0000-000000000000}).2 = ({8BE16150-0000-0000-0000-000000000000})
({988F0AC4-0000-0000-0000-000000000000}).3 = ({8BE16150-0000-0000-0000-000000000000})
({B55C0B5D-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
({B55C0B5D-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
({B55C0B5D-0000-0000-0000-000000000000}).5 = ({8E81D43C-0000-0000-0000-000000000000})
({8ACA2445-0000-0000-0000-000000000000}).4 = ({8E81D43C-0000-0000-0000-000000000000})
({8BB20F0A-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
({8BB20F0A-0000-0000-0000-000000000000}).3 = ({A7CD0630-0000-0000-0000-000000000000})
({8BB20F0A-0000-0000-0000-000000000000}).5 = ({8E81D43C-0000-0000-0000-000000000000})
({E1B79ECF-0000-0000-0000-000000000000}).4 = ({8ACA2445-0000-0000-0000-000000000000})
({E1B79ECF-0000-0000-0000-000000000000}).5 = ({A7CD0630-0000-0000-0000-000000000000})
({6B20B603-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
({6B20B603-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
({97A82740-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
({546099CD-0000-0000-0000-000000000000}).4 = ({8ACA2445-0000-0000-0000-000000000000})
({546099CD-0000-0000-0000-000000000000}).5 = ({A7CD0630-0000-0000-0000-000000000000})
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU {2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU

View File

@ -144,6 +144,7 @@ namespace OpenSim.RegionServer.Client
m_world.parcelManager.sendParcelOverlay(this); m_world.parcelManager.sendParcelOverlay(this);
m_world.estateManager.sendRegionInfoPacket(this);
ClientThread = new Thread(new ThreadStart(AuthUser)); ClientThread = new Thread(new ThreadStart(AuthUser));
ClientThread.IsBackground = true; ClientThread.IsBackground = true;

View File

@ -24,6 +24,16 @@ namespace OpenSim.RegionServer.Estate
m_world = world; //Estate settings found at world.m_regInfo.estateSettings m_world = world; //Estate settings found at world.m_regInfo.estateSettings
} }
private bool convertParamStringToBool(byte[] field)
{
string s = Helpers.FieldToUTF8String(field);
if (s == "1" || s.ToLower() == "y" || s.ToLower() == "yes" || s.ToLower() == "t" || s.ToLower() == "true")
{
return true;
}
return false;
}
public void handleEstateOwnerMessage(EstateOwnerMessagePacket packet, ClientView remote_client) public void handleEstateOwnerMessage(EstateOwnerMessagePacket packet, ClientView remote_client)
{ {
if (remote_client.AgentID == m_world.m_regInfo.MasterAvatarAssignedUUID) if (remote_client.AgentID == m_world.m_regInfo.MasterAvatarAssignedUUID)
@ -32,6 +42,195 @@ namespace OpenSim.RegionServer.Estate
{ {
case "getinfo": case "getinfo":
Console.WriteLine("GETINFO Requested"); Console.WriteLine("GETINFO Requested");
this.sendRegionInfoPacketToAll();
break;
case "setregioninfo":
if (packet.ParamList.Length != 9)
{
OpenSim.Framework.Console.MainConsole.Instance.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length");
}
else
{
m_world.m_regInfo.estateSettings.regionFlags = libsecondlife.Simulator.RegionFlags.None;
if (convertParamStringToBool(packet.ParamList[0].Parameter))
{
m_world.m_regInfo.estateSettings.regionFlags = m_world.m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.BlockTerraform;
}
if (convertParamStringToBool(packet.ParamList[1].Parameter))
{
m_world.m_regInfo.estateSettings.regionFlags = m_world.m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.NoFly;
}
if (convertParamStringToBool(packet.ParamList[2].Parameter))
{
m_world.m_regInfo.estateSettings.regionFlags = m_world.m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.AllowDamage;
}
if (convertParamStringToBool(packet.ParamList[3].Parameter) == false)
{
m_world.m_regInfo.estateSettings.regionFlags = m_world.m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.BlockLandResell;
}
int tempMaxAgents = Convert.ToInt16(Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[4].Parameter)));
m_world.m_regInfo.estateSettings.maxAgents = (byte)tempMaxAgents;
float tempObjectBonusFactor = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter));
m_world.m_regInfo.estateSettings.objectBonusFactor = tempObjectBonusFactor;
int tempMatureLevel = Convert.ToInt16(Helpers.FieldToUTF8String(packet.ParamList[6].Parameter));
m_world.m_regInfo.estateSettings.simAccess = (libsecondlife.Simulator.SimAccess)tempMatureLevel;
if (convertParamStringToBool(packet.ParamList[7].Parameter))
{
m_world.m_regInfo.estateSettings.regionFlags = m_world.m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.RestrictPushObject;
}
if (convertParamStringToBool(packet.ParamList[8].Parameter))
{
m_world.m_regInfo.estateSettings.regionFlags = m_world.m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.AllowParcelChanges;
}
sendRegionInfoPacketToAll();
}
break;
case "texturebase":
foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
{
string s = Helpers.FieldToUTF8String(block.Parameter);
string[] splitField = s.Split(' ');
if (splitField.Length == 2)
{
LLUUID tempUUID = new LLUUID(splitField[1]);
switch (Convert.ToInt16(splitField[0]))
{
case 0:
m_world.m_regInfo.estateSettings.terrainBase0 = tempUUID;
break;
case 1:
m_world.m_regInfo.estateSettings.terrainBase1 = tempUUID;
break;
case 2:
m_world.m_regInfo.estateSettings.terrainBase2 = tempUUID;
break;
case 3:
m_world.m_regInfo.estateSettings.terrainBase3 = tempUUID;
break;
}
}
}
break;
case "texturedetail":
foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
{
string s = Helpers.FieldToUTF8String(block.Parameter);
string[] splitField = s.Split(' ');
if (splitField.Length == 2)
{
LLUUID tempUUID = new LLUUID(splitField[1]);
switch (Convert.ToInt16(splitField[0]))
{
case 0:
m_world.m_regInfo.estateSettings.terrainDetail0 = tempUUID;
break;
case 1:
m_world.m_regInfo.estateSettings.terrainDetail1 = tempUUID;
break;
case 2:
m_world.m_regInfo.estateSettings.terrainDetail2 = tempUUID;
break;
case 3:
m_world.m_regInfo.estateSettings.terrainDetail3 = tempUUID;
break;
}
}
}
break;
case "textureheights":
foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
{
string s = Helpers.FieldToUTF8String(block.Parameter);
string[] splitField = s.Split(' ');
if (splitField.Length == 3)
{
float tempHeightLow = (float)Convert.ToDecimal(splitField[1]);
float tempHeightHigh = (float)Convert.ToDecimal(splitField[2]);
switch (Convert.ToInt16(splitField[0]))
{
case 0:
m_world.m_regInfo.estateSettings.terrainStartHeight0 = tempHeightLow;
m_world.m_regInfo.estateSettings.terrainHeightRange0 = tempHeightHigh;
break;
case 1:
m_world.m_regInfo.estateSettings.terrainStartHeight1 = tempHeightLow;
m_world.m_regInfo.estateSettings.terrainHeightRange1 = tempHeightHigh;
break;
case 2:
m_world.m_regInfo.estateSettings.terrainStartHeight2 = tempHeightLow;
m_world.m_regInfo.estateSettings.terrainHeightRange2 = tempHeightHigh;
break;
case 3:
m_world.m_regInfo.estateSettings.terrainStartHeight3 = tempHeightLow;
m_world.m_regInfo.estateSettings.terrainHeightRange3 = tempHeightHigh;
break;
}
}
}
break;
case "texturecommit":
sendRegionHandshakeToAll();
break;
case "setregionterrain":
if (packet.ParamList.Length != 9)
{
OpenSim.Framework.Console.MainConsole.Instance.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length");
}
else
{
m_world.m_regInfo.estateSettings.waterHeight = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[0].Parameter));
m_world.m_regInfo.estateSettings.terrainRaiseLimit = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[1].Parameter));
m_world.m_regInfo.estateSettings.terrainLowerLimit = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[2].Parameter));
m_world.m_regInfo.estateSettings.useFixedSun = this.convertParamStringToBool(packet.ParamList[4].Parameter);
m_world.m_regInfo.estateSettings.sunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter));
sendRegionInfoPacketToAll();
}
break;
default:
OpenSim.Framework.Console.MainConsole.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
break;
}
}
}
public void sendRegionInfoPacketToAll()
{
foreach (OpenSim.RegionServer.Simulator.Avatar av in m_world.Avatars.Values)
{
this.sendRegionInfoPacket(av.ControllingClient);
}
}
public void sendRegionHandshakeToAll()
{
foreach (OpenSim.RegionServer.Simulator.Avatar av in m_world.Avatars.Values)
{
this.sendRegionHandshake(av.ControllingClient);
}
}
public void sendRegionInfoPacket(ClientView remote_client)
{
RegionInfoPacket regionInfoPacket = new RegionInfoPacket(); RegionInfoPacket regionInfoPacket = new RegionInfoPacket();
regionInfoPacket.AgentData.AgentID = remote_client.AgentID; regionInfoPacket.AgentData.AgentID = remote_client.AgentID;
regionInfoPacket.AgentData.SessionID = remote_client.SessionID; regionInfoPacket.AgentData.SessionID = remote_client.SessionID;
@ -43,22 +242,52 @@ namespace OpenSim.RegionServer.Estate
regionInfoPacket.RegionInfo.PricePerMeter = m_world.m_regInfo.estateSettings.pricePerMeter; regionInfoPacket.RegionInfo.PricePerMeter = m_world.m_regInfo.estateSettings.pricePerMeter;
regionInfoPacket.RegionInfo.RedirectGridX = m_world.m_regInfo.estateSettings.redirectGridX; regionInfoPacket.RegionInfo.RedirectGridX = m_world.m_regInfo.estateSettings.redirectGridX;
regionInfoPacket.RegionInfo.RedirectGridY = m_world.m_regInfo.estateSettings.redirectGridY; regionInfoPacket.RegionInfo.RedirectGridY = m_world.m_regInfo.estateSettings.redirectGridY;
regionInfoPacket.RegionInfo.RegionFlags = m_world.m_regInfo.estateSettings.regionFlags; regionInfoPacket.RegionInfo.RegionFlags = (uint)m_world.m_regInfo.estateSettings.regionFlags;
regionInfoPacket.RegionInfo.SimAccess = m_world.m_regInfo.estateSettings.simAccess; regionInfoPacket.RegionInfo.SimAccess = (byte)m_world.m_regInfo.estateSettings.simAccess;
regionInfoPacket.RegionInfo.SimName = Helpers.StringToField(m_world.m_regInfo.RegionName); regionInfoPacket.RegionInfo.SimName = Helpers.StringToField(m_world.m_regInfo.RegionName);
regionInfoPacket.RegionInfo.SunHour = m_world.m_regInfo.estateSettings.sunHour; regionInfoPacket.RegionInfo.SunHour = m_world.m_regInfo.estateSettings.sunHour;
regionInfoPacket.RegionInfo.TerrainLowerLimit = m_world.m_regInfo.estateSettings.terrainLowerLimit; regionInfoPacket.RegionInfo.TerrainLowerLimit = m_world.m_regInfo.estateSettings.terrainLowerLimit;
regionInfoPacket.RegionInfo.TerrainRaiseLimit = m_world.m_regInfo.estateSettings.terrainRaiseLimit; regionInfoPacket.RegionInfo.TerrainRaiseLimit = m_world.m_regInfo.estateSettings.terrainRaiseLimit;
regionInfoPacket.RegionInfo.UseEstateSun = m_world.m_regInfo.estateSettings.useEstateSun; regionInfoPacket.RegionInfo.UseEstateSun = !m_world.m_regInfo.estateSettings.useFixedSun;
regionInfoPacket.RegionInfo.WaterHeight = m_world.m_regInfo.estateSettings.waterHeight; regionInfoPacket.RegionInfo.WaterHeight = m_world.m_regInfo.estateSettings.waterHeight;
remote_client.OutPacket(regionInfoPacket); remote_client.OutPacket(regionInfoPacket);
break;
default:
OpenSim.Framework.Console.MainConsole.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
break;
}
} }
public void sendRegionHandshake(ClientView remote_client)
{
System.Text.Encoding _enc = System.Text.Encoding.ASCII;
RegionHandshakePacket handshake = new RegionHandshakePacket();
handshake.RegionInfo.BillableFactor = m_world.m_regInfo.estateSettings.billableFactor;
handshake.RegionInfo.IsEstateManager = false;
handshake.RegionInfo.TerrainHeightRange00 = m_world.m_regInfo.estateSettings.terrainHeightRange0;
handshake.RegionInfo.TerrainHeightRange01 = m_world.m_regInfo.estateSettings.terrainHeightRange1;
handshake.RegionInfo.TerrainHeightRange10 = m_world.m_regInfo.estateSettings.terrainHeightRange2;
handshake.RegionInfo.TerrainHeightRange11 = m_world.m_regInfo.estateSettings.terrainHeightRange3;
handshake.RegionInfo.TerrainStartHeight00 = m_world.m_regInfo.estateSettings.terrainStartHeight0;
handshake.RegionInfo.TerrainStartHeight01 = m_world.m_regInfo.estateSettings.terrainStartHeight1;
handshake.RegionInfo.TerrainStartHeight10 = m_world.m_regInfo.estateSettings.terrainStartHeight2;
handshake.RegionInfo.TerrainStartHeight11 = m_world.m_regInfo.estateSettings.terrainStartHeight3;
handshake.RegionInfo.SimAccess = (byte)m_world.m_regInfo.estateSettings.simAccess;
handshake.RegionInfo.WaterHeight = m_world.m_regInfo.estateSettings.waterHeight;
handshake.RegionInfo.RegionFlags = (uint)m_world.m_regInfo.estateSettings.regionFlags;
handshake.RegionInfo.SimName = _enc.GetBytes(m_world.m_regInfo.estateSettings.waterHeight + "\0");
handshake.RegionInfo.SimOwner = m_world.m_regInfo.MasterAvatarAssignedUUID;
handshake.RegionInfo.TerrainBase0 = m_world.m_regInfo.estateSettings.terrainBase0;
handshake.RegionInfo.TerrainBase1 = m_world.m_regInfo.estateSettings.terrainBase1;
handshake.RegionInfo.TerrainBase2 = m_world.m_regInfo.estateSettings.terrainBase2;
handshake.RegionInfo.TerrainBase3 = m_world.m_regInfo.estateSettings.terrainBase3;
handshake.RegionInfo.TerrainDetail0 = m_world.m_regInfo.estateSettings.terrainDetail0;
handshake.RegionInfo.TerrainDetail1 = m_world.m_regInfo.estateSettings.terrainDetail1;
handshake.RegionInfo.TerrainDetail2 = m_world.m_regInfo.estateSettings.terrainDetail2;
handshake.RegionInfo.TerrainDetail3 = m_world.m_regInfo.estateSettings.terrainDetail3;
handshake.RegionInfo.CacheID = LLUUID.Random(); //I guess this is for the client to remember an old setting?
remote_client.OutPacket(handshake);
} }
} }
} }

View File

@ -154,15 +154,15 @@
<Compile Include="AgentAssetUpload.cs"> <Compile Include="AgentAssetUpload.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="RegionServerBase.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="RegionInfoBase.cs"> <Compile Include="RegionInfoBase.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="RegionInfo.cs"> <Compile Include="RegionInfo.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="RegionServerBase.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Simulator\Avatar.Client.cs"> <Compile Include="Simulator\Avatar.Client.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
@ -172,9 +172,6 @@
<Compile Include="Simulator\World.PacketHandlers.cs"> <Compile Include="Simulator\World.PacketHandlers.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="Simulator\Avatar.Update.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Simulator\AvatarAnimations.cs"> <Compile Include="Simulator\AvatarAnimations.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
@ -190,13 +187,16 @@
<Compile Include="Simulator\Primitive2.cs"> <Compile Include="Simulator\Primitive2.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="Simulator\SceneObject.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Simulator\Avatar.cs"> <Compile Include="Simulator\Avatar.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="Simulator\World.cs"> <Compile Include="Simulator\Avatar.Update.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="Simulator\SceneObject.cs"> <Compile Include="Simulator\World.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="Simulator\ParcelManager.cs"> <Compile Include="Simulator\ParcelManager.cs">
@ -244,10 +244,10 @@
<Compile Include="Client\ClientView.PacketHandlers.cs"> <Compile Include="Client\ClientView.PacketHandlers.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="Client\ClientView.ProcessPackets.cs"> <Compile Include="Client\ClientViewBase.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="Client\ClientViewBase.cs"> <Compile Include="Client\ClientView.ProcessPackets.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="Client\ClientView.cs"> <Compile Include="Client\ClientView.cs">

View File

@ -21,21 +21,21 @@
<include name="AuthenticateSessionsBase.cs" /> <include name="AuthenticateSessionsBase.cs" />
<include name="VersionInfo.cs" /> <include name="VersionInfo.cs" />
<include name="AgentAssetUpload.cs" /> <include name="AgentAssetUpload.cs" />
<include name="RegionServerBase.cs" />
<include name="RegionInfoBase.cs" /> <include name="RegionInfoBase.cs" />
<include name="RegionInfo.cs" /> <include name="RegionInfo.cs" />
<include name="RegionServerBase.cs" />
<include name="Simulator/Avatar.Client.cs" /> <include name="Simulator/Avatar.Client.cs" />
<include name="Simulator/Entity.cs" /> <include name="Simulator/Entity.cs" />
<include name="Simulator/World.PacketHandlers.cs" /> <include name="Simulator/World.PacketHandlers.cs" />
<include name="Simulator/Avatar.Update.cs" />
<include name="Simulator/AvatarAnimations.cs" /> <include name="Simulator/AvatarAnimations.cs" />
<include name="Simulator/WorldBase.cs" /> <include name="Simulator/WorldBase.cs" />
<include name="Simulator/Primitive.cs" /> <include name="Simulator/Primitive.cs" />
<include name="Simulator/World.Scripting.cs" /> <include name="Simulator/World.Scripting.cs" />
<include name="Simulator/Primitive2.cs" /> <include name="Simulator/Primitive2.cs" />
<include name="Simulator/Avatar.cs" />
<include name="Simulator/World.cs" />
<include name="Simulator/SceneObject.cs" /> <include name="Simulator/SceneObject.cs" />
<include name="Simulator/Avatar.cs" />
<include name="Simulator/Avatar.Update.cs" />
<include name="Simulator/World.cs" />
<include name="Simulator/ParcelManager.cs" /> <include name="Simulator/ParcelManager.cs" />
<include name="Estate/EstateManager.cs" /> <include name="Estate/EstateManager.cs" />
<include name="CAPS/AdminWebFront.cs" /> <include name="CAPS/AdminWebFront.cs" />
@ -51,8 +51,8 @@
<include name="Types/Triangle.cs" /> <include name="Types/Triangle.cs" />
<include name="Client/ClientView.Grid.cs" /> <include name="Client/ClientView.Grid.cs" />
<include name="Client/ClientView.PacketHandlers.cs" /> <include name="Client/ClientView.PacketHandlers.cs" />
<include name="Client/ClientView.ProcessPackets.cs" />
<include name="Client/ClientViewBase.cs" /> <include name="Client/ClientViewBase.cs" />
<include name="Client/ClientView.ProcessPackets.cs" />
<include name="Client/ClientView.cs" /> <include name="Client/ClientView.cs" />
</sources> </sources>
<references basedir="${project::get-base-directory()}"> <references basedir="${project::get-base-directory()}">

View File

@ -54,7 +54,7 @@ namespace OpenSim.RegionServer.Simulator
//use CreateTerseBlock() //use CreateTerseBlock()
ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock(); ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock();
ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
terse.RegionData.RegionHandle = m_regionHandle; // FIXME terse.RegionData.RegionHandle = m_world.m_regInfo.RegionHandle;
terse.RegionData.TimeDilation = 64096; terse.RegionData.TimeDilation = 64096;
terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
terse.ObjectData[0] = terseBlock; terse.ObjectData[0] = terseBlock;
@ -78,7 +78,7 @@ namespace OpenSim.RegionServer.Simulator
//It has been a while since last update was sent so lets send one. //It has been a while since last update was sent so lets send one.
ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock(); ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock();
ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
terse.RegionData.RegionHandle = m_regionHandle; // FIXME terse.RegionData.RegionHandle = m_world.m_regInfo.RegionHandle;
terse.RegionData.TimeDilation = 64096; terse.RegionData.TimeDilation = 64096;
terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
terse.ObjectData[0] = terseBlock; terse.ObjectData[0] = terseBlock;
@ -158,7 +158,7 @@ namespace OpenSim.RegionServer.Simulator
System.Text.Encoding _enc = System.Text.Encoding.ASCII; System.Text.Encoding _enc = System.Text.Encoding.ASCII;
//send a objectupdate packet with information about the clients avatar //send a objectupdate packet with information about the clients avatar
ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); ObjectUpdatePacket objupdate = new ObjectUpdatePacket();
objupdate.RegionData.RegionHandle = m_regionHandle; objupdate.RegionData.RegionHandle = m_world.m_regInfo.RegionHandle;
objupdate.RegionData.TimeDilation = 64096; objupdate.RegionData.TimeDilation = 64096;
objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1]; objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1];
@ -182,7 +182,7 @@ namespace OpenSim.RegionServer.Simulator
//send a objectupdate packet with information about the clients avatar //send a objectupdate packet with information about the clients avatar
ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); ObjectUpdatePacket objupdate = new ObjectUpdatePacket();
objupdate.RegionData.RegionHandle = m_regionHandle; objupdate.RegionData.RegionHandle = m_world.m_regInfo.RegionHandle;
objupdate.RegionData.TimeDilation = 64096; objupdate.RegionData.TimeDilation = 64096;
objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1]; objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1];
objupdate.ObjectData[0] = AvatarTemplate; objupdate.ObjectData[0] = AvatarTemplate;

View File

@ -66,24 +66,15 @@ namespace OpenSim.RegionServer.Simulator
private int positionParcelHoverLocalID = -1; //Local ID of the last parcel they were over private int positionParcelHoverLocalID = -1; //Local ID of the last parcel they were over
private int parcelUpdateSequenceIncrement = 1; private int parcelUpdateSequenceIncrement = 1;
private ulong m_regionHandle;
//private Dictionary<uint, ClientView> m_clientThreads;
private string m_regionName;
private ushort m_regionWaterHeight;
private bool m_regionTerraform;
private bool childAvatar = false; private bool childAvatar = false;
public Avatar(ClientView TheClient, World world, string regionName, Dictionary<uint, ClientView> clientThreads, ulong regionHandle, bool regionTerraform, ushort regionWater) public Avatar(ClientView TheClient, World world)
{ {
m_world = world; m_world = world;
// m_clientThreads = clientThreads; ControllingClient = TheClient;
m_regionName = regionName;
m_regionHandle = regionHandle;
m_regionTerraform = regionTerraform;
m_regionWaterHeight = regionWater;
OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs - Loading details from grid (DUMMY)"); OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs - Loading details from grid (DUMMY)");
ControllingClient = TheClient;
localid = 8880000 + (this.m_world._localNumber++); localid = 8880000 + (this.m_world._localNumber++);
Pos = ControllingClient.startpos; Pos = ControllingClient.startpos;
visualParams = new byte[218]; visualParams = new byte[218];
@ -133,7 +124,7 @@ namespace OpenSim.RegionServer.Simulator
this._physActor.Velocity = new PhysicsVector(0, 0, 0); this._physActor.Velocity = new PhysicsVector(0, 0, 0);
ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock(); ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock();
ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
terse.RegionData.RegionHandle = m_regionHandle; // FIXME terse.RegionData.RegionHandle = m_world.m_regInfo.RegionHandle;
terse.RegionData.TimeDilation = 64096; terse.RegionData.TimeDilation = 64096;
terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
terse.ObjectData[0] = terseBlock; terse.ObjectData[0] = terseBlock;
@ -251,7 +242,7 @@ namespace OpenSim.RegionServer.Simulator
AgentMovementCompletePacket mov = new AgentMovementCompletePacket(); AgentMovementCompletePacket mov = new AgentMovementCompletePacket();
mov.AgentData.SessionID = this.ControllingClient.SessionID; mov.AgentData.SessionID = this.ControllingClient.SessionID;
mov.AgentData.AgentID = this.ControllingClient.AgentID; mov.AgentData.AgentID = this.ControllingClient.AgentID;
mov.Data.RegionHandle = this.m_regionHandle; mov.Data.RegionHandle = this.m_world.m_regInfo.RegionHandle;
// TODO - dynamicalise this stuff // TODO - dynamicalise this stuff
mov.Data.Timestamp = 1172750370; mov.Data.Timestamp = 1172750370;
mov.Data.Position = this.ControllingClient.startpos; mov.Data.Position = this.ControllingClient.startpos;
@ -415,47 +406,7 @@ namespace OpenSim.RegionServer.Simulator
} }
} }
//really really should be moved somewhere else (RegionInfo.cs ?)
public void SendRegionHandshake(World regionInfo)
{
OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs:SendRegionHandshake() - Creating empty RegionHandshake packet");
System.Text.Encoding _enc = System.Text.Encoding.ASCII;
RegionHandshakePacket handshake = new RegionHandshakePacket();
OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs:SendRegionhandshake() - Filling in RegionHandshake details");
handshake.RegionInfo.BillableFactor = 0;
handshake.RegionInfo.IsEstateManager = false;
handshake.RegionInfo.TerrainHeightRange00 = regionInfo.m_regInfo.estateSettings.terrainHeightRangeNW;
handshake.RegionInfo.TerrainHeightRange01 = regionInfo.m_regInfo.estateSettings.terrainHeightRangeNE;
handshake.RegionInfo.TerrainHeightRange10 = regionInfo.m_regInfo.estateSettings.terrainHeightRangeSW;
handshake.RegionInfo.TerrainHeightRange11 = regionInfo.m_regInfo.estateSettings.terrainHeightRangeSE;
handshake.RegionInfo.TerrainStartHeight00 = regionInfo.m_regInfo.estateSettings.terrainStartHeightNW;
handshake.RegionInfo.TerrainStartHeight01 = regionInfo.m_regInfo.estateSettings.terrainStartHeightNE;
handshake.RegionInfo.TerrainStartHeight10 = regionInfo.m_regInfo.estateSettings.terrainStartHeightSW;
handshake.RegionInfo.TerrainStartHeight11 = regionInfo.m_regInfo.estateSettings.terrainStartHeightSE;
handshake.RegionInfo.SimAccess = 13;
handshake.RegionInfo.WaterHeight = m_regionWaterHeight;
uint regionFlags = 72458694;
if (this.m_regionTerraform)
{
regionFlags -= 64;
}
handshake.RegionInfo.RegionFlags = regionFlags;
handshake.RegionInfo.SimName = _enc.GetBytes(m_regionName + "\0");
handshake.RegionInfo.SimOwner = regionInfo.m_regInfo.MasterAvatarAssignedUUID;
handshake.RegionInfo.TerrainBase0 = regionInfo.m_regInfo.estateSettings.terrainBase0;
handshake.RegionInfo.TerrainBase1 = regionInfo.m_regInfo.estateSettings.terrainBase1;
handshake.RegionInfo.TerrainBase2 = regionInfo.m_regInfo.estateSettings.terrainBase2;
handshake.RegionInfo.TerrainBase3 = regionInfo.m_regInfo.estateSettings.terrainBase3;
handshake.RegionInfo.TerrainDetail0 = regionInfo.m_regInfo.estateSettings.terrainDetail0;
handshake.RegionInfo.TerrainDetail1 = regionInfo.m_regInfo.estateSettings.terrainDetail1;
handshake.RegionInfo.TerrainDetail2 = regionInfo.m_regInfo.estateSettings.terrainDetail2;
handshake.RegionInfo.TerrainDetail3 = regionInfo.m_regInfo.estateSettings.terrainDetail3;
handshake.RegionInfo.CacheID = new LLUUID("545ec0a5-5751-1026-8a0b-216e38a7ab37");
OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs:SendRegionHandshake() - Sending RegionHandshake packet");
this.ControllingClient.OutPacket(handshake);
}
public static void LoadAnims() public static void LoadAnims()
{ {

View File

@ -562,7 +562,6 @@ namespace OpenSim.RegionServer.Simulator
updatePacket.ParcelData.TotalPrims = 0; //unemplemented updatePacket.ParcelData.TotalPrims = 0; //unemplemented
updatePacket.ParcelData.UserLocation = parcelData.userLocation; updatePacket.ParcelData.UserLocation = parcelData.userLocation;
updatePacket.ParcelData.UserLookAt = parcelData.userLookAt; updatePacket.ParcelData.UserLookAt = parcelData.userLookAt;
remote_client.OutPacket((Packet)updatePacket); remote_client.OutPacket((Packet)updatePacket);
} }
@ -588,6 +587,15 @@ namespace OpenSim.RegionServer.Simulator
parcelData.snapshotID = packet.ParcelData.SnapshotID; parcelData.snapshotID = packet.ParcelData.SnapshotID;
parcelData.userLocation = packet.ParcelData.UserLocation; parcelData.userLocation = packet.ParcelData.UserLocation;
parcelData.userLookAt = packet.ParcelData.UserLookAt; parcelData.userLookAt = packet.ParcelData.UserLookAt;
foreach (Avatar av in m_world.Avatars.Values)
{
Parcel over = m_world.parcelManager.getParcel((int)Math.Round(av.Pos.X), (int)Math.Round(av.Pos.Y));
if (over == this)
{
sendParcelProperties(0, false, 0, av.ControllingClient);
}
}
} }
} }
#endregion #endregion

View File

@ -627,19 +627,18 @@ namespace OpenSim.RegionServer.Simulator
try try
{ {
MainConsole.Instance.Notice("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); MainConsole.Instance.Notice("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent");
newAvatar = new Avatar(agentClient, this, m_regionName, m_clientThreads, m_regionHandle, true, 20); newAvatar = new Avatar(agentClient, this);
MainConsole.Instance.Notice("World.cs:AddViewerAgent() - Adding new avatar to world"); MainConsole.Instance.Notice("World.cs:AddViewerAgent() - Adding new avatar to world");
MainConsole.Instance.Notice("World.cs:AddViewerAgent() - Starting RegionHandshake "); MainConsole.Instance.Notice("World.cs:AddViewerAgent() - Starting RegionHandshake ");
newAvatar.SendRegionHandshake(this); estateManager.sendRegionHandshake(newAvatar.ControllingClient);
//if (!agentClient.m_child)
//{
PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z); PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z);
lock (this.LockPhysicsEngine) lock (this.LockPhysicsEngine)
{ {
newAvatar.PhysActor = this.phyScene.AddAvatar(pVec); newAvatar.PhysActor = this.phyScene.AddAvatar(pVec);
} }
// }
lock (Entities) lock (Entities)
{ {
if (!Entities.ContainsKey(agentClient.AgentID)) if (!Entities.ContainsKey(agentClient.AgentID))

View File

@ -130,10 +130,10 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="OpenSimMain.cs"> <Compile Include="Application.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="Application.cs"> <Compile Include="OpenSimMain.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
</ItemGroup> </ItemGroup>

View File

@ -11,8 +11,8 @@
<resources prefix="OpenSim" dynamicprefix="true" > <resources prefix="OpenSim" dynamicprefix="true" >
</resources> </resources>
<sources failonempty="true"> <sources failonempty="true">
<include name="OpenSimMain.cs" />
<include name="Application.cs" /> <include name="Application.cs" />
<include name="OpenSimMain.cs" />
</sources> </sources>
<references basedir="${project::get-base-directory()}"> <references basedir="${project::get-base-directory()}">
<lib> <lib>