mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
More OO and abstract goodness for Gareth to drool over. Cleaned up the World class a bit and added a WorldBase class (that World now inherits from)
This commit is contained in:
@@ -1,255 +1,271 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{58019DB8-0000-0000-0000-000000000000}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon></ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>OpenSim.RegionServer</AssemblyName>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder></AppDesignerFolder>
|
||||
<RootNamespace>OpenSim.RegionServer</RootNamespace>
|
||||
<StartupObject></StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DocumentationFile></DocumentationFile>
|
||||
<DebugSymbols>False</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>../bin/</OutputPath>
|
||||
<RegisterForComInterop>False</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn></NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<DocumentationFile></DocumentationFile>
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>False</Optimize>
|
||||
<OutputPath>../bin/</OutputPath>
|
||||
<RegisterForComInterop>False</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn></NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" >
|
||||
<HintPath>System.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" >
|
||||
<HintPath>System.Xml.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="libsecondlife.dll" >
|
||||
<HintPath>..\bin\libsecondlife.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Axiom.MathLib.dll" >
|
||||
<HintPath>..\bin\Axiom.MathLib.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Db4objects.Db4o.dll" >
|
||||
<HintPath>..\bin\Db4objects.Db4o.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.csproj">
|
||||
<Name>OpenSim.Terrain.BasicTerrain</Name>
|
||||
<Project>{9CBFE2C1-0000-0000-0000-000000000000}</Project>
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="../OpenSim.Framework/OpenSim.Framework.csproj">
|
||||
<Name>OpenSim.Framework</Name>
|
||||
<Project>{7404933D-0000-0000-0000-000000000000}</Project>
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="../OpenSim.Framework.Console/OpenSim.Framework.Console.csproj">
|
||||
<Name>OpenSim.Framework.Console</Name>
|
||||
<Project>{16759386-0000-0000-0000-000000000000}</Project>
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="../OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.csproj">
|
||||
<Name>OpenSim.GenericConfig.Xml</Name>
|
||||
<Project>{CAC10AC1-0000-0000-0000-000000000000}</Project>
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="../OpenSim.Physics/Manager/OpenSim.Physics.Manager.csproj">
|
||||
<Name>OpenSim.Physics.Manager</Name>
|
||||
<Project>{DA1FDCE5-0000-0000-0000-000000000000}</Project>
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="../OpenSim.Servers/OpenSim.Servers.csproj">
|
||||
<Name>OpenSim.Servers</Name>
|
||||
<Project>{111F9E8F-0000-0000-0000-000000000000}</Project>
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="../XmlRpcCS/XMLRPC.csproj">
|
||||
<Name>XMLRPC</Name>
|
||||
<Project>{9A8B526E-0000-0000-0000-000000000000}</Project>
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AgentAssetUpload.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="AuthenticateSessionsBase.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="AuthenticateSessionsLocal.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="AuthenticateSessionsRemote.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Grid.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="OpenSimMain.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="OpenSimNetworkHandler.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="PacketServer.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="RegionInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="RegionInfoBase.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="RegionServerBase.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SimClient.Grid.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SimClient.PacketHandlers.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SimClient.ProcessPackets.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SimClient.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SimClientBase.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UDPServer.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="VersionInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Assets/AssetCache.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Assets/InventoryCache.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CAPS/AdminWebFront.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="types/Mesh.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="types/Triangle.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world/Avatar.Client.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world/Avatar.Update.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world/Avatar.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world/AvatarAnimations.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world/Entity.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world/Primitive.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world/Primitive2.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world/SceneObject.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world/World.PacketHandlers.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world/World.Scripting.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world/World.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world/scripting/IScriptContext.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world/scripting/IScriptEntity.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world/scripting/IScriptHandler.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world/scripting/Script.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world/scripting/ScriptFactory.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world/scripting/Scripts/FollowRandomAvatar.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{632E1BFD-0000-0000-0000-000000000000}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>OpenSim.RegionServer</AssemblyName>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>
|
||||
</AppDesignerFolder>
|
||||
<RootNamespace>OpenSim.RegionServer</RootNamespace>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>False</Optimize>
|
||||
<OutputPath>..\bin\</OutputPath>
|
||||
<RegisterForComInterop>False</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>False</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>..\bin\</OutputPath>
|
||||
<RegisterForComInterop>False</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
<HintPath>System.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml">
|
||||
<HintPath>System.Xml.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="libsecondlife.dll">
|
||||
<HintPath>..\bin\libsecondlife.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Axiom.MathLib.dll">
|
||||
<HintPath>..\bin\Axiom.MathLib.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Db4objects.Db4o.dll">
|
||||
<HintPath>..\bin\Db4objects.Db4o.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj">
|
||||
<Name>OpenSim.Terrain.BasicTerrain</Name>
|
||||
<Project>{2270B8FE-0000-0000-0000-000000000000}</Project>
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj">
|
||||
<Name>OpenSim.Framework</Name>
|
||||
<Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj">
|
||||
<Name>OpenSim.Framework.Console</Name>
|
||||
<Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\OpenSim.GenericConfig\Xml\OpenSim.GenericConfig.Xml.csproj">
|
||||
<Name>OpenSim.GenericConfig.Xml</Name>
|
||||
<Project>{E88EF749-0000-0000-0000-000000000000}</Project>
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\OpenSim.Physics\Manager\OpenSim.Physics.Manager.csproj">
|
||||
<Name>OpenSim.Physics.Manager</Name>
|
||||
<Project>{8BE16150-0000-0000-0000-000000000000}</Project>
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\OpenSim.Servers\OpenSim.Servers.csproj">
|
||||
<Name>OpenSim.Servers</Name>
|
||||
<Project>{8BB20F0A-0000-0000-0000-000000000000}</Project>
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj">
|
||||
<Name>XMLRPC</Name>
|
||||
<Project>{8E81D43C-0000-0000-0000-000000000000}</Project>
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AgentAssetUpload.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="AuthenticateSessionsBase.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="AuthenticateSessionsLocal.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="AuthenticateSessionsRemote.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Grid.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="OpenSimMain.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="OpenSimNetworkHandler.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="PacketServer.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="RegionInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="RegionInfoBase.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="RegionServerBase.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SimClient.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SimClient.Grid.cs">
|
||||
<DependentUpon>SimClient.cs</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SimClient.PacketHandlers.cs">
|
||||
<SubType>Code</SubType>
|
||||
<DependentUpon>SimClient.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SimClient.ProcessPackets.cs">
|
||||
<SubType>Code</SubType>
|
||||
<DependentUpon>SimClient.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SimClientBase.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UDPServer.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="VersionInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Assets\AssetCache.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Assets\InventoryCache.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CAPS\AdminWebFront.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="types\Mesh.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="types\Triangle.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world\Avatar.Client.cs">
|
||||
<SubType>Code</SubType>
|
||||
<DependentUpon>Avatar.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="world\Avatar.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world\Avatar.Update.cs">
|
||||
<SubType>Code</SubType>
|
||||
<DependentUpon>Avatar.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="world\AvatarAnimations.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world\Entity.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world\Primitive.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world\Primitive2.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world\SceneObject.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world\World.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world\World.PacketHandlers.cs">
|
||||
<SubType>Code</SubType>
|
||||
<DependentUpon>World.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="world\World.Scripting.cs">
|
||||
<SubType>Code</SubType>
|
||||
<DependentUpon>World.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="world\scripting\IScriptContext.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world\scripting\IScriptEntity.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world\scripting\IScriptHandler.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world\scripting\Script.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world\scripting\ScriptFactory.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world\scripting\Scripts\FollowRandomAvatar.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world\WorldBase.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,89 +1,90 @@
|
||||
<?xml version="1.0" ?>
|
||||
<project name="OpenSim.RegionServer" default="build">
|
||||
<target name="build">
|
||||
<echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
|
||||
<mkdir dir="${project::get-base-directory()}/${build.dir}" />
|
||||
<copy todir="${project::get-base-directory()}/${build.dir}">
|
||||
<fileset basedir="${project::get-base-directory()}">
|
||||
</fileset>
|
||||
</copy>
|
||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||
<resources prefix="OpenSim.RegionServer" dynamicprefix="true" >
|
||||
</resources>
|
||||
<sources failonempty="true">
|
||||
<include name="AgentAssetUpload.cs" />
|
||||
<include name="AuthenticateSessionsBase.cs" />
|
||||
<include name="AuthenticateSessionsLocal.cs" />
|
||||
<include name="AuthenticateSessionsRemote.cs" />
|
||||
<include name="Grid.cs" />
|
||||
<include name="OpenSimMain.cs" />
|
||||
<include name="OpenSimNetworkHandler.cs" />
|
||||
<include name="PacketServer.cs" />
|
||||
<include name="RegionInfo.cs" />
|
||||
<include name="RegionInfoBase.cs" />
|
||||
<include name="RegionServerBase.cs" />
|
||||
<include name="SimClient.Grid.cs" />
|
||||
<include name="SimClient.PacketHandlers.cs" />
|
||||
<include name="SimClient.ProcessPackets.cs" />
|
||||
<include name="SimClient.cs" />
|
||||
<include name="SimClientBase.cs" />
|
||||
<include name="UDPServer.cs" />
|
||||
<include name="VersionInfo.cs" />
|
||||
<include name="Assets/AssetCache.cs" />
|
||||
<include name="Assets/InventoryCache.cs" />
|
||||
<include name="CAPS/AdminWebFront.cs" />
|
||||
<include name="types/Mesh.cs" />
|
||||
<include name="types/Triangle.cs" />
|
||||
<include name="world/Avatar.Client.cs" />
|
||||
<include name="world/Avatar.Update.cs" />
|
||||
<include name="world/Avatar.cs" />
|
||||
<include name="world/AvatarAnimations.cs" />
|
||||
<include name="world/Entity.cs" />
|
||||
<include name="world/Primitive.cs" />
|
||||
<include name="world/Primitive2.cs" />
|
||||
<include name="world/SceneObject.cs" />
|
||||
<include name="world/World.PacketHandlers.cs" />
|
||||
<include name="world/World.Scripting.cs" />
|
||||
<include name="world/World.cs" />
|
||||
<include name="world/scripting/IScriptContext.cs" />
|
||||
<include name="world/scripting/IScriptEntity.cs" />
|
||||
<include name="world/scripting/IScriptHandler.cs" />
|
||||
<include name="world/scripting/Script.cs" />
|
||||
<include name="world/scripting/ScriptFactory.cs" />
|
||||
<include name="world/scripting/Scripts/FollowRandomAvatar.cs" />
|
||||
</sources>
|
||||
<references basedir="${project::get-base-directory()}">
|
||||
<lib>
|
||||
<include name="${project::get-base-directory()}" />
|
||||
<include name="${project::get-base-directory()}/${build.dir}" />
|
||||
</lib>
|
||||
<include name="System.dll" />
|
||||
<include name="System.Xml.dll" />
|
||||
<include name="../bin/libsecondlife.dll" />
|
||||
<include name="../bin/Axiom.MathLib.dll" />
|
||||
<include name="../bin/Db4objects.Db4o.dll" />
|
||||
<include name="../bin/OpenSim.Terrain.BasicTerrain.dll" />
|
||||
<include name="../bin/OpenSim.Framework.dll" />
|
||||
<include name="../bin/OpenSim.Framework.Console.dll" />
|
||||
<include name="../bin/OpenSim.GenericConfig.Xml.dll" />
|
||||
<include name="../bin/OpenSim.Physics.Manager.dll" />
|
||||
<include name="../bin/OpenSim.Servers.dll" />
|
||||
<include name="../bin/XMLRPC.dll" />
|
||||
</references>
|
||||
</csc>
|
||||
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" />
|
||||
<mkdir dir="${project::get-base-directory()}/../bin/"/>
|
||||
<copy todir="${project::get-base-directory()}/../bin/">
|
||||
<fileset basedir="${project::get-base-directory()}/${build.dir}/" >
|
||||
<include name="*.dll"/>
|
||||
<include name="*.exe"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="clean">
|
||||
<delete dir="${bin.dir}" failonerror="false" />
|
||||
<delete dir="${obj.dir}" failonerror="false" />
|
||||
</target>
|
||||
<target name="doc" description="Creates documentation.">
|
||||
</target>
|
||||
</project>
|
||||
<?xml version="1.0" ?>
|
||||
<project name="OpenSim.RegionServer" default="build">
|
||||
<target name="build">
|
||||
<echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
|
||||
<mkdir dir="${project::get-base-directory()}/${build.dir}" />
|
||||
<copy todir="${project::get-base-directory()}/${build.dir}">
|
||||
<fileset basedir="${project::get-base-directory()}">
|
||||
</fileset>
|
||||
</copy>
|
||||
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||
<resources prefix="OpenSim.RegionServer" dynamicprefix="true" >
|
||||
</resources>
|
||||
<sources failonempty="true">
|
||||
<include name="AgentAssetUpload.cs" />
|
||||
<include name="AuthenticateSessionsBase.cs" />
|
||||
<include name="AuthenticateSessionsLocal.cs" />
|
||||
<include name="AuthenticateSessionsRemote.cs" />
|
||||
<include name="Grid.cs" />
|
||||
<include name="OpenSimMain.cs" />
|
||||
<include name="OpenSimNetworkHandler.cs" />
|
||||
<include name="PacketServer.cs" />
|
||||
<include name="RegionInfo.cs" />
|
||||
<include name="RegionInfoBase.cs" />
|
||||
<include name="RegionServerBase.cs" />
|
||||
<include name="SimClient.cs" />
|
||||
<include name="SimClient.Grid.cs" />
|
||||
<include name="SimClient.PacketHandlers.cs" />
|
||||
<include name="SimClient.ProcessPackets.cs" />
|
||||
<include name="SimClientBase.cs" />
|
||||
<include name="UDPServer.cs" />
|
||||
<include name="VersionInfo.cs" />
|
||||
<include name="Assets/AssetCache.cs" />
|
||||
<include name="Assets/InventoryCache.cs" />
|
||||
<include name="CAPS/AdminWebFront.cs" />
|
||||
<include name="types/Mesh.cs" />
|
||||
<include name="types/Triangle.cs" />
|
||||
<include name="world/Avatar.Client.cs" />
|
||||
<include name="world/Avatar.cs" />
|
||||
<include name="world/Avatar.Update.cs" />
|
||||
<include name="world/AvatarAnimations.cs" />
|
||||
<include name="world/Entity.cs" />
|
||||
<include name="world/Primitive.cs" />
|
||||
<include name="world/Primitive2.cs" />
|
||||
<include name="world/SceneObject.cs" />
|
||||
<include name="world/World.cs" />
|
||||
<include name="world/World.PacketHandlers.cs" />
|
||||
<include name="world/World.Scripting.cs" />
|
||||
<include name="world/WorldBase.cs" />
|
||||
<include name="world/scripting/IScriptContext.cs" />
|
||||
<include name="world/scripting/IScriptEntity.cs" />
|
||||
<include name="world/scripting/IScriptHandler.cs" />
|
||||
<include name="world/scripting/Script.cs" />
|
||||
<include name="world/scripting/ScriptFactory.cs" />
|
||||
<include name="world/scripting/Scripts/FollowRandomAvatar.cs" />
|
||||
</sources>
|
||||
<references basedir="${project::get-base-directory()}">
|
||||
<lib>
|
||||
<include name="${project::get-base-directory()}" />
|
||||
<include name="${project::get-base-directory()}/${build.dir}" />
|
||||
</lib>
|
||||
<include name="System.dll" />
|
||||
<include name="System.Xml.dll" />
|
||||
<include name="../bin/libsecondlife.dll" />
|
||||
<include name="../bin/Axiom.MathLib.dll" />
|
||||
<include name="../bin/Db4objects.Db4o.dll" />
|
||||
<include name="../bin/OpenSim.Terrain.BasicTerrain.dll" />
|
||||
<include name="../bin/OpenSim.Framework.dll" />
|
||||
<include name="../bin/OpenSim.Framework.Console.dll" />
|
||||
<include name="../bin/OpenSim.GenericConfig.Xml.dll" />
|
||||
<include name="../bin/OpenSim.Physics.Manager.dll" />
|
||||
<include name="../bin/OpenSim.Servers.dll" />
|
||||
<include name="../bin/XMLRPC.dll" />
|
||||
</references>
|
||||
</csc>
|
||||
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" />
|
||||
<mkdir dir="${project::get-base-directory()}/../bin/"/>
|
||||
<copy todir="${project::get-base-directory()}/../bin/">
|
||||
<fileset basedir="${project::get-base-directory()}/${build.dir}/" >
|
||||
<include name="*.dll"/>
|
||||
<include name="*.exe"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="clean">
|
||||
<delete dir="${bin.dir}" failonerror="false" />
|
||||
<delete dir="${obj.dir}" failonerror="false" />
|
||||
</target>
|
||||
<target name="doc" description="Creates documentation.">
|
||||
</target>
|
||||
</project>
|
||||
|
||||
@@ -49,6 +49,11 @@ namespace OpenSim
|
||||
|
||||
}
|
||||
|
||||
public virtual void AddClientPacketHanlder(PacketType packetType, PacketMethod handler)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual void RegisterClientPacketHandlers()
|
||||
{
|
||||
if (this._localWorld != null)
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace OpenSim.world
|
||||
{
|
||||
public partial class World
|
||||
{
|
||||
|
||||
public bool ModifyTerrain(SimClient simClient, Packet packet)
|
||||
{
|
||||
ModifyLandPacket modify = (ModifyLandPacket)packet;
|
||||
|
||||
@@ -18,33 +18,39 @@ using OpenSim.Terrain;
|
||||
|
||||
namespace OpenSim.world
|
||||
{
|
||||
public partial class World : ILocalStorageReceiver, IScriptAPI
|
||||
public partial class World : WorldBase, ILocalStorageReceiver, IScriptAPI
|
||||
{
|
||||
public object LockPhysicsEngine = new object();
|
||||
public Dictionary<libsecondlife.LLUUID, Entity> Entities;
|
||||
public Dictionary<libsecondlife.LLUUID, Avatar> Avatars;
|
||||
public Dictionary<libsecondlife.LLUUID, Primitive> Prims;
|
||||
//public ScriptEngine Scripts;
|
||||
public TerrainEngine Terrain; //TODO: Replace TerrainManager with this.
|
||||
public uint _localNumber = 0;
|
||||
private PhysicsScene phyScene;
|
||||
private float timeStep = 0.1f;
|
||||
private libsecondlife.TerrainManager TerrainManager; // To be referenced via TerrainEngine
|
||||
public ILocalStorage localStorage;
|
||||
private Random Rand = new Random();
|
||||
private uint _primCount = 702000;
|
||||
private int storageCount;
|
||||
private Dictionary<uint, SimClient> m_clientThreads;
|
||||
private Dictionary<LLUUID, ScriptHandler> m_scriptHandlers;
|
||||
private Dictionary<string, ScriptFactory> m_scripts;
|
||||
private ulong m_regionHandle;
|
||||
private string m_regionName;
|
||||
private InventoryCache _inventoryCache;
|
||||
private AssetCache _assetCache;
|
||||
private Mutex updateLock;
|
||||
private RegionInfo m_regInfo;
|
||||
public string m_datastore;
|
||||
|
||||
#region Properties
|
||||
public PhysicsScene PhysScene
|
||||
{
|
||||
set
|
||||
{
|
||||
this.phyScene = value;
|
||||
}
|
||||
get
|
||||
{
|
||||
return (this.phyScene);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
/// <summary>
|
||||
/// Creates a new World class, and a region to go with it.
|
||||
/// </summary>
|
||||
@@ -85,7 +91,9 @@ namespace OpenSim.world
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.CRITICAL,"World.cs: Constructor failed with exception " + e.ToString());
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Script Methods
|
||||
/// <summary>
|
||||
/// Loads a new script into the specified entity
|
||||
/// </summary>
|
||||
@@ -156,37 +164,13 @@ namespace OpenSim.world
|
||||
}
|
||||
}
|
||||
|
||||
public InventoryCache InventoryCache
|
||||
{
|
||||
set
|
||||
{
|
||||
this._inventoryCache = value;
|
||||
}
|
||||
}
|
||||
|
||||
public AssetCache AssetCache
|
||||
{
|
||||
set
|
||||
{
|
||||
this._assetCache = value;
|
||||
}
|
||||
}
|
||||
public PhysicsScene PhysScene
|
||||
{
|
||||
set
|
||||
{
|
||||
this.phyScene = value;
|
||||
}
|
||||
get
|
||||
{
|
||||
return (this.phyScene);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Update Methods
|
||||
/// <summary>
|
||||
/// Performs per-frame updates on the world, this should be the central world loop
|
||||
/// </summary>
|
||||
public void Update()
|
||||
public override void Update()
|
||||
{
|
||||
updateLock.WaitOne();
|
||||
try
|
||||
@@ -235,6 +219,40 @@ namespace OpenSim.world
|
||||
updateLock.ReleaseMutex();
|
||||
}
|
||||
|
||||
public bool Backup()
|
||||
{
|
||||
try
|
||||
{
|
||||
// Terrain backup routines
|
||||
if (Terrain.tainted > 0)
|
||||
{
|
||||
Terrain.tainted = 0;
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain tainted, saving.");
|
||||
localStorage.SaveMap(Terrain.getHeights1D());
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain saved, informing Physics.");
|
||||
phyScene.SetTerrain(Terrain.getHeights1D());
|
||||
}
|
||||
|
||||
// Primitive backup routines
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Backing up Primitives");
|
||||
foreach (libsecondlife.LLUUID UUID in Entities.Keys)
|
||||
{
|
||||
Entities[UUID].BackUp();
|
||||
}
|
||||
|
||||
// Backup successful
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// Backup failed
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "World.cs: Backup() - Backup Failed with exception " + e.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Setup Methods
|
||||
/// <summary>
|
||||
/// Loads a new storage subsystem from a named library
|
||||
/// </summary>
|
||||
@@ -279,6 +297,16 @@ namespace OpenSim.world
|
||||
}
|
||||
}
|
||||
|
||||
public void SetDefaultScripts()
|
||||
{
|
||||
this.m_scripts.Add("FollowRandomAvatar", delegate()
|
||||
{
|
||||
return new OpenSim.RegionServer.world.scripting.FollowRandomAvatar();
|
||||
});
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Regenerate Terrain
|
||||
|
||||
/// <summary>
|
||||
@@ -375,10 +403,11 @@ namespace OpenSim.world
|
||||
|
||||
#endregion
|
||||
|
||||
#region Load Terrain
|
||||
/// <summary>
|
||||
/// Loads the World heightmap
|
||||
/// </summary>
|
||||
public void LoadWorldMap()
|
||||
public override void LoadWorldMap()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -400,6 +429,32 @@ namespace OpenSim.world
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: LoadWorldMap() - Failed with exception " + e.ToString());
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Primitives Methods
|
||||
|
||||
/// <summary>
|
||||
/// Sends prims to a client
|
||||
/// </summary>
|
||||
/// <param name="RemoteClient">Client to send to</param>
|
||||
public void GetInitialPrims(SimClient RemoteClient)
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (libsecondlife.LLUUID UUID in Entities.Keys)
|
||||
{
|
||||
if (Entities[UUID] is Primitive)
|
||||
{
|
||||
Primitive primitive = Entities[UUID] as Primitive;
|
||||
primitive.UpdateClient(RemoteClient);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: GetInitialPrims() - Failed with exception " + e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads the World's objects
|
||||
@@ -440,108 +495,37 @@ namespace OpenSim.world
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tidy before shutdown
|
||||
/// </summary>
|
||||
public void Close()
|
||||
public void AddNewPrim(ObjectAddPacket addPacket, SimClient AgentClient)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.localStorage.ShutDown();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"World.cs: Close() - Failed with exception " + e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send the region heightmap to the client
|
||||
/// </summary>
|
||||
/// <param name="RemoteClient">Client to send to</param>
|
||||
public void SendLayerData(SimClient RemoteClient)
|
||||
{
|
||||
try
|
||||
{
|
||||
int[] patches = new int[4];
|
||||
|
||||
for (int y = 0; y < 16; y++)
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: AddNewPrim() - Creating new prim");
|
||||
Primitive prim = new Primitive(m_clientThreads, m_regionHandle, this);
|
||||
prim.CreateFromPacket(addPacket, AgentClient.AgentID, this._primCount);
|
||||
PhysicsVector pVec = new PhysicsVector(prim.Pos.X, prim.Pos.Y, prim.Pos.Z);
|
||||
PhysicsVector pSize = new PhysicsVector(0.255f, 0.255f, 0.255f);
|
||||
if (OpenSim.world.Avatar.PhysicsEngineFlying)
|
||||
{
|
||||
for (int x = 0; x < 16; x = x + 4)
|
||||
lock (this.LockPhysicsEngine)
|
||||
{
|
||||
patches[0] = x + 0 + y * 16;
|
||||
patches[1] = x + 1 + y * 16;
|
||||
patches[2] = x + 2 + y * 16;
|
||||
patches[3] = x + 3 + y * 16;
|
||||
|
||||
Packet layerpack = TerrainManager.CreateLandPacket(Terrain.getHeights1D(), patches);
|
||||
RemoteClient.OutPacket(layerpack);
|
||||
prim.PhysActor = this.phyScene.AddPrim(pVec, pSize);
|
||||
}
|
||||
}
|
||||
|
||||
this.Entities.Add(prim.uuid, prim);
|
||||
this._primCount++;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: SendLayerData() - Failed with exception " + e.ToString());
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: AddNewPrim() - Failed with exception " + e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a specified patch to a client
|
||||
/// </summary>
|
||||
/// <param name="px">Patch coordinate (x) 0..16</param>
|
||||
/// <param name="py">Patch coordinate (y) 0..16</param>
|
||||
/// <param name="RemoteClient">The client to send to</param>
|
||||
public void SendLayerData(int px, int py, SimClient RemoteClient)
|
||||
{
|
||||
try
|
||||
{
|
||||
int[] patches = new int[1];
|
||||
int patchx, patchy;
|
||||
patchx = px / 16;
|
||||
/* if (patchx > 12)
|
||||
{
|
||||
patchx = 12;
|
||||
}*/
|
||||
patchy = py / 16;
|
||||
#endregion
|
||||
|
||||
patches[0] = patchx + 0 + patchy * 16;
|
||||
//patches[1] = patchx + 1 + patchy * 16;
|
||||
//patches[2] = patchx + 2 + patchy * 16;
|
||||
//patches[3] = patchx + 3 + patchy * 16;
|
||||
#region Add/Remove Avatar Methods
|
||||
|
||||
Packet layerpack = TerrainManager.CreateLandPacket(Terrain.getHeights1D(), patches);
|
||||
RemoteClient.OutPacket(layerpack);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: SendLayerData() - Failed with exception " + e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends prims to a client
|
||||
/// </summary>
|
||||
/// <param name="RemoteClient">Client to send to</param>
|
||||
public void GetInitialPrims(SimClient RemoteClient)
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (libsecondlife.LLUUID UUID in Entities.Keys)
|
||||
{
|
||||
if (Entities[UUID] is Primitive)
|
||||
{
|
||||
Primitive primitive = Entities[UUID] as Primitive;
|
||||
primitive.UpdateClient(RemoteClient);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: GetInitialPrims() - Failed with exception " + e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public void AddViewerAgent(SimClient agentClient)
|
||||
public override void AddViewerAgent(SimClient agentClient)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -587,7 +571,7 @@ namespace OpenSim.world
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveViewerAgent(SimClient agentClient)
|
||||
public override void RemoveViewerAgent(SimClient agentClient)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -609,72 +593,24 @@ namespace OpenSim.world
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: RemoveViewerAgent() - Failed with exception " + e.ToString());
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public void AddNewPrim(ObjectAddPacket addPacket, SimClient AgentClient)
|
||||
#region ShutDown
|
||||
/// <summary>
|
||||
/// Tidy before shutdown
|
||||
/// </summary>
|
||||
public override void Close()
|
||||
{
|
||||
try
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs: AddNewPrim() - Creating new prim");
|
||||
Primitive prim = new Primitive(m_clientThreads, m_regionHandle, this);
|
||||
prim.CreateFromPacket(addPacket, AgentClient.AgentID, this._primCount);
|
||||
PhysicsVector pVec = new PhysicsVector(prim.Pos.X, prim.Pos.Y, prim.Pos.Z);
|
||||
PhysicsVector pSize = new PhysicsVector(0.255f, 0.255f, 0.255f);
|
||||
if (OpenSim.world.Avatar.PhysicsEngineFlying)
|
||||
{
|
||||
lock (this.LockPhysicsEngine)
|
||||
{
|
||||
prim.PhysActor = this.phyScene.AddPrim(pVec, pSize);
|
||||
}
|
||||
}
|
||||
|
||||
this.Entities.Add(prim.uuid, prim);
|
||||
this._primCount++;
|
||||
this.localStorage.ShutDown();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: AddNewPrim() - Failed with exception " + e.ToString());
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "World.cs: Close() - Failed with exception " + e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public bool Backup()
|
||||
{
|
||||
try
|
||||
{
|
||||
// Terrain backup routines
|
||||
if (Terrain.tainted > 0)
|
||||
{
|
||||
Terrain.tainted = 0;
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs: Backup() - Terrain tainted, saving.");
|
||||
localStorage.SaveMap(Terrain.getHeights1D());
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs: Backup() - Terrain saved, informing Physics.");
|
||||
phyScene.SetTerrain(Terrain.getHeights1D());
|
||||
}
|
||||
|
||||
// Primitive backup routines
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs: Backup() - Backing up Primitives");
|
||||
foreach (libsecondlife.LLUUID UUID in Entities.Keys)
|
||||
{
|
||||
Entities[UUID].BackUp();
|
||||
}
|
||||
|
||||
// Backup successful
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// Backup failed
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"World.cs: Backup() - Backup Failed with exception " + e.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetDefaultScripts()
|
||||
{
|
||||
this.m_scripts.Add("FollowRandomAvatar", delegate()
|
||||
{
|
||||
return new OpenSim.RegionServer.world.scripting.FollowRandomAvatar();
|
||||
});
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
176
OpenSim.RegionServer/world/WorldBase.cs
Normal file
176
OpenSim.RegionServer/world/WorldBase.cs
Normal file
@@ -0,0 +1,176 @@
|
||||
using System;
|
||||
using libsecondlife;
|
||||
using libsecondlife.Packets;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using OpenSim.Physics.Manager;
|
||||
using OpenSim.Framework.Interfaces;
|
||||
using OpenSim.Framework.Types;
|
||||
using OpenSim.Framework.Terrain;
|
||||
using OpenSim.Framework.Inventory;
|
||||
using OpenSim.Assets;
|
||||
using OpenSim.RegionServer.world.scripting;
|
||||
using OpenSim.Terrain;
|
||||
|
||||
namespace OpenSim.world
|
||||
{
|
||||
public class WorldBase
|
||||
{
|
||||
public Dictionary<libsecondlife.LLUUID, Entity> Entities;
|
||||
protected Dictionary<uint, SimClient> m_clientThreads;
|
||||
protected ulong m_regionHandle;
|
||||
protected string m_regionName;
|
||||
protected InventoryCache _inventoryCache;
|
||||
protected AssetCache _assetCache;
|
||||
protected RegionInfo m_regInfo;
|
||||
|
||||
public TerrainEngine Terrain; //TODO: Replace TerrainManager with this.
|
||||
protected libsecondlife.TerrainManager TerrainManager; // To be referenced via TerrainEngine
|
||||
|
||||
#region Properties
|
||||
public InventoryCache InventoryCache
|
||||
{
|
||||
set
|
||||
{
|
||||
this._inventoryCache = value;
|
||||
}
|
||||
}
|
||||
|
||||
public AssetCache AssetCache
|
||||
{
|
||||
set
|
||||
{
|
||||
this._assetCache = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
public WorldBase()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Setup Methods
|
||||
/// <summary>
|
||||
/// Register Packet handler Methods with the packet server (which will register them with the SimClient)
|
||||
/// </summary>
|
||||
/// <param name="packetServer"></param>
|
||||
public virtual void RegisterPacketHandlers(PacketServer packetServer)
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Update Methods
|
||||
/// <summary>
|
||||
/// Normally called once every frame/tick to let the world preform anything required (like running the physics simulation)
|
||||
/// </summary>
|
||||
public virtual void Update()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Terrain Methods
|
||||
|
||||
/// <summary>
|
||||
/// Loads the World heightmap
|
||||
/// </summary>
|
||||
public virtual void LoadWorldMap()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send the region heightmap to the client
|
||||
/// </summary>
|
||||
/// <param name="RemoteClient">Client to send to</param>
|
||||
public virtual void SendLayerData(SimClient RemoteClient)
|
||||
{
|
||||
try
|
||||
{
|
||||
int[] patches = new int[4];
|
||||
|
||||
for (int y = 0; y < 16; y++)
|
||||
{
|
||||
for (int x = 0; x < 16; x = x + 4)
|
||||
{
|
||||
patches[0] = x + 0 + y * 16;
|
||||
patches[1] = x + 1 + y * 16;
|
||||
patches[2] = x + 2 + y * 16;
|
||||
patches[3] = x + 3 + y * 16;
|
||||
|
||||
Packet layerpack = TerrainManager.CreateLandPacket(Terrain.getHeights1D(), patches);
|
||||
RemoteClient.OutPacket(layerpack);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: SendLayerData() - Failed with exception " + e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a specified patch to a client
|
||||
/// </summary>
|
||||
/// <param name="px">Patch coordinate (x) 0..16</param>
|
||||
/// <param name="py">Patch coordinate (y) 0..16</param>
|
||||
/// <param name="RemoteClient">The client to send to</param>
|
||||
public void SendLayerData(int px, int py, SimClient RemoteClient)
|
||||
{
|
||||
try
|
||||
{
|
||||
int[] patches = new int[1];
|
||||
int patchx, patchy;
|
||||
patchx = px / 16;
|
||||
patchy = py / 16;
|
||||
|
||||
patches[0] = patchx + 0 + patchy * 16;
|
||||
|
||||
Packet layerpack = TerrainManager.CreateLandPacket(Terrain.getHeights1D(), patches);
|
||||
RemoteClient.OutPacket(layerpack);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: SendLayerData() - Failed with exception " + e.ToString());
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Add/Remove Agent/Avatar
|
||||
/// <summary>
|
||||
/// Add a new Agent's avatar
|
||||
/// </summary>
|
||||
/// <param name="agentClient"></param>
|
||||
public virtual void AddViewerAgent(SimClient agentClient)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove a Agent's avatar
|
||||
/// </summary>
|
||||
/// <param name="agentClient"></param>
|
||||
public virtual void RemoveViewerAgent(SimClient agentClient)
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Shutdown
|
||||
/// <summary>
|
||||
/// Tidy before shutdown
|
||||
/// </summary>
|
||||
public virtual void Close()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user