diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 0a5bfd2a5e..1aecce56f4 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -519,12 +519,12 @@ namespace OpenSim.Region.Framework.Scenes protected internal void AddPhysicalPrim(int number) { - m_physicalPrim++; + m_physicalPrim += number; } protected internal void RemovePhysicalPrim(int number) { - m_physicalPrim--; + m_physicalPrim -= number; } protected internal void AddToScriptLPS(int number) diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneStatisticsTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneStatisticsTests.cs new file mode 100644 index 0000000000..16670029c0 --- /dev/null +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneStatisticsTests.cs @@ -0,0 +1,71 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using System.Reflection; +using NUnit.Framework; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Framework.Communications; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Tests.Common; +using OpenSim.Tests.Common.Mock; + +namespace OpenSim.Region.Framework.Scenes.Tests +{ + [TestFixture] + public class SceneStatisticsTests : OpenSimTestCase + { + private TestScene m_scene; + + [SetUp] + public void Init() + { + m_scene = new SceneHelpers().SetupScene(); + } + + [Test] + public void TestAddRemovePhysicalLinkset() + { + Assert.That(m_scene.SceneGraph.GetActiveObjectsCount(), Is.EqualTo(0)); + + UUID ownerId = TestHelpers.ParseTail(0x1); + SceneObjectGroup so1 = SceneHelpers.CreateSceneObject(3, ownerId, "so1", 0x10); + so1.ScriptSetPhysicsStatus(true); + m_scene.AddSceneObject(so1); + + Assert.That(m_scene.SceneGraph.GetTotalObjectsCount(), Is.EqualTo(3)); + Assert.That(m_scene.SceneGraph.GetActiveObjectsCount(), Is.EqualTo(3)); + + m_scene.DeleteSceneObject(so1, false); + + Assert.That(m_scene.SceneGraph.GetTotalObjectsCount(), Is.EqualTo(0)); + Assert.That(m_scene.SceneGraph.GetActiveObjectsCount(), Is.EqualTo(0)); + } + } +} \ No newline at end of file diff --git a/OpenSim/Tools/OpenSim.32BitLaunch/OpenSim.32BitLaunch.csproj b/OpenSim/Tools/OpenSim.32BitLaunch/OpenSim.32BitLaunch.csproj index d829e693e8..4625c330e0 100644 --- a/OpenSim/Tools/OpenSim.32BitLaunch/OpenSim.32BitLaunch.csproj +++ b/OpenSim/Tools/OpenSim.32BitLaunch/OpenSim.32BitLaunch.csproj @@ -1,58 +1,97 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {595D67F3-B413-4A43-8568-5B5930E3B31D} - Exe - Properties - OpenSim._32BitLaunch - OpenSim.32BitLaunch - v2.0 - 512 - - - true - full - false - ..\..\..\bin\ - DEBUG;TRACE - prompt - 4 - x86 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - {438A9556-0000-0000-0000-000000000000} - OpenSim - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {595D67F3-B413-4A43-8568-5B5930E3B31D} + Exe + Properties + OpenSim._32BitLaunch + OpenSim.32BitLaunch + v4.0 + 512 + + + + + 3.5 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + ..\..\..\bin\ + DEBUG;TRACE + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + False + .exe + ..\..\..\bin\OpenSim.exe + + + + + + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + --> \ No newline at end of file diff --git a/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.csproj b/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.csproj index 481b3f8486..9618c08500 100644 --- a/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.csproj +++ b/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.csproj @@ -1,62 +1,99 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {595D67F3-B413-4A43-8568-5B5930E3B31D} - Exe - Properties - Robust._32BitLaunch - Robust.32BitLaunch - v3.5 - 512 - - - true - full - false - ..\..\..\bin\ - DEBUG;TRACE - prompt - 4 - x86 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\bin\log4net.dll - - - False - ..\..\..\bin\Robust.exe - - - - 3.5 - - - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {595D67F3-B413-4A43-8568-5B5930E3B31D} + Exe + Properties + Robust._32BitLaunch + Robust.32BitLaunch + v4.0 + 512 + + + + + 3.5 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + ..\..\..\bin\ + DEBUG;TRACE + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\bin\log4net.dll + + + False + ..\..\..\bin\Robust.exe + + + + + + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + --> \ No newline at end of file diff --git a/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.sln b/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.sln index c7c97b1d93..a48a2d34fc 100644 --- a/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.sln +++ b/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C# Express 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Robust.32BitLaunch", "Robust.32BitLaunch.csproj", "{595D67F3-B413-4A43-8568-5B5930E3B31D}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {595D67F3-B413-4A43-8568-5B5930E3B31D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {595D67F3-B413-4A43-8568-5B5930E3B31D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {595D67F3-B413-4A43-8568-5B5930E3B31D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {595D67F3-B413-4A43-8568-5B5930E3B31D}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C# Express 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Robust.32BitLaunch", "Robust.32BitLaunch.csproj", "{595D67F3-B413-4A43-8568-5B5930E3B31D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {595D67F3-B413-4A43-8568-5B5930E3B31D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {595D67F3-B413-4A43-8568-5B5930E3B31D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {595D67F3-B413-4A43-8568-5B5930E3B31D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {595D67F3-B413-4A43-8568-5B5930E3B31D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/bin/OpenSim.32BitLaunch.exe b/bin/OpenSim.32BitLaunch.exe index cc73c8bc98..62c14af416 100755 Binary files a/bin/OpenSim.32BitLaunch.exe and b/bin/OpenSim.32BitLaunch.exe differ diff --git a/bin/Robust.32BitLaunch.exe b/bin/Robust.32BitLaunch.exe old mode 100644 new mode 100755 index 4d2698b9fb..affedb4bca Binary files a/bin/Robust.32BitLaunch.exe and b/bin/Robust.32BitLaunch.exe differ diff --git a/runprebuild.bat b/runprebuild.bat index 0fd7bbff4d..5f75982e79 100755 --- a/runprebuild.bat +++ b/runprebuild.bat @@ -7,18 +7,24 @@ setlocal ENABLEEXTENSIONS set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" set VALUE_NAME=MSBuildToolsPath -FOR /F "usebackq skip=4 tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO ( +rem We have to use find here as req query spits out 4 lines before Windows 7 +rem But 2 lines after Windows 7. Unfortunately, this screws up cygwin +rem as it uses its own find command. This could be fixed but it could be +rem complex to find the location of find on all windows systems +FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul ^| FIND "%VALUE_NAME%"`) DO ( set ValueName=%%A set ValueType=%%B set ValueValue=%%C ) if defined ValueName ( + @echo Found msbuild path registry entry @echo Value Name = %ValueName% @echo Value Type = %ValueType% @echo Value Value = %ValueValue% + @echo Creating compile.bat + @echo %ValueValue%\msbuild opensim.sln > compile.bat ) else ( @echo %KEY_NAME%\%VALUE_NAME% not found. + @echo Not creating compile.bat ) - -@echo %ValueValue%\msbuild opensim.sln > compile.bat diff --git a/runprebuild.sh b/runprebuild.sh index d276edbee4..8c18db6867 100755 --- a/runprebuild.sh +++ b/runprebuild.sh @@ -22,21 +22,11 @@ case "$1" in ;; - - 'vs2008') - - mono bin/Prebuild.exe /target vs2008 - - ;; - - *) mono bin/Prebuild.exe /target nant - mono bin/Prebuild.exe /target vs2008 + mono bin/Prebuild.exe /target vs2010 ;; - esac -